Replies: 1 comment
-
|
Adding @dmytrostruk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using
OpenAIChatClientwith non-OpenAI providers (such as OpenRouter withgoogle/gemini-3-pro-image-preview), the response may contain additional fields likeimagesthat are not part of the standard OpenAI response schema. These fields are currently being lost in the_create_chat_responsemethod.Problem Description
Consider the following example using OpenRouter to generate images:
When this response passes through
agent_framework/openai/_chat_client.py, the_create_chat_responsemethod only extracts:_parse_text_from_choice()_get_tool_calls_from_chat_choice()The
imagesfield (and potentially other provider-specific fields) is not captured and is therefore lost in the returnedChatResponse.Relevant Code
In
_chat_client.pyline 200-224:Questions
Is there a recommended way to preserve these non-standard fields when using
OpenAIChatClientwith alternative providers?Beta Was this translation helpful? Give feedback.
All reactions