Files
ProxyPilot/internal
RCDandClaude ae7946402a fix(translator): validate complete JSON before using SetRaw for tool output
Tool outputs like "[1,2,3]\n\n[Process exited with code 0]" were being
partially parsed by gjson.Parse() which would extract just "[1,2,3]" and
lose the trailing text. This caused invalid JSON in the Gemini request.

Fix: Use gjson.Valid() to verify the ENTIRE string is valid JSON before
treating it as raw JSON. If validation fails, treat as a string with
proper escaping via sjson.Set().

Co-Authored-By: Claude (gemini-claude-opus-4-5-thinking) <noreply@anthropic.com>
2026-01-30 17:19:56 +07:00
..
2025-10-15 11:47:35 +08:00