Repository navigation
Conversation
MODEL_ALIASES mixes friendly short names ("free", "opus") with full
provider/model backward-compat & delisted redirects (e.g. free/deepseek-v4-pro
-> free/deepseek-v4-flash after V4 Pro was delisted 2026-04-30). ALIAS_MODELS
turned every entry into a listable model, so dead slugs surfaced in /v1/models
and pickers as if real (a downstream Codex picker showed "DeepSeek V4 Pro (free)"
that actually routed to v4-flash).
Only surface friendly short aliases (no "/"); full-slug redirects whose target
is already listed are skipped. They stay fully callable via resolveModelAlias()
— only their bogus listing is removed. Verified: free/deepseek-v4-pro et al. gone
from the list, still resolve to v4-flash; model tests pass.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe block comment above the ChangesALIAS_MODELS Comment Clarification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…odels The model-list builder advertised full provider/model redirect aliases (backward-compat + delisted slugs like free/deepseek-v4-pro) as if they were real, available models. ALIAS_MODELS now only surfaces friendly short aliases (no '/'); slug redirects are skipped from /v1/models but stay fully callable via resolveModelAlias(). Feature landed in #187 (KillerQueen-Z). Also formats test/test-e2e.ts (pre-existing prettier failure that was red-lining the Lint & Typecheck required check on every PR) and gitignores .pytest_cache/.
Problem
MODEL_ALIASESmixes two kinds of entries:free,opus,gpt-120bprovider/modelredirects — backward-compat + delisted models, e.g.free/deepseek-v4-pro→free/deepseek-v4-flash(V4 Pro delisted 2026-04-30 when the NVIDIA host hung).ALIAS_MODELSturns every alias into a listable model, so dead slugs leak into/v1/models(and any downstream picker) as if they were real, available models. A Codex model picker built from/v1/modelsshowed "DeepSeek V4 Pro (free)" that silently routes to v4-flash — misleading twice over (not Pro, not really there).Fix
Only surface friendly short aliases (no
/). Full-slug redirect aliases are skipped from the advertised list — their target is a real model that's already listed, so nothing disappears. They remain fully callable viaresolveModelAlias()(which readsMODEL_ALIASESdirectly), so pinned callers don't break. One-line filter inALIAS_MODELS;MODEL_ALIASESand resolution are untouched.Verification
free/deepseek-v4-pro,nvidia/deepseek-v4-pro,xai/grok-code-fast-1,free/mistral-large-3-675b→ gone from the listed modelsfree/deepseek-v4-flash(the real target) → still listedresolveModelAlias('free/deepseek-v4-pro')→ stillfree/deepseek-v4-flash(callable)npm run typecheck✓ ·npm run build✓ · model tests 7/7 ✓Summary by CodeRabbit