Skip to content

fix(ai-gateway): prefer Bedrock, Anthropic, then Vertex for Fable models - #6883

Merged
chrarnoldus merged 2 commits into
mainfrom
fix/claude-provider-order-fable
Sep 29, 2026
Merged

chrarnoldus merged 2 commits into
mainfrom
fix/claude-provider-order-fable

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fable models (anthropic/claude-fable-5) were excluded from the Claude preferred provider order, so OpenRouter and Vercel routed them without a preference. This removes the exclusion so Fable uses the same order as every other Claude model: Amazon Bedrock, then Anthropic, then Google Vertex.

The removed guard carried the comment "specifying this for fable breaks the opus fallback on vercel". Fable requests on OpenRouter and Vercel still get models: [fable, opus-4.8] from applyGatewayModelsFallback; with this change they also carry provider.order, which Vercel receives as providerOptions.gateway.order alongside models.

Verification

  • jest src/lib/ai-gateway/providers: 32 suites, 507 tests pass. The Fable test in apply-provider-specific-logic.test.ts now expects the Claude order instead of no order.
  • Model-list pricing: getPreferredProviderOrder(...).at(0) now selects the amazon-bedrock endpoint for Fable. OpenRouter lists Bedrock for anthropic/claude-fable-5 at $10/M input and $50/M output, the same as endpoints[0], so displayed pricing is unchanged.
  • Not verified: an end-to-end Fable request on Vercel that fails over to Opus 4.8 while order is set. This needs a manual check after deploy, because the removed comment documents a previous regression here.

@chrarnoldus chrarnoldus self-assigned this Sep 29, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts 140 Fable now receives the Claude provider order. The removed guard comment ("specifying this for fable breaks the opus fallback on vercel") documented a Vercel Opus-4.8 fallback regression; the author confirms the end-to-end fallback still needs a manual post-deploy check, so this risk remains open.
Files Reviewed (2 files)
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summary (commit 23167bd)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 23167bd)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts 139 Fable models now receive the Claude provider order, but the existing test does not set a provider order for Fable (apply-provider-specific-logic.test.ts:442) still asserts no order is set, so CI will fail.

WARNING

File Line Issue
apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts 140 Removal of the documented workaround ("specifying this for fable breaks the opus fallback on vercel"); confirm the Vercel Opus-4.8 fallback still works. Also shifts Fable's model-list displayed pricing to the amazon-bedrock endpoint via openrouter/index.ts:148.
Files Reviewed (1 file)
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts - 2 issues

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@chrarnoldus chrarnoldus changed the title fix(ai-gateway): apply Claude provider order to Fable models fix(ai-gateway): prefer Bedrock, Anthropic, then Vertex for Fable models Sep 29, 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.

2 participants