Skip to content

fix(ai-gateway): exclude Fable from OpenRouter models#4022

Merged
chrarnoldus merged 2 commits into
mainfrom
fix/exclude-fable-openrouter-list
Jun 15, 2026
Merged

fix(ai-gateway): exclude Fable from OpenRouter models#4022
chrarnoldus merged 2 commits into
mainfrom
fix/exclude-fable-openrouter-list

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • Exclude Claude Fable models from the enhanced OpenRouter model list, alongside forbidden free models.
  • Narrow isFableModel matching to the claude-fable substring so unrelated model IDs containing fable retain existing behavior.
  • Preserve all existing Fable routing and optimization logic elsewhere.

Verification

  • Not manually tested before PR creation, per requested operation ordering.

Visual Changes

N/A

Reviewer Notes

The exclusion applies only while constructing the enhanced OpenRouter model list; no broader model blocking or optimization changes are included.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus self-assigned this Jun 15, 2026
@kilo-code-bot

kilo-code-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

The incremental change to the previously reviewed commit removes a redundant integration-level test for Fable model filtering in favor of the simpler, more direct isFableModel unit test. The removal is clean and introduces no regressions — the behavior is already tested at the correct level of granularity.

Files Reviewed (3 files)
  • apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts
Previous Review Summary (commit dc3dd02)

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

Previous review (commit dc3dd02)

Status: No Issues Found | Recommendation: Merge

The narrowed isFableModel matching correctly prevents false positives on unrelated model IDs containing "fable" (e.g. vendor/fable-model). All existing callers in Vercel routing, gateway model fallback, and model settings use full Anthropic model IDs that still contain claude-fable, so no existing behavior is broken. The OpenRouter enhanced model list exclusion is placed correctly alongside the existing isForbiddenFreeModel filter. Tests cover both the narrowed matcher function directly and the integration with getEnhancedOpenRouterModels.

Files Reviewed (3 files)
  • apps/web/src/lib/ai-gateway/providers/anthropic.constants.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.ts
  • apps/web/src/lib/ai-gateway/providers/openrouter/index.test.ts

Reviewed by deepseek-v4-pro-20260423 · 107,854 tokens

Review guidance: REVIEW.md from base branch main

Remove the test suite for Fable model filtering in OpenRouter provider
as the filtering logic has been superseded or removed.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@chrarnoldus chrarnoldus merged commit 0588854 into main Jun 15, 2026
16 checks passed
@chrarnoldus chrarnoldus deleted the fix/exclude-fable-openrouter-list branch June 15, 2026 14: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.

2 participants