Skip to content

Responses API requests fail with "Unsupported parameter: 'reasoning_effort'" when wireApi is 'responses' #976

@pmella

Description

@pmella

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

  1. Set provider.wireApi = 'responses' in session config
  2. Send any prompt to a GPT reasoning model
  3. 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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions