You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #6282
`input_schema` inputs containing non-Latin characters (Hebrew, Chinese, etc.) reach the LLM as `\uXXXX` escapes, which bloats prompt tokens (~6x for Hebrew) and degrades model responses, as reported in #6279.
The escaping comes from `json.dumps` being called with its default `ensure_ascii=True` on the LLM-bound input text. Two paths were affected:
- `utils/content_utils.py` - `to_user_content()` for `dict`/`list` node input (used by `workflow/_llm_agent_wrapper.py`)
- `flows/llm_flows/contents.py` – `_build_task_input_user_content()`, which rebuilds a delegated task's function-call args as the sub-agent's first user turn. This path takes priority over the wrapper fallback, so it affects the common chat/root → task sub-agent delegation case.
Both now serialize with `ensure_ascii=False`, matching how the output-schema path already serializes responses (`_output_schema_processor.py`), fixed earlier in #2936/#2937.
Fixes#6279Closes#6282
Co-authored-by: Jason Zhang <jasoncz@google.com>
PiperOrigin-RevId: 947866027
0 commit comments