Skip to content

fix(provider): route gateway variants by api id#36614

Merged
rekram1-node merged 1 commit into
devfrom
gateway-api-id
Jul 13, 2026
Merged

fix(provider): route gateway variants by api id#36614
rekram1-node merged 1 commit into
devfrom
gateway-api-id

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Gateway variant selection sniffed the user-configurable model alias (model.id) instead of the routed API ID (model.api.id). A configured alias like my-claude pointing at anthropic/claude-sonnet-4-6 fell through to the openai-compatible reasoningEffort variants, and aliased gemini-2.5 models missed the thinking-budget branch.

  • Route the @ai-sdk/gateway anthropic/google branches by model.api.id
  • Use the API ID for the nested gemini 2.5 checks in the gateway google branch
  • Tests for aliased anthropic and google gateway models

Prerequisite for deriving variants from models.dev reasoning_options, where catalog routing must not depend on user-chosen aliases.

Note: bun typecheck in packages/opencode is currently failing on dev independently of this change: the generated SDK dropped null from reasoning_options effort values (packages/sdk/openapi.json), conflicting with the runtime schema. Fix coming separately.

Gateway variant selection sniffed the user-configurable model alias
instead of the routed API ID, so configured aliases like my-claude
fell through to openai-compatible reasoning efforts.
@rekram1-node rekram1-node merged commit 8168f0f into dev Jul 13, 2026
10 of 11 checks passed
@rekram1-node rekram1-node deleted the gateway-api-id branch July 13, 2026 05:08
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