[PR #287] [CLOSED] fix: replace ambiguous locale schema descriptions with explicit 'in English' #302

Closed
opened 2026-06-06 22:10:07 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/287
Author: @octo-patch
Created: 4/25/2026
Status: Closed

Base: mainHead: fix/285-lang-schema-english


📝 Commits (1)

  • f973a84 fix: replace ambiguous locale schema descriptions with explicit 'in English'

📊 Changes

1 file changed (+32 additions, -32 deletions)

View changed files

📝 backend/pkg/tools/args.go (+32 -32)

📄 Description

Fixes #285

Problem

Tool argument JSON schema descriptions in backend/pkg/tools/args.go used the static phrase "in user's language only" embedded in Go struct tags. Since struct tags are compiled at build time, no runtime locale substitution occurs. This causes the LLM to emit mixed-language output (e.g. Russian) in message and result fields even when Flow.Language is set to "English".

This contradicts the English-only policy established in #216. As detailed in #285, fields already anchored to "in English" (e.g. AskAdvice.Question, SearchEngineSearch.Query) consistently produce English output, while fields with "in user's language only" produce inconsistent, locale-mixed output.

Solution

Apply Option A from the issue: replace all 32 locale-ambiguous phrases in backend/pkg/tools/args.go:

  • "in user's language only""in English"
  • "in the user's language only""in English"
  • "in the user's language""in English"

This is a minimal, self-contained change to one file, consistent with the explicit anchoring already used by fields that reliably produce English output.

Testing

  • Verified all 32 "user's language" occurrences are replaced (0 remaining).
  • File passes gofmt -e syntax check.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/287 **Author:** [@octo-patch](https://github.com/octo-patch) **Created:** 4/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/285-lang-schema-english` --- ### 📝 Commits (1) - [`f973a84`](https://github.com/vxcontrol/pentagi/commit/f973a84e2cf977b4326452442d41828023dd20b0) fix: replace ambiguous locale schema descriptions with explicit 'in English' ### 📊 Changes **1 file changed** (+32 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/tools/args.go` (+32 -32) </details> ### 📄 Description Fixes #285 ## Problem Tool argument JSON schema descriptions in `backend/pkg/tools/args.go` used the static phrase `"in user's language only"` embedded in Go struct tags. Since struct tags are compiled at build time, no runtime locale substitution occurs. This causes the LLM to emit mixed-language output (e.g. Russian) in `message` and `result` fields even when `Flow.Language` is set to `"English"`. This contradicts the English-only policy established in #216. As detailed in #285, fields already anchored to `"in English"` (e.g. `AskAdvice.Question`, `SearchEngineSearch.Query`) consistently produce English output, while fields with `"in user's language only"` produce inconsistent, locale-mixed output. ## Solution Apply Option A from the issue: replace all 32 locale-ambiguous phrases in `backend/pkg/tools/args.go`: - `"in user's language only"` → `"in English"` - `"in the user's language only"` → `"in English"` - `"in the user's language"` → `"in English"` This is a minimal, self-contained change to one file, consistent with the explicit anchoring already used by fields that reliably produce English output. ## Testing - Verified all 32 `"user's language"` occurrences are replaced (0 remaining). - File passes `gofmt -e` syntax check. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:07 -04:00
yindo closed this issue 2026-06-06 22:10:07 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#302