Skip to content

Hide delisted/redirect aliases from the model list - #187

Merged
VickyXAI merged 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:fix/hide-redirect-aliases-from-model-list
Jun 23, 2026
Merged

VickyXAI merged 1 commit into
BlockRunAI:mainfrom
KillerQueen-Z:fix/hide-redirect-aliases-from-model-list

Conversation

@KillerQueen-Z

@KillerQueen-Z KillerQueen-Z commented Jun 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

MODEL_ALIASES mixes two kinds of entries:

  • friendly short names — free, opus, gpt-120b
  • full provider/model redirects — 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_MODELS turns 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/models showed "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 via resolveModelAlias() (which reads MODEL_ALIASES directly), so pinned callers don't break. One-line filter in ALIAS_MODELS; MODEL_ALIASES and 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 models
  • free/deepseek-v4-flash (the real target) → still listed
  • resolveModelAlias('free/deepseek-v4-pro') → still free/deepseek-v4-flash (callable)
  • npm run typecheck ✓ · npm run build ✓ · model tests 7/7 ✓

Summary by CodeRabbit

  • Documentation
    • Updated documentation for model naming and availability to clarify which model identifiers are publicly advertised versus those reserved for backward compatibility.

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.
@coderabbitai

coderabbitai Bot commented Jun 23, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 02969db0-30cd-401f-9979-a66ac6033b7c

📥 Commits

Reviewing files that changed from the base of the PR and between 7dca213 and 8b77089.

📒 Files selected for processing (1)
  • src/models.ts

📝 Walkthrough

Walkthrough

The block comment above the ALIAS_MODELS constant in src/models.ts is expanded to explicitly state that MODEL_ALIASES entries used for backward-compatibility or delisted redirects must not appear in /v1/models responses or picker lists, while still remaining callable through resolveModelAlias().

Changes

ALIAS_MODELS Comment Clarification

Layer / File(s) Summary
ALIAS_MODELS block comment expansion
src/models.ts
Replaces the existing comment with expanded guidance distinguishing listable friendly model names from delisted/backward-compat MODEL_ALIASES entries that must not be surfaced in /v1/models or picker lists but remain callable via resolveModelAlias().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Hide delisted/redirect aliases from the model list' directly and clearly describes the main change: filtering the model list to exclude redirect aliases for delisted models while preserving their callable functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@VickyXAI
VickyXAI merged commit e1c6251 into BlockRunAI:main Jun 23, 2026
3 of 4 checks passed
VickyXAI pushed a commit that referenced this pull request Jun 23, 2026
…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/.
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