Assistant API Stream in gpt-4o (2024-11-20) mis-encodes function call arguments
I’m using the Azure OpenAI Assistants Playground with gpt-4o model version 2024-11-20. After adding a simple function (like the one below) and then asking “今日のニュースを教えて?” in the Playground, the function call’s arguments appear garbled in the JSON payload—e.g., "ä»æ¥ã®ãã¥ã¼ã¹" instead of “今日のニュース.”
Interestingly, this issue only happens:
- On the 2024-11-20 version (rolling back to 2024-08-06 fixes it).
- With the Assistant API’s streaming (Completion API in streaming mode still works fine).
It looks as though the endpoint might be treating UTF-8 output as though it were Latin-1. If I take the garbled string, encode it as Latin-1, then decode again as UTF-8, I get the correct “今日のニュース.” I’ve attached a screenshot from the Assistant Playground demonstrating this behavior.
Has anyone else run into this? Or found a workaround? It seems like a possible regression in the Assistant API for that version, especially since a single Playground setup reproduces the problem easily. Any insight or confirmation from Microsoft would be really helpful!
Function example:
{ "name": "get_google_results", "description": "Perform a Google search for latest or detailed information…", "parameters": { "type": "object", "properties": { "query": { "type": "string", "description": "Words to search for" } }, "required": ["query"] }, "strict": false }