Skip to content

fix: keep model wire format provider-scoped - #10089

Closed
tiangao88 wants to merge 1 commit into
diegosouzapw:release/v3.8.50from
tiangao88:fix/gpt56-cross-provider-wire-format
Closed

tiangao88 wants to merge 1 commit into
diegosouzapw:release/v3.8.50from
tiangao88:fix/gpt56-cross-provider-wire-format

Conversation

@tiangao88

Copy link
Copy Markdown
Contributor

Problem

The v3.8.50 line added a global model-registry fallback to
getModelTargetFormat() (upstream commit 3a66761cb, #8057). That fallback is
useful for sharing capability metadata, but it also inherited wire-format
metadata from unrelated provider registries.

OpenAI's GPT-5.6 registry entries declare targetFormat: "openai-responses".
When the same model ID was routed through the Nous or OpenRouter provider, the
fallback selected the Responses wire format even though those provider
connections dispatch to their Chat Completions endpoints. OmniRoute translated
messages[] into Responses input[], then sent that body to
/chat/completions, producing:

400 messages is required and must be a non-empty array
400 Input required: specify "prompt" or "messages"

The failure reproduced with a two-message text-only request, with and without
reasoning_effort; it was not caused by compression or an image.

Change

Make getModelTargetFormat() provider-scoped again while retaining the useful
cross-provider global fallback for capability/model metadata:

  • resolve the provider's public alias before looking up its registry models;
  • preserve provider-prefix normalization for model IDs;
  • use only the resolved provider's model entry for wire-format metadata;
  • retain the OpenAI *-pro Responses heuristic;
  • leave getProviderModel() and related capability fallback behavior unchanged.

Expected behavior:

openai/gpt-5.6-luna through OpenAI      -> openai-responses
openai/gpt-5.6-luna through Nous        -> provider default: OpenAI Chat
openai/gpt-5.6-luna through OpenRouter  -> provider default: OpenAI Chat

Tests

Extended tests/unit/openai-gpt56-responses-routing.test.ts with coverage for:

  • Nous and OpenRouter GPT-5.6, bare and prefixed IDs;
  • chatCore provider-default resolution;
  • preservation of global vision/reasoning capability fallback.

Focused test results:

GPT-5.6 / target-format / provider-model tests: 35 passed
Executor / reasoning / provider compatibility tests: 71 passed
Responses request translator tests: 55 passed
Total: 161 passed, 0 failed

Scope

This patch changes only model wire-format resolution and its regression tests.
It does not change provider credentials, routing combo membership, compression,
Vision Bridge settings, deployment configuration, or retry policy.

@tiangao88
tiangao88 force-pushed the fix/gpt56-cross-provider-wire-format branch from a4cc6a7 to ea2b741 Compare August 12, 2026 07:15
@tiangao88

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #9994 ("fix(providers): scope model-level targetFormat to declaring provider catalog"), which landed in release/v3.8.50 today and fixes the same cross-provider targetFormat leak with equivalent logic (resolve alias, provider-scoped lookup, no global fallback import). Our fork keeps the fix in its deployed image; no further action needed here. Thanks!

@tiangao88 tiangao88 closed this Aug 12, 2026
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.

1 participant