-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Responses API requests fail with "Unsupported parameter: 'reasoning_effort'" when wireApi is 'responses' #976
Description
Environment
@github/copilot-sdk: 0.1.32@github/copilot(CLI): 1.0.6
Description
When ProviderConfig.wireApi is set to 'responses', the CLI still sends reasoning_effort as a top-level request parameter. The OpenAI Responses API rejects this with:
400 {"error":{"message":"Unsupported parameter: 'reasoning_effort'. In the Responses API, this parameter has moved to 'reasoning.effort'."}}
The parameter name change is documented at: https://platform.openai.com/docs/api-reference/responses/create
Root cause
In getCompletionOptions(), the CLI always returns { reasoning_effort: o, ... } regardless of wire API format. When using the Responses API, this should be { reasoning: { effort: o } }.
Impact
All GPT model requests fail when wireApi: 'responses' is enabled. Affects both GPT-52-reasoning and GPT-54-reasoning.
Repro
- Set
provider.wireApi = 'responses'in session config - Send any prompt to a GPT reasoning model
- First LLM call fails with 400
Expected behavior
The CLI should adapt the parameter format based on the wire API — reasoning_effort for Chat Completions, reasoning.effort for Responses API.
Current workaround
Disabled Responses API via feature flag (ExcelAgent.EnableResponsesApi defaulting to false).