Skip to content

fix(opencode-zen): route GPT-5.6 models through Responses API - #14265

Closed
prabhtheone wants to merge 2 commits into
diegosouzapw:release/v3.8.51from
prabhtheone:fix/14229-opencode-zen-gpt56-responses
Closed

prabhtheone wants to merge 2 commits into
diegosouzapw:release/v3.8.51from
prabhtheone:fix/14229-opencode-zen-gpt56-responses

Conversation

@prabhtheone

Copy link
Copy Markdown
Contributor

what does this pr fixes

This PR fixes GPT-5.6 model routing for the OpenCode Zen provider.

The GPT-5.6 models are served through the OpenAI Responses API, but the OpenCode Zen registry did not explicitly declare their targetFormat. As a result, OmniRoute could fall back to the Chat Completions endpoint instead of /responses.

Models affected

  • gpt-5.6-sol
  • gpt-5.6-terra
  • gpt-5.6-luna

Changes

  • Added targetFormat: "openai-responses" to all three GPT-5.6 models.
  • Added a regression test covering all GPT-5.6 model entries.
  • Verified that resolveOpencodeTargetFormat() resolves the models to the Responses API through the opencode-zen provider alias.

Why?

Without the correct target format, requests can be sent to the wrong upstream endpoint, causing GPT-5.6 requests to fail instead of being routed through the supported Responses API.

Testing

Added:

tests/unit/opencode-zen-gpt56-responses-14229.test.ts

The test verifies that all three GPT-5.6 models:

  1. Declare targetFormat: "openai-responses".
  2. Resolve to openai-responses through the OpenCode Zen provider.

Related issue

Fixes #14229

@prabhtheone
prabhtheone marked this pull request as ready for review September 20, 2026 13:56
@diegosouzapw

Copy link
Copy Markdown
Owner

Thank you for tracking down the same #14229 bug — your diff is correct and matches what we're shipping. There's an earlier PR (#14230) open for the exact same fix that we're merging instead (it also adds a changelog entry and a control test), so I'm closing this one as a duplicate rather than merging both. Appreciate the report and the regression test either way — feel free to route future opencode-zen catches our way.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(providers): opencode-zen GPT-5.6 models 503 — upstream serves them only on /responses, registry entries lack targetFormat

2 participants