Skip to content

fix(models): allow newer model generations in dynamic model list - #1047

Merged
miurla merged 1 commit into
mainfrom
fix/model-fetch-next-gen
Sep 30, 2026
Merged

miurla merged 1 commit into
mainfrom
fix/model-fetch-next-gen

Conversation

@miurla

@miurla miurla commented Sep 30, 2026

Copy link
Copy Markdown
Owner

Summary

Self-hosted instances fetch the model list from each provider's API, then filter it with a hardcoded allowlist. The allowlist was pinned to gpt-5* for OpenAI and claude-{opus,sonnet,haiku}-4* for Anthropic, so newer models such as gpt-6-luna and the Claude 5 family were dropped even when the API returned them.

This switches both allowlists to match on generation number:

  • OpenAI: gpt-5 and later, plus o1 / o3 / o4 (older models such as gpt-4o stay excluded)
  • Anthropic: opus / sonnet / haiku / fable at generation 4 and later

The Gateway filter reuses the same functions, so openai/... and anthropic/... models are covered too.

Reported in #1040 (comment)

Test plan

  • Added tests for gpt-6-luna and Claude 5 models passing the filter
  • bun run test
  • bun format:check

The OpenAI and Anthropic allowlists were pinned to gpt-5 and claude-*-4,
so self-hosted instances filtered out gpt-6 and Claude 5 models even when
the provider API returned them. Match on generation number instead.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
morphic Ready Ready Preview Sep 30, 2026 9:20am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T09:23:17.529043Z 96448cf PR opened
🔒 Security Review ✅ Completed 2026-09-30T09:25:43.758426Z 96448cf PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@miurla
miurla merged commit a6af059 into main Sep 30, 2026
7 checks passed
@miurla
miurla deleted the fix/model-fetch-next-gen branch September 30, 2026 09:58

This branch was successfully deployed

1 active deployment
Preview — 96448cf5 Deployed Sep 30, 2026 by vercel[bot]
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.

1 participant