Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 encoding issues in tool calling params with GPT-4o model #315

Open
jackien1 opened this issue Mar 24, 2025 · 0 comments
Open

UTF-8 encoding issues in tool calling params with GPT-4o model #315

jackien1 opened this issue Mar 24, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@jackien1
Copy link

jackien1 commented Mar 24, 2025

Describe the bug

The gpt-4o agent encodes the str argument to a tool call in latin-1 encoding instead of utf-8 whenever smart / curly quotes are involved. If another tool uses the same text, the memory of the argument as latin-1 causes subsequent double encoding issues.

Debug information

  • Agents SDK version: v0.0.6
  • Python version Python 3.12

Repro steps

Have a gpt-4o agent use a tool that writes a script and uses any unicode characters like smart / curly quotes.

Expected behavior

String parameters should be in utf-8 encoding unless I fundamentally misunderstand tool calling.

Alright, now let�s break it down! instead of "Alright, now let's break it down!"

@jackien1 jackien1 added the bug Something isn't working label Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant