You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on my investigation of the codebase, I've identified the root cause of this error. The problem is in the provider testing templates used for the /v1/responses endpoint.
Affected code:
The test templates that probe the /v1/responses endpoint contain an invalid combination of parameters:
According to the OpenAI Responses API specification, tool_choice should only be present when tools contains actual tool definitions. When tools is an empty array, including tool_choice violates the API contract, causing Agnes (and other strict OpenAI-compatible providers) to correctly reject the request with:
Invalid value for 'tool_choice': 'tool_choice' is only allowed when 'tools' are specified.
Comparison:
The OpenAI Chat Completions test templates (oa_chat_basic.json and oa_chat_stream.json) do NOT include tool_choice and work correctly. This confirms that the issue is specific to the Responses API test templates.
Workaround:
Until this is fixed, you can work around the issue by using a custom test payload that omits tool_choice when no tools are specified, or by testing Agnes as an openai-compatible provider type using the /v1/chat/completions endpoint if supported.
Related files:
src/lib/provider-testing/utils/test-prompts.ts (line 59) - also contains the same pattern in the fallback template
src/lib/provider-testing/data/cx_base.json (lines 12-13) - same issue
Activity
github-actions commentedon Sep 16, 2026
Thank you for reporting this issue.
Analysis:
Based on my investigation of the codebase, I've identified the root cause of this error. The problem is in the provider testing templates used for the
/v1/responsesendpoint.Affected code:
The test templates that probe the
/v1/responsesendpoint contain an invalid combination of parameters:src/lib/provider-testing/data/cx_codex_basic.json(lines 16-17)src/lib/provider-testing/data/cx_gpt_basic.json(lines 16-17)Both files include:
Why this causes the error:
According to the OpenAI Responses API specification,
tool_choiceshould only be present whentoolscontains actual tool definitions. Whentoolsis an empty array, includingtool_choiceviolates the API contract, causing Agnes (and other strict OpenAI-compatible providers) to correctly reject the request with:Comparison:
The OpenAI Chat Completions test templates (
oa_chat_basic.jsonandoa_chat_stream.json) do NOT includetool_choiceand work correctly. This confirms that the issue is specific to the Responses API test templates.Workaround:
Until this is fixed, you can work around the issue by using a custom test payload that omits
tool_choicewhen no tools are specified, or by testing Agnes as anopenai-compatibleprovider type using the/v1/chat/completionsendpoint if supported.Related files:
src/lib/provider-testing/utils/test-prompts.ts(line 59) - also contains the same pattern in the fallback templatesrc/lib/provider-testing/data/cx_base.json(lines 12-13) - same issueAutomated response from Claude AI
github-actions commentedon Oct 16, 2026
This issue has been automatically marked as stale because it has not had any activity in the last 30 days.
If this issue is still relevant:
This issue will be automatically closed in 14 days if there is no further activity.
github-actions commentedon Oct 31, 2026
This issue has been automatically closed due to inactivity.
If you believe this issue is still relevant, please feel free to reopen it with additional information.