Skip to content

chore: update model lists for frequently used channels - #3221

Merged
seefs001 merged 1 commit into
QuantumNous:mainfrom
RedwindA:chore/updateModelList
Mar 12, 2026
Merged

chore: update model lists for frequently used channels#3221
seefs001 merged 1 commit into
QuantumNous:mainfrom
RedwindA:chore/updateModelList

Conversation

@RedwindA

@RedwindA RedwindA commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

更新常用渠道的模型列表,移除了部分过时的模型

Summary by CodeRabbit

  • New Features
    • Expanded AI model support across multiple providers: Claude (added Sonnet 4.6), OpenAI (added GPT-5 family, extended GPT-4o variants with new audio and realtime models), Gemini (updated with 2.5 models and new specialized variants), MiniMax (added M2.5 models), Moonshot (updated K2 variants), Codex (new GPT-5 versions), and Zhipu (added GLM 4.6, 4.7, and GLM-5 models).

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

This PR updates supported model identifiers across multiple AI provider channels (Claude, Codex, Gemini, MiniMax, Moonshot, OpenAI, and Zhipu 4V) by adding new models and replacing deprecated ones in their respective ModelList constants. No changes to function signatures or control flow.

Changes

Cohort / File(s) Summary
Claude Model Updates
relay/channel/claude/constants.go
Added "claude-sonnet-4-6" to ModelList for Claude provider support.
Codex Model Updates
relay/channel/codex/constants.go
Added "gpt-5.3-codex-spark" and "gpt-5.4" to baseModelList; these entries undergo compact suffix transformation via withCompactModelSuffix logic.
Gemini Model Updates
relay/channel/gemini/constant.go
Substantially reorganized ModelList with new entries (gemini-2.5-flash, gemini-flash-latest, numerous preview/gemma/imagen/veo variants) and removed/reordered prior stable, latest, and embedding entries.
MiniMax Model Updates
relay/channel/minimax/constants.go
Replaced "MiniMax-M2.1-lightning" with "MiniMax-M2.1-highspeed" and added "MiniMax-M2.5" and "MiniMax-M2.5-highspeed" variants.
Moonshot Model Updates
relay/channel/moonshot/constants.go
Replaced three Moonshot v1 model entries with five Kimi K2 variants in ModelList.
OpenAI Model Updates
relay/channel/openai/constant.go
Expanded ModelList with extensive new models including gpt-3.5-turbo-instruct variants, gpt-4o audio/transcribe/diarize/search-preview combinations, gpt-4o-mini variants, gpt-5 family coverage, image models (gpt-image-1, gpt-image-1.5, dall-e-2), audio models, moderation models, and utility models (computer-use-preview, sora-2).
Zhipu 4V Model Updates
relay/channel/zhipu_4v/constants.go
Added four new entries to ModelList: "glm-4.6v", "glm-4.7", "glm-4.7-flash", and "glm-5".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • seefs001

Poem

🐰 Hop, hop, hooray! The model list grows,
New Claude, Gemini, and OpenAI flows,
Each channel now stronger, with models galore,
Zhipu, MiniMax, Moonshot—and plenty more! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore: update model lists for frequently used channels' accurately describes the main change—updating ModelList variables across multiple channel files to add new models and remove unsupported ones.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
relay/channel/openai/constant.go (2)

39-50: New GPT-5 family models will use default pricing ratio.

The extensive gpt-5-pro, gpt-5-search-api, gpt-5.1*, gpt-5.2*, gpt-5.3*, and gpt-5.4* variants don't have corresponding entries in setting/ratio_setting/model_ratio.go. These will fall back to the default ratio of 37.5.

If accurate billing is required, consider adding pricing entries for these models.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@relay/channel/openai/constant.go` around lines 39 - 50, The new GPT-5 model
name constants listed in relay/channel/openai/constant.go (e.g., "gpt-5-pro",
"gpt-5-search-api", "gpt-5.1*", "gpt-5.2*", "gpt-5.3*", "gpt-5.4*") currently
fall back to the default ratio (37.5) because they are missing from the model
ratio map in setting/ratio_setting/model_ratio.go; update model_ratio.go by
adding explicit entries for each of these model string keys with the correct
pricing ratio values (or adjust the default handling if you prefer a different
fallback), ensuring the map keys exactly match the constants in
relay/channel/openai/constant.go so billing uses the intended ratios.

55-60: New gpt-audio and gpt-realtime model families need pricing.

The gpt-audio, gpt-audio-mini, gpt-audio-1.5, gpt-realtime, gpt-realtime-mini, and gpt-realtime-1.5 models are not in the pricing map and will use the default ratio.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@relay/channel/openai/constant.go` around lines 55 - 60, The pricing map in
relay/channel/openai/constant.go is missing explicit entries for the new model
families listed ("gpt-audio", "gpt-audio-2025-08-28", "gpt-audio-mini",
"gpt-audio-mini-2025-10-06", "gpt-audio-mini-2025-12-15", "gpt-audio-1.5",
"gpt-realtime", "gpt-realtime-2025-08-28", "gpt-realtime-mini",
"gpt-realtime-mini-2025-10-06", "gpt-realtime-mini-2025-12-15",
"gpt-realtime-1.5"); add explicit entries for each of these keys to the existing
pricing map/ratio variable (the map defined in constant.go that currently
contains other model->ratio mappings) so they do not fall back to the default
ratio, using the appropriate ratio values consistent with similar families
(e.g., mirror the ratio used by the corresponding "gpt-*" family or the intended
audio/realtime rates).
relay/channel/gemini/constant.go (1)

20-27: New model families (gemma, imagen, veo) will use default pricing ratio.

The newly added gemma-*, imagen-*, and veo-* model families don't have corresponding entries in setting/ratio_setting/model_ratio.go. They will fall back to the default ratio of 37.5, which may not reflect their actual pricing.

Consider adding pricing entries if accurate billing is required for these models.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@relay/channel/gemini/constant.go` around lines 20 - 27, New model families
"gemma-*", "imagen-*", and "veo-*" were added to the constants but are not
present in the model ratio mapping, so they fall back to the default ratio
(37.5); open the ratio setting file where the ModelRatio map or GetModelRatio
function is defined (in ratio_setting/model_ratio.go) and add entries for the
"gemma-", "imagen-", and "veo-" model prefixes (or explicit model names) with
the appropriate pricing ratio values (or add a TODO/comment and a conservative
estimate if unknown) so these models no longer use the default fallback.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@relay/channel/gemini/constant.go`:
- Around line 20-27: New model families "gemma-*", "imagen-*", and "veo-*" were
added to the constants but are not present in the model ratio mapping, so they
fall back to the default ratio (37.5); open the ratio setting file where the
ModelRatio map or GetModelRatio function is defined (in
ratio_setting/model_ratio.go) and add entries for the "gemma-", "imagen-", and
"veo-" model prefixes (or explicit model names) with the appropriate pricing
ratio values (or add a TODO/comment and a conservative estimate if unknown) so
these models no longer use the default fallback.

In `@relay/channel/openai/constant.go`:
- Around line 39-50: The new GPT-5 model name constants listed in
relay/channel/openai/constant.go (e.g., "gpt-5-pro", "gpt-5-search-api",
"gpt-5.1*", "gpt-5.2*", "gpt-5.3*", "gpt-5.4*") currently fall back to the
default ratio (37.5) because they are missing from the model ratio map in
setting/ratio_setting/model_ratio.go; update model_ratio.go by adding explicit
entries for each of these model string keys with the correct pricing ratio
values (or adjust the default handling if you prefer a different fallback),
ensuring the map keys exactly match the constants in
relay/channel/openai/constant.go so billing uses the intended ratios.
- Around line 55-60: The pricing map in relay/channel/openai/constant.go is
missing explicit entries for the new model families listed ("gpt-audio",
"gpt-audio-2025-08-28", "gpt-audio-mini", "gpt-audio-mini-2025-10-06",
"gpt-audio-mini-2025-12-15", "gpt-audio-1.5", "gpt-realtime",
"gpt-realtime-2025-08-28", "gpt-realtime-mini", "gpt-realtime-mini-2025-10-06",
"gpt-realtime-mini-2025-12-15", "gpt-realtime-1.5"); add explicit entries for
each of these keys to the existing pricing map/ratio variable (the map defined
in constant.go that currently contains other model->ratio mappings) so they do
not fall back to the default ratio, using the appropriate ratio values
consistent with similar families (e.g., mirror the ratio used by the
corresponding "gpt-*" family or the intended audio/realtime rates).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b1b2cb32-7a84-4e76-af14-35702c599b13

📥 Commits

Reviewing files that changed from the base of the PR and between 122d5c0 and cd1b377.

📒 Files selected for processing (7)
  • relay/channel/claude/constants.go
  • relay/channel/codex/constants.go
  • relay/channel/gemini/constant.go
  • relay/channel/minimax/constants.go
  • relay/channel/moonshot/constants.go
  • relay/channel/openai/constant.go
  • relay/channel/zhipu_4v/constants.go

@seefs001
seefs001 merged commit 7a0ff73 into QuantumNous:main Mar 12, 2026
1 check passed
ennnnny pushed a commit to ennnnny/new-api that referenced this pull request Mar 17, 2026
chore: update model lists for frequently used channels
@RedwindA
RedwindA deleted the chore/updateModelList branch July 23, 2026 07:03
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