Skip to content

fix: process all candidates from LLM response (#421)#650

Open
gkhandale-aziro wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
aziro-ai:fix/421-openai-reasoning-tools
Open

fix: process all candidates from LLM response (#421)#650
gkhandale-aziro wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
aziro-ai:fix/421-openai-reasoning-tools

Conversation

@gkhandale-aziro
Copy link
Copy Markdown

OpenAI reasoning models (o1, o3, o4-mini) use the Responses API which returns tool calls and text as separate candidates in a single response. The conversation loop only processed candidates[0], silently dropping tool calls that appeared in subsequent candidates.

Fix: iterate over all candidates instead of just the first one.

OpenAI reasoning models (o1, o3, o4-mini) use the Responses API which
returns tool calls and text as separate candidates in a single response.
The conversation loop only processed candidates[0], silently dropping
tool calls that appeared in subsequent candidates.

Fix: iterate over all candidates instead of just the first one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant