Skip to content

fix(ai-gateway): fall back from Fable and Opus 5 to Opus 4.8 - #4817

Merged
chrarnoldus merged 2 commits into
mainfrom
hurricane-close
Jul 28, 2026
Merged

fix(ai-gateway): fall back from Fable and Opus 5 to Opus 4.8#4817
chrarnoldus merged 2 commits into
mainfrom
hurricane-close

Conversation

@chrarnoldus

@chrarnoldus chrarnoldus commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin the Fable fallback to Claude Opus 4.8 instead of the mutable current-Opus model
  • make Claude Opus 5 fall back to Claude Opus 4.8 on OpenRouter and Vercel
  • detect Opus 5 explicitly so future current Opus versions do not inherit this fallback automatically

Testing

  • pnpm --filter web exec jest --runInBand src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts
  • pnpm --filter web run typecheck
  • pnpm exec oxlint --config .oxlintrc.json apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts

@chrarnoldus chrarnoldus self-assigned this Jul 28, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the incremental refactor that replaces the exact-match Opus 5 check with an explicit isOpus5Model substring helper; the change is correct, matches the existing isFableModel/isClaudeModel detection pattern, and the updated tests correctly verify no fallback for Opus 4.8, Opus 6, and non-Anthropic models.

Files Reviewed (3 files)
  • apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts
Previous Review Summary (commit 0569660)

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

Previous review (commit 0569660)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the Opus 4.8 fallback change across the constants, fallback logic, and test file; the implementation is correct, tests cover both providers and both trigger models, and no bugs, security issues, or breaking changes were found.

Files Reviewed (3 files)
  • apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.ts
  • apps/web/src/lib/ai-gateway/providers/apply-provider-specific-logic.test.ts

Reviewed by claude-sonnet-5 · Input: 26 · Output: 4.1K · Cached: 711.1K

Review guidance: REVIEW.md from base branch main

@chrarnoldus chrarnoldus changed the title fix(ai-gateway): fall back to Opus 4.8 fix(ai-gateway): fall back from Fable and Opus 5 to Opus 4.8 Jul 28, 2026
@chrarnoldus
chrarnoldus merged commit d5d2406 into main Jul 28, 2026
15 checks passed
@chrarnoldus
chrarnoldus deleted the hurricane-close branch July 28, 2026 10:38
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