mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #287] [CLOSED] fix: replace ambiguous locale schema descriptions with explicit 'in English' #302
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/287
Author: @octo-patch
Created: 4/25/2026
Status: ❌ Closed
Base:
main← Head:fix/285-lang-schema-english📝 Commits (1)
f973a84fix: 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.goused 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) inmessageandresultfields even whenFlow.Languageis 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
"user's language"occurrences are replaced (0 remaining).gofmt -esyntax check.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.