Skip to content

set_model_response escape latin characters in final response #2936

Closed

Description

@amenegola

When defining output_schema in a LlmAgent with other tools, output schema processor executes json.dumps with ensure_ascii = True, making the agent respond with escaped latin characters, and therefore presenting responses not human readable:

return json.dumps(func_response.response)

This line could be changed with ensure_ascii=False:

json.dumps(func_response.response, ensure_ascii=False)

Activity

  1. added
    core[Component] This issue is related to the core interface and implementation
    on Sep 12, 2025
  2. added theissue type on Sep 12, 2025
  3. added a commit that references this issue on Sep 12, 2025
    bed81a7
  4. amenegola commented on Sep 13, 2025

    @amenegola
    ContributorAuthor

    Hello @seanzhou1023

    Following up on this issue, I've opened a Pull Request (#2937) with the proposed fix. The changes involve explicitly setting ensure_ascii=False in the json.dumps call, which I've tested locally to correctly handle Latin characters.

    Please feel free to review it when you have a moment, and let me know if there's anything else I can do to help move this forward.

    Thanks for your time!

  5. added a commit that references this issue on Sep 15, 2025
    0f087a4
  6. added a commit that references this issue on Sep 18, 2025
    c9ea80a
  7. added 2 commits that reference this issue on Aug 11, 2026
    64926ad
    9029797
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

core[Component] This issue is related to the core interface and implementation

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions