chore: update model lists for frequently used channels - #3221
Conversation
WalkthroughThis 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
🧹 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*, andgpt-5.4*variants don't have corresponding entries insetting/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, andgpt-realtime-1.5models 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-*, andveo-*model families don't have corresponding entries insetting/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
📒 Files selected for processing (7)
relay/channel/claude/constants.gorelay/channel/codex/constants.gorelay/channel/gemini/constant.gorelay/channel/minimax/constants.gorelay/channel/moonshot/constants.gorelay/channel/openai/constant.gorelay/channel/zhipu_4v/constants.go
chore: update model lists for frequently used channels
更新常用渠道的模型列表,移除了部分过时的模型
Summary by CodeRabbit