Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/fr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ promotionnels de Cline ne sont accessibles que dans l'IDE ou la CLI Cline, pas p
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (liste statique)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Forfait à jetons (par défaut) : `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · Facturation à l'usage : `https://dashscope.aliyuncs.com/compatible-mode/v1` · ou personnalisé |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -495,7 +496,7 @@ une barre trompeuse.
> programmation interactifs. L'automatisation générale par API, les services applicatifs personnalisés et les
> traitements par lots non interactifs sont interdits et peuvent entraîner la suspension de la clé du forfait.

> **Deux routes GLM :** `zai` correspond à l'abonnement international Z.AI Coding Plan ; `zhipu-bigmodel`
> **Facturation GLM :** `zai` correspond à l'abonnement international Z.AI Coding Plan ; `zhipu-bigmodel`
> correspond au point de terminaison national BigModel de Zhipu, facturé à l'usage. Les hôtes, les clés et la
> facturation diffèrent : une clé émise pour l'un ne permet pas de s'authentifier auprès de l'autre.

Expand Down
37 changes: 36 additions & 1 deletion docs-site/src/content/docs/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ free-experimentation model.
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| BigModel Coding Plan (Responses, static roster) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token plan (default): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · Pay as you go: `https://dashscope.aliyuncs.com/compatible-mode/v1` · or Custom |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -582,10 +583,44 @@ negative, or internally inconsistent billing totals produce no report rather tha
> interactive coding tools only. General API automation, custom application backends, and
> non-interactive batch use are prohibited and may cause the plan key to be suspended.

> **Two GLM routes:** `zai` is the Z.AI international coding-plan subscription; `zhipu-bigmodel`
> **GLM billing routes:** `zai` is the Z.AI international coding-plan subscription; `zhipu-bigmodel`
> is Zhipu's domestic BigModel pay-as-you-go endpoint. Different hosts, different keys, different
> billing — a key issued for one will not authenticate against the other.

### BigModel Coding Plan over Responses

Select **Zhipu AI — BigModel Coding Plan (Responses)** (`zhipu-bigmodel-responses`)
for the `openai-responses` endpoint `https://open.bigmodel.cn/api/v1`. This is separate
from `zhipu-bigmodel-coding`, which uses Chat Completions at `/api/coding/paas/v4`.

The preset uses a **static roster** (`liveModels: false`) taken from the
[official BigModel Codex example](https://docs.bigmodel.cn/cn/coding-plan/tool/codex.md):

| Model | Context tokens | Upstream selectable effort | Default effort | Reasoning summaries |
| --- | ---: | --- | --- | --- |
| `glm-5.3` | 1,048,576 | `low`, `high`, `max` | `max` | Supported |
| `glm-5-turbo` | 204,800 | None (empty list) | `max` | Supported |

Both entries declare upstream text-only input. The Codex catalog advertises text and
image because opencodex's existing vision sidecar can describe images for text-only
models. Image handling requires an available, enabled vision sidecar; this does not
declare native BigModel image support.

The default model is `glm-5.3`; Responses reasoning content is preserved on replay.
The existing Codex export adds its compatibility
`ultra` tier to GLM-5.3 and omits Turbo's default-effort field because Turbo has no
selectable ladder; the provider metadata still records `max` for both models.
For Turbo, outgoing Responses requests omit `reasoning.effort`, including a caller's
`max` or `ultra`, while preserving requested reasoning summaries. This leaves effort
selection to the upstream default; opencodex does not inject a selectable or wire `max`.

The example's `models.json` is a local catalog file, not a documented HTTP model-list
response. This preset does not perform live model discovery. `glm-5.3-flash` is not
seeded here because its exact Responses metadata is not verified. An existing custom
provider with the same name keeps its configured destination and metadata.
CLI key login also skips the undocumented `/models` probe and reports validation as
unknown; successful key authentication is established by a subsequent inference request.

### Multiple API keys

Key-based providers can also keep multiple keys. Adding a key through the Providers page stores it
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ja/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Cline IDE/CLI のみで API からは使えません。`minimax/minimax-m2.5`
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (静的モデル一覧)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | トークンプラン(デフォルト): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · 従量課金: `https://dashscope.aliyuncs.com/compatible-mode/v1` · またはカスタム |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -338,7 +339,7 @@ model ごとに capability が異なるため、provider 全体の parallel tool
> コーディングツール専用としています。一般的な API 自動化、カスタムアプリのバックエンド、
> 非対話型バッチ利用は禁止されており、プランキーが停止される場合があります。

> **GLM の経路は 2 つあります:** `zai` は Z.AI の国際コーディングプラン契約、`zhipu-bigmodel`
> **GLM の課金経路:** `zai` は Z.AI の国際コーディングプラン契約、`zhipu-bigmodel`
> は Zhipu の中国国内向け BigModel 従量課金エンドポイントです。ホストもキーも課金も別で、
> 一方で発行したキーはもう一方では認証されません。

Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ko/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ Cline IDE/CLI에서만 제공되며 API로는 사용할 수 없습니다. `minim
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (정적 모델 목록)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token plan(기본): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · 종량제: `https://dashscope.aliyuncs.com/compatible-mode/v1` · 또는 사용자 지정 |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -328,7 +329,7 @@ provider 전체 parallel tool call이나 OpenAI `reasoning_effort`를 광고하
> 안내합니다. 일반 API 자동화, 사용자 애플리케이션 백엔드 및 비대화형 일괄 호출은 금지되며
> 플랜 키가 정지될 수 있습니다.

> **GLM 경로는 두 개입니다:** `zai`는 Z.AI 국제 코딩 플랜 구독이고, `zhipu-bigmodel`은
> **GLM 과금 경로:** `zai`는 Z.AI 국제 코딩 플랜 구독이고, `zhipu-bigmodel`은
> Zhipu의 중국 내수 BigModel 종량제 엔드포인트입니다. 호스트도 키도 과금도 다르며, 한쪽에서
> 발급한 키는 다른 쪽에서 인증되지 않습니다.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,12 @@ container usually has no unlocked keychain session, so requests would fail close
`${ENV_VAR}` reference in the service environment there instead. Env references are left untouched
by `store`.

The `zhipu-bigmodel-responses` preset seeds `glm-5.3` and `glm-5-turbo` with
`liveModels: false` for `https://open.bigmodel.cn/api/v1`. Its static roster and
per-model context, effort, and summary metadata come from the
[BigModel Responses guide](/guides/providers/#bigmodel-coding-plan-over-responses).
The official local `models.json` example does not establish a live `/models` API.

With `liveModels: false`, an empty or omitted `models` list seeds the configured `defaultModel`
first, followed by `retainModels`; duplicate ids are removed while preserving first occurrence.
A nonempty explicit `models` list instead seeds `models` followed by `retainModels`, without
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/ru/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ opencodex поставляется с 79 встроенными пресетам
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (статический список)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token plan (по умолчанию): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · Pay as you go: `https://dashscope.aliyuncs.com/compatible-mode/v1` · или Custom |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -367,7 +368,7 @@ plan. Ключ создаётся в [дашборде Featherless](https://feat
> в интерактивных инструментах программирования. Автоматизация общего API, серверы пользовательских
> приложений и неинтерактивные пакетные вызовы запрещены и могут привести к блокировке ключа плана.

> **Два маршрута GLM:** `zai` — это международная подписка Z.AI на coding-план, а `zhipu-bigmodel` —
> **Тарификация GLM:** `zai` — это международная подписка Z.AI на coding-план, а `zhipu-bigmodel` —
> внутренняя китайская конечная точка BigModel с оплатой по факту использования. Разные хосты,
> разные ключи, разная тарификация: ключ от одного сервиса не подойдёт к другому.

Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/tr/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ yalnızca Cline IDE/CLI içinde mevcuttur; `minimax/minimax-m2.5` belgelenmiş A
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Kodlama) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (statik model listesi)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token planı (varsayılan): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · Kullandıkça öde: `https://dashscope.aliyuncs.com/compatible-mode/v1` · veya Özel |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -537,7 +538,7 @@ tutarsız faturalandırma toplamları yanıltıcı bir çubuk yerine hiçbir rap

> **Tencent Cloud Coding Plan kullanım kısıtlaması:** Tencent bu aboneliği yalnızca etkileşimli kodlama araçları için belgeler. Genel API otomasyonu, özel uygulama arka uçları ve etkileşimsiz toplu kullanım yasaktır ve plan anahtarının askıya alınmasına neden olabilir.

> **İki GLM rotası:** `zai`, Z.AI uluslararası kodlama planı aboneliğidir; `zhipu-bigmodel`, Zhipu'nun yerel BigModel kullandıkça öde uç noktasıdır. Farklı ana bilgisayarlar, farklı anahtarlar, farklı faturalandırma — biri için verilen bir anahtar diğerine karşı kimlik doğrulaması yapmaz.
> **GLM faturalandırma rotaları:** `zai`, Z.AI uluslararası kodlama planı aboneliğidir; `zhipu-bigmodel`, Zhipu'nun yerel BigModel kullandıkça öde uç noktasıdır. Farklı ana bilgisayarlar, farklı anahtarlar, farklı faturalandırma — biri için verilen bir anahtar diğerine karşı kimlik doğrulaması yapmaz.

### Birden fazla API anahtarı

Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/zh-cn/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Cline IDE/CLI 中提供,不能通过 API 使用;`minimax/minimax-m2.5` 是
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| 智谱 AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (静态模型列表)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token plan(默认): `https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · 按量付费: `https://dashscope.aliyuncs.com/compatible-mode/v1` · 或自定义 |
| 腾讯云 Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -316,7 +317,7 @@ Bearer key。公开模型列表只保留同时报告 `model_type: chat` 和 `cha
> **腾讯云 Coding Plan 使用限制:**腾讯将此订阅限定为交互式编程工具使用。禁止通用 API
> 自动化、自定义应用后端和非交互式批量调用;违规使用可能导致套餐密钥被停用。

> **两条 GLM 线路:**`zai` 是 Z.AI 的国际 coding plan 订阅,`zhipu-bigmodel` 是智谱国内
> **GLM 计费线路:**`zai` 是 Z.AI 的国际 coding plan 订阅,`zhipu-bigmodel` 是智谱国内
> BigModel 的按量付费端点。二者主机、密钥与计费均不同,为其中一方签发的密钥无法在另一方通过鉴权。

### 多个 API 密钥
Expand Down
3 changes: 2 additions & 1 deletion docs-site/src/content/docs/zh-tw/guides/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ IDE/CLI,不透過 API;`minimax/minimax-m2.5` 是文件列出的 API 免費
| NVIDIA NIM | `https://integrate.api.nvidia.com/v1` |
| Z.AI (GLM Coding) | `https://api.z.ai/api/coding/paas/v4` |
| Zhipu AI (BigModel) | `https://open.bigmodel.cn/api/paas/v4` |
| [BigModel Coding Plan — Responses (靜態模型清單)](/guides/providers/#bigmodel-coding-plan-over-responses) | `https://open.bigmodel.cn/api/v1` |
| Qwen Cloud | Token plan(預設):`https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1` · pay as you go:`https://dashscope.aliyuncs.com/compatible-mode/v1` · 或 Custom |
| Tencent Cloud Coding Plan | `https://api.lkeap.cloud.tencent.com/coding/v3` |
| SiliconFlow | `https://api.siliconflow.cn/v1` |
Expand Down Expand Up @@ -418,7 +419,7 @@ quota probe 只會把 active key 傳送到 canonical A6API host,並拒絕 redi
> **Tencent Cloud Coding Plan 使用限制:** Tencent 文件將此訂閱限定為互動式 coding tool。一般 API
> automation、自訂 application backend 與非互動 batch 使用都被禁止,並可能造成 plan key 被停用。

> **兩條 GLM 路徑:** `zai` 是 Z.AI 國際 Coding Plan 訂閱;`zhipu-bigmodel` 是智譜國內 BigModel
> **GLM 計費路徑:** `zai` 是 Z.AI 國際 Coding Plan 訂閱;`zhipu-bigmodel` 是智譜國內 BigModel
> pay-as-you-go endpoint。兩者 host、key 與 billing 都不同;其中一邊發出的 key 無法在另一邊通過認證。

### 多個 API 金鑰
Expand Down
7 changes: 7 additions & 0 deletions src/adapters/openai-responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,13 @@ function mapRoutedResponsesReasoningEffort(
if (provider.authMode === "forward") return body;
if (configuredReasoningEfforts(provider, modelId) === undefined) return body;
if (!isPlainObject(body) || !isPlainObject(body.reasoning)) return body;
const declaredEfforts = modelRecordValue(provider.modelReasoningEfforts, modelId) ?? provider.reasoningEfforts;
// An explicitly empty ladder means no effort control, not no reasoning output.
// Omit only effort so the upstream default applies; unknown/non-rankable ladders stay untouched.
if (declaredEfforts?.length === 0 && Object.hasOwn(body.reasoning, "effort")) {
const { effort: _effort, ...reasoning } = body.reasoning;
return { ...body, reasoning: Object.keys(reasoning).length > 0 ? reasoning : undefined };
}
const requested = body.reasoning.effort;
if (typeof requested !== "string") return body;

Expand Down
1 change: 1 addition & 0 deletions src/generated/model-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const PROVIDER_ALIASES: Record<string, string> = {
"moonshot": "moonshot",
"zhipu-bigmodel": "zai",
"zhipu-bigmodel-coding": "zai",
"zhipu-bigmodel-responses": "zai",
"minimax": "minimax",
"minimax-cn": "minimax"
} as const;
Expand Down
31 changes: 31 additions & 0 deletions src/providers/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2544,6 +2544,37 @@ export const PROVIDER_REGISTRY: readonly ProviderRegistryEntry[] = [
// yields an empty picker at runtime.
note: "Domestic BigModel Coding Plan endpoint (open.bigmodel.cn)",
},
// Narrowed carry of #3641: the official Codex example declares a local static catalog,
// not an HTTP /models contract. Keep Responses separate from the Chat endpoint above.
// Source: https://docs.bigmodel.cn/cn/coding-plan/tool/codex.md (checked 2026-09-07).
{
id: "zhipu-bigmodel-responses",
label: "Zhipu AI — BigModel Coding Plan (Responses)",
baseUrl: "https://open.bigmodel.cn/api/v1",
adapter: "openai-responses",
authKind: "key",
dashboardUrl: "https://bigmodel.cn/console/usercenter/apikeys",
defaultModel: "glm-5.3",
models: ["glm-5.3", "glm-5-turbo"],
liveModels: false,
// The local Codex catalog does not establish an authenticated HTTP /models contract.
apiKeyValidation: "unknown",
jawcodeBundle: "zai",
// A pre-existing same-named custom provider must retain its destination and key boundary.
preserveCustomDestination: true,
modelContextWindows: { "glm-5.3": 1_048_576, "glm-5-turbo": 204_800 },
modelInputModalities: { "glm-5.3": ["text"], "glm-5-turbo": ["text"] },
modelReasoningEfforts: {
"glm-5.3": ZAI_GLM_53_REASONING_EFFORTS,
// Explicitly empty: Turbo must not inherit the generic selectable effort ladder.
"glm-5-turbo": [],
},
modelDefaultReasoningEfforts: { "glm-5.3": "max", "glm-5-turbo": "max" },
modelSupportsReasoningSummaries: { "glm-5.3": true, "glm-5-turbo": true },
// Responses replay uses this provider-level flag, not the Chat-path model list.
preserveResponsesReasoningContent: true,
note: "Domestic BigModel Coding Plan Responses endpoint; static model roster",
},
{ id: "nanogpt", label: "NanoGPT", baseUrl: "https://nano-gpt.com/api/v1", adapter: "openai-chat", authKind: "key", dashboardUrl: "https://nano-gpt.com/api" },
{ id: "synthetic", label: "Synthetic", baseUrl: "https://api.synthetic.new/openai/v1", adapter: "openai-chat", authKind: "key", dashboardUrl: "https://synthetic.new" },
// SiliconFlow publishes an OpenAI-compatible chat endpoint and a dynamic model catalog. Do not
Expand Down
Loading
Loading