Skip to content

2.11.x breaks structured-output requests routed via the opencode provider (400 "This response_format type is unavailable now") #1338

Closed as not planned

Description

@tulb-git

Environment:

  • opencodex 2.11.0 and 2.11.1 (npm, Windows), downgrade to 2.10.2 resolves it
  • Provider: opencode-free (opencode.ai gateway)
  • Model: deepseek-v4-flash:free
  • Client: OpenAI Codex desktop app (approval-reviewer escalations request structured output)

Regression:
opencodex 2.11.0 began forwarding response_format to upstream in src/adapters/openai-chat.ts:
when textFormat.type === "json_schema", it sets body.response_format = { type: "json_schema", json_schema: {...} }.
The opencode-free gateway rejects this with:

Provider error 400: {"error":{"param":null,"type":"invalid_request_error","code":"invalid_request_error","message":"Error from provider (Console): Upstream request failed: [invalid_request_error] This response_format type is unavailable now"}}

Impact:
Every request that asks for structured output fails - e.g., Codex's automatic approval reviewer always uses json_schema, so all escalated tool calls fail with this 400 under deepseek. Normal (non-structured) requests succeed. 2.10.2 does not forward response_format and works fine.

Expected:
Either stop sending response_format to providers that don't support it (e.g., opencode), map json_schema to a supported format for that provider, or document the limitation.

Activity

  1. github-actions commented on Aug 9, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  2. github-actions commented on Aug 9, 2026

    @github-actions
    Contributor

    Issue closed: use an issue template

    Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.

    • This issue does not use a recognized issue template.

    Please edit the issue to add:

    • Open a new issue with the Bug report, Feature request, Documentation, or Provider compatibility template.
    • Or edit this issue so the body uses the template section headings for the kind of report you are filing.

    See the Contributing guide for details.

    Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions