Assistant API Stream in gpt-4o (2024-11-20) mis-encodes function call arguments

nanigashi 0 Reputation points
2025-02-28T02:56:32.01+00:00

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:

  1. On the 2024-11-20 version (rolling back to 2024-08-06 fixes it).
  2. 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 }

スクリーンショット 2025-02-28 105150a

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,732 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.