Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions shared/modelConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const CLAUDE_MODELS = {
{ value: "opusplan", label: "Opus Plan" },
{ value: "sonnet[1m]", label: "Sonnet [1M]" },
{ value: "opus[1m]", label: "Opus [1M]" },
{ value: "glm-4.7", label: "GLM-4.7 (智谱AI)" },
{ value: "glm-4-flash", label: "GLM-4 Flash" },
{ value: "glm-4-plus", label: "GLM-4 Plus" },
{ value: "glm-4-air", label: "GLM-4 Air" },
Comment on lines +23 to +26
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

What are the correct model identifiers for ZhipuAI GLM models when using their Anthropic-compatible API at https://open.bigmodel.cn/api/anthropic

💡 Result:

Correct model identifiers (the value of the model field) for ZhipuAI GLM models when calling the Anthropic-compatible API at https://open.bigmodel.cn/api/anthropic are: - glm-5.1 [1] - glm-5 [1] - glm-4.7 [1] These are the GLM model codes shown in ZhipuAI’s Anthropic API compatibility documentation, and the examples for base_url: https://open.bigmodel.cn/api/anthropic use the same model identifiers (e.g., glm-5.1, glm-4.7, glm-5). [1]

Citations:


Remove non-existent model identifiers.

The ZhipuAI Anthropic-compatible API documentation only supports glm-5.1, glm-5, and glm-4.7. The identifiers glm-4-flash, glm-4-plus, and glm-4-air do not exist in ZhipuAI's API and will cause runtime failures when users attempt to use them. Remove lines 24–26 or replace with documented model identifiers.

Additionally, line 23 mixes Chinese characters with English labels; consider using a consistent language approach.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/modelConstants.js` around lines 23 - 26, Remove the invalid model
entries "glm-4-flash", "glm-4-plus", and "glm-4-air" from the model list in
shared/modelConstants.js because they are not supported by ZhipuAI; replace or
add the supported identifiers "glm-5.1" and "glm-5" if you need more options,
and update the existing { value: "glm-4.7", label: "GLM-4.7 (智谱AI)" } entry to
use a consistent English label like "GLM-4.7 (ZhipuAI)" or "GLM-4.7" to avoid
mixed-language labels. Ensure the final array only contains the documented model
value strings ("glm-5.1", "glm-5", "glm-4.7") and their matching labels.

],

DEFAULT: "opus",
Expand Down