Skip to content

GPT-5.5 fails because reasoningEffort is added automatically #26219

Closed

Description

@frederiknsgo

Description

This causes requests to fail for setups where gpt-5.5 is routed through /v1/chat/completions, especially with Azure/OpenAI-compatible gateways.

Error:

Bad Request: Error code: 400 - Function tools with reasoning_effort are not supported for gpt-5.5 in /v1/chat/completions. Please use /v1/responses instead.

The issue is caused by this condition also matching gpt-5.5. Only gpt-5-chat is currently excluded. gpt-5.5 should also be excluded here.

input.model.api.id.includes("gpt-5") && !input.model.api.id.includes("gpt-5-chat")

Plugins

None

OpenCode version

v1.14.40

Steps to reproduce

  1. Configure OpenCode with an Azure/OpenAI-compatible provider using gpt-5.5.
  2. Route requests through /v1/chat/completions.
  3. Start a new OpenCode session with gpt-5.5.
  4. Send any prompt.
  5. The request fails because OpenCode automatically includes reasoningEffort: "medium".

Expected: OpenCode should not send reasoningEffort for gpt-5.5 when using chat completions.

Actual: The request fails with a 400 error.

Screenshot and/or share link

Image

Operating System

macOS 26.4.1

Terminal

Mac Terminal

Activity

  1. frederiknsgo commented on May 7, 2026

    @frederiknsgo
    ContributorAuthor

    I tested this locally by running a patched OpenCode build against an OpenAI-compatible provider using gpt-5.5 over /v1/chat/completions.

    Without the workaround, requests consistently failed with:

    Function tools with reasoning_effort are not supported for gpt-5.5 in /v1/chat/completions

    I then added this exclusion:

    !input.model.api.id.includes("gpt-5.5")

    to the gpt-5 reasoning block in ProviderTransform.options().

    After rebuilding and rerunning OpenCode, requests succeeded normally and gpt-5.5 worked correctly through the chat completions endpoint.

  2. frederiknsgo commented on May 7, 2026

    @frederiknsgo
    ContributorAuthor

    Another option would be to make reasoningEffort configurable. Currently it passes reasoningEffort under water even if not specified in the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions