2026-04-02 20:20:35 +08:00
|
|
|
{
|
|
|
|
|
"name": "ZHIPU-AI",
|
2026-07-03 18:27:32 +08:00
|
|
|
"rank": 993,
|
2026-04-20 15:31:12 +08:00
|
|
|
"url": {
|
|
|
|
|
"default": "https://open.bigmodel.cn/api/paas/v4"
|
|
|
|
|
},
|
2026-04-02 20:20:35 +08:00
|
|
|
"url_suffix": {
|
|
|
|
|
"chat": "chat/completions",
|
|
|
|
|
"async_chat": "async/chat/completions",
|
|
|
|
|
"async_result": "async-result",
|
2026-04-28 12:59:01 +08:00
|
|
|
"embedding": "embeddings",
|
2026-04-23 10:16:20 +08:00
|
|
|
"rerank": "rerank",
|
2026-05-25 16:50:06 -10:00
|
|
|
"ocr": "layout_parsing",
|
2026-05-21 17:53:18 -10:00
|
|
|
"asr": "audio/transcriptions",
|
|
|
|
|
"tts": "audio/speech",
|
Go: implement ListModels in ZhipuAI driver (#14886)
### What problem does this PR solve?
Fixes #14884
The ZhipuAI Go driver in `internal/entity/models/zhipu-ai.go` had a stub
`ListModels` method that always returned `"zhipu-ai, no such method"`.
The DeepSeek, Gitee, NVIDIA, OpenAI, SiliconFlow, and OpenRouter drivers
in the same package already implement `ListModels` against the
OpenAI-compatible `/models` endpoint, and the model picker UI relies on
it. This PR brings ZhipuAI in line with that pattern.
### Changes
- `internal/entity/models/zhipu-ai.go`: implement
`ZhipuAIModel.ListModels`.
- Resolve region with default fallback.
- GET `${BaseURL[region]}/${URLSuffix.Models}` (resolves to
`https://open.bigmodel.cn/api/paas/v4/models` with the default region).
- Send `Authorization: Bearer <api_key>` when an API key is configured.
Omit the header when the key is empty, so an unauthenticated caller gets
a clear `401` from upstream.
- Surface non-200 responses with the upstream status line and body,
matching the other Go drivers.
- Parse the response via the package-level `DSModelList` / `DSModel`
types already used by DeepSeek, Gitee, and SiliconFlow.
- When the response includes `owned_by`, render the entry as
`id@owned_by`, matching the convention of Gitee and SiliconFlow.
- `conf/models/zhipu-ai.json`: add `"models": "models"` to `url_suffix`.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
2026-05-13 10:39:14 +02:00
|
|
|
"files": "files",
|
2026-05-25 16:50:06 -10:00
|
|
|
"models": "models"
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
2026-04-28 16:05:15 +08:00
|
|
|
"class": "glm",
|
2026-04-02 20:20:35 +08:00
|
|
|
"models": [
|
2026-04-23 10:16:20 +08:00
|
|
|
{
|
|
|
|
|
"name": "glm-5",
|
|
|
|
|
"max_tokens": 204800,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-23 10:16:20 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-5-turbo",
|
|
|
|
|
"max_tokens": 204800,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-23 10:16:20 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-5v-turbo",
|
|
|
|
|
"max_tokens": 204800,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-23 10:16:20 +08:00
|
|
|
},
|
2026-04-02 20:20:35 +08:00
|
|
|
{
|
|
|
|
|
"name": "glm-4.7",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 204800,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
2026-04-23 10:16:20 +08:00
|
|
|
"name": "glm-4.7-flashx",
|
|
|
|
|
"max_tokens": 204800,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-23 10:16:20 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.6",
|
|
|
|
|
"max_tokens": 204800,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
2026-04-17 18:05:33 +08:00
|
|
|
{
|
|
|
|
|
"name": "glm-4.6v-Flash",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-17 18:05:33 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat",
|
2026-04-20 15:31:12 +08:00
|
|
|
"vision"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-23 10:16:20 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.5",
|
|
|
|
|
"max_tokens": 131072,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-17 18:05:33 +08:00
|
|
|
},
|
2026-04-02 20:20:35 +08:00
|
|
|
{
|
|
|
|
|
"name": "glm-4.5-x",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.5-air",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.5-airx",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.5-flash",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4.5v",
|
|
|
|
|
"max_tokens": 64000,
|
|
|
|
|
"model_types": [
|
2026-04-20 15:31:12 +08:00
|
|
|
"vision"
|
2026-04-27 20:35:47 +08:00
|
|
|
],
|
|
|
|
|
"thinking": {
|
|
|
|
|
"default_value": true,
|
|
|
|
|
"clear_thinking": true
|
2026-06-26 11:37:51 +08:00
|
|
|
},
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
2026-04-27 20:35:47 +08:00
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-plus",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-0520",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-airx",
|
|
|
|
|
"max_tokens": 8000,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-air",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-flash",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-flashx",
|
2026-04-23 10:16:20 +08:00
|
|
|
"max_tokens": 131072,
|
2026-04-02 20:20:35 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-long",
|
|
|
|
|
"max_tokens": 1000000,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4v",
|
|
|
|
|
"max_tokens": 2000,
|
|
|
|
|
"model_types": [
|
2026-04-20 15:31:12 +08:00
|
|
|
"vision"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-4-9b",
|
|
|
|
|
"max_tokens": 8192,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"chat"
|
2026-06-26 11:37:51 +08:00
|
|
|
],
|
|
|
|
|
"tools": {
|
|
|
|
|
"support": true
|
|
|
|
|
}
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "embedding-2",
|
|
|
|
|
"max_tokens": 512,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"embedding"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "embedding-3",
|
|
|
|
|
"max_tokens": 512,
|
|
|
|
|
"model_types": [
|
|
|
|
|
"embedding"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-02 20:20:35 +08:00
|
|
|
},
|
|
|
|
|
{
|
2026-05-09 17:41:54 +08:00
|
|
|
"name": "glm-asr-2512",
|
2026-04-02 20:20:35 +08:00
|
|
|
"max_tokens": 4096,
|
|
|
|
|
"model_types": [
|
2026-04-20 15:31:12 +08:00
|
|
|
"asr"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-20 15:31:12 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-tts",
|
|
|
|
|
"model_types": [
|
|
|
|
|
"tts"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-20 15:31:12 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "glm-ocr",
|
|
|
|
|
"model_types": [
|
|
|
|
|
"ocr"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-20 15:31:12 +08:00
|
|
|
},
|
|
|
|
|
{
|
2026-05-09 17:41:54 +08:00
|
|
|
"name": "rerank",
|
2026-04-20 15:31:12 +08:00
|
|
|
"model_types": [
|
|
|
|
|
"rerank"
|
2026-04-23 10:16:20 +08:00
|
|
|
]
|
2026-04-02 20:20:35 +08:00
|
|
|
}
|
2026-04-27 20:35:47 +08:00
|
|
|
]
|
2026-05-21 17:53:18 -10:00
|
|
|
}
|