From a6ced98fd09dc72a34570c40059ce3e8fcddb417 Mon Sep 17 00:00:00 2001 From: fylorn <249551762+fylorn@users.noreply.github.com> Date: Sun, 11 Oct 2026 03:01:31 +0800 Subject: [PATCH] Docs for Lite 2026.10.15 - Features (en, zh-CN): relays and the enterprise gateway take an API key, OAuth stays for custom endpoints; Advanced settings; Next checks the connection, with Retry and Continue anyway; Copy link; sign-in goes straight to Models with the account on top. - Claude Code, Codex and failover guides (en, zh-CN): Next checks the connection; BigModel is the first site; Forward client identity is under Advanced settings; the button is Copy link. Co-Authored-By: Claude Opus 5.5 --- src/content/docs-lite/en/claude-code-other-models.md | 8 ++++---- src/content/docs-lite/en/codex-other-models.md | 2 +- src/content/docs-lite/en/failover-and-load-balancing.md | 2 +- src/content/docs-lite/en/features.md | 4 ++-- src/content/docs-lite/zh-CN/claude-code-other-models.md | 8 ++++---- src/content/docs-lite/zh-CN/codex-other-models.md | 2 +- .../docs-lite/zh-CN/failover-and-load-balancing.md | 2 +- src/content/docs-lite/zh-CN/features.md | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/content/docs-lite/en/claude-code-other-models.md b/src/content/docs-lite/en/claude-code-other-models.md index b4c6c67..7bb459a 100644 --- a/src/content/docs-lite/en/claude-code-other-models.md +++ b/src/content/docs-lite/en/claude-code-other-models.md @@ -12,11 +12,11 @@ ThinkWatch Lite connects Claude Code to a gateway on the same computer, which fo 1. On the Upstreams page, choose **New upstream**. The first step, **Service**, lists the services in three groups, with a search box; picking one goes straight to **Connection**, which asks only for what that service needs: - **DeepSeek** fills in `https://api.deepseek.com/anthropic` and the protocol. Enter the **API key**. - - GLM with a key: **Z.ai / BigModel**. Choose the **Site**, **Z.ai (international)** or **BigModel (mainland China)**, which sets the Anthropic-compatible address, and enter the **API key**. GLM's OpenAI-compatible address also works from ThinkWatch Lite 2026.10.5, with **Custom** and **Protocol** set to **OpenAI Chat Completions**: `https://api.z.ai/api/paas/v4` or `https://open.bigmodel.cn/api/paas/v4`, and `…/api/coding/paas/v4` on a GLM Coding Plan. Claude Code's requests are then converted, so the Anthropic address is the more direct choice. - - GLM with an account: **Z.ai / BigModel**, with **Authentication** set to **Account sign-in**. Choose the **Site**, tick **Acknowledge the notes above**, choose **Sign in with the browser** and authorize; to sign in from a browser other than the default one, choose **Copy sign-in link** instead. The app creates an API key named `thinkwatch` on the account and saves the upstream. - - Kimi: **Custom**, with the Anthropic-compatible base URL from Kimi's documentation and **Protocol** set to **Anthropic Messages**. For Kimi For Coding, also turn on **Forward client identity**. + - GLM with a key: **Z.ai / BigModel**. Choose the **Site**, **BigModel (mainland China)** or **Z.ai (international)**, which sets the Anthropic-compatible address, and enter the **API key**. GLM's OpenAI-compatible address also works from ThinkWatch Lite 2026.10.5, with **Custom** and **Protocol** set to **OpenAI Chat Completions**: `https://api.z.ai/api/paas/v4` or `https://open.bigmodel.cn/api/paas/v4`, and `…/api/coding/paas/v4` on a GLM Coding Plan. Claude Code's requests are then converted, so the Anthropic address is the more direct choice. + - GLM with an account: **Z.ai / BigModel**, with **Authentication** set to **Account sign-in**. Choose the **Site**, tick **Acknowledge the notes above**, choose **Sign in with the browser** and authorize; to sign in from a browser other than the default one, choose **Copy link** instead. The app creates an API key named `thinkwatch` on the account and saves the upstream. + - Kimi: **Custom**, with the Anthropic-compatible base URL from Kimi's documentation and **Protocol** set to **Anthropic Messages**. For Kimi For Coding, also turn on **Forward client identity** under **Advanced settings**. - With a key, **Check connection** verifies the address and key and fetches the model list at no cost; choose **Next** twice, then **Create**. After an account sign-in the upstream is already saved; choose **Next** twice, then **Done**. + With a key, **Next** verifies the address and key and fetches the model list at no cost; choose **Next** twice more, then **Create**. After an account sign-in the upstream is already saved and the dialog is on **Models**; choose **Next**, then **Done**. 2. On the Clients page, choose **Connect…** on the Claude Code row. The dialog lists the fields that change in `~/.claude/settings.json`: `env.ANTHROPIC_BASE_URL`, `env.ANTHROPIC_AUTH_TOKEN` (a new key named `claude-code`) and `env.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`. Choose **Connect**. 3. Choose how the model is selected: - **By name.** In Claude Code, `/model ` switches to the model, and `claude --model ` starts with it. To map Claude Code's model aliases to it, add these to the `env` block of `~/.claude/settings.json`; the Haiku one also runs background tasks. diff --git a/src/content/docs-lite/en/codex-other-models.md b/src/content/docs-lite/en/codex-other-models.md index f6b9db9..15cd8b0 100644 --- a/src/content/docs-lite/en/codex-other-models.md +++ b/src/content/docs-lite/en/codex-other-models.md @@ -10,7 +10,7 @@ ThinkWatch Lite connects Codex to a gateway on the same computer that accepts th ## Steps -1. On the Upstreams page, choose **New upstream** and pick the service on the first step, **Service**, which goes straight to **Connection**: **Anthropic** for Claude, or **Google Gemini**; each fills in the address and protocol. For a relay, choose its service under **Platforms and relays**, or **Custom** for any other. **OpenRouter** fills in its address and protocol. For **Sub2API**, **New API / One API** and **Custom**, enter the relay's **Base URL** without an endpoint path such as `/chat/completions`, and set **Protocol** to **OpenAI Chat Completions**; for GLM, for example, choose **Custom** with `https://api.z.ai/api/paas/v4`, or `…/api/coding/paas/v4` on a GLM Coding Plan. A base URL that ends with its own version, such as `/v4` or Volcengine Ark's `/api/v3`, is used as written from ThinkWatch Lite 2026.10.5. Enter the **API key**, choose **Check connection**, then **Next**. If the relay lists no models, or leaves some out, type each missing model ID in the box at the end of **Models** and press Enter. Choose **Next**, then **Create**. +1. On the Upstreams page, choose **New upstream** and pick the service on the first step, **Service**, which goes straight to **Connection**: **Anthropic** for Claude, or **Google Gemini**; each fills in the address and protocol. For a relay, choose its service under **Platforms and relays**, or **Custom** for any other. **OpenRouter** fills in its address and protocol. For **Sub2API**, **New API / One API** and **Custom**, enter the relay's **Base URL** without an endpoint path such as `/chat/completions`, and set **Protocol** to **OpenAI Chat Completions**; for GLM, for example, choose **Custom** with `https://api.z.ai/api/paas/v4`, or `…/api/coding/paas/v4` on a GLM Coding Plan. A base URL that ends with its own version, such as `/v4` or Volcengine Ark's `/api/v3`, is used as written from ThinkWatch Lite 2026.10.5. Enter the **API key** and choose **Next**, which checks the connection. If the relay lists no models, or leaves some out, type each missing model ID in the box at the end of **Models** and press Enter. Choose **Next**, then **Create**. 2. On the Clients page, choose **Connect…** on the Codex row. The dialog shows the change to `~/.codex/config.toml`: | Field | Value | diff --git a/src/content/docs-lite/en/failover-and-load-balancing.md b/src/content/docs-lite/en/failover-and-load-balancing.md index 2d0c54a..7e622ba 100644 --- a/src/content/docs-lite/en/failover-and-load-balancing.md +++ b/src/content/docs-lite/en/failover-and-load-balancing.md @@ -9,7 +9,7 @@ ThinkWatch Lite turns each relay key into an upstream and puts several upstreams ## Steps -1. On the Upstreams page, choose **New upstream** and pick the service under **Service** (for a relay, its service under **Platforms and relays**, or **Custom**). Under **Connection**, enter a **Name**, the **Base URL** where it is asked for and one **API key**, choose **Check connection**, then **Next** until **Create**. Repeat for each key: an upstream holds one key, and failover and pauses work per upstream. +1. On the Upstreams page, choose **New upstream** and pick the service under **Service** (for a relay, its service under **Platforms and relays**, or **Custom**). Under **Connection**, enter a **Name**, the **Base URL** where it is asked for and one **API key**, then choose **Next**, which checks the connection, until **Create**. Repeat for each key: an upstream holds one key, and failover and pauses work per upstream. 2. On the Routing page, choose **New group** under **Groups**. Enter a **Name**, choose a **Strategy**, tick the upstreams under **Members**, drag them into order and choose **Create**. For **Round robin**, also enter each member's **Weight** and choose **Distribute by**. 3. Under **Routes**, open the route, choose **Edit…** on the rule that should use the group (usually **All requests (catch-all)**), select the group in **Forward to** and choose **Save** in both dialogs. 4. **Dry run** checks the result without sending anything. On the Traffic page, a request's **Routing** tab lists the upstreams it tried under **Attempts**. diff --git a/src/content/docs-lite/en/features.md b/src/content/docs-lite/en/features.md index 57106a8..0b539b3 100644 --- a/src/content/docs-lite/en/features.md +++ b/src/content/docs-lite/en/features.md @@ -47,11 +47,11 @@ Usage limits keep one client from using up a budget: each caps the key at a numb Upstreams are the services requests are forwarded to: API keys for Anthropic, OpenAI, Google Gemini, DeepSeek or any compatible endpoint, Amazon Bedrock (with an API key, access keys or an AWS profile), a ChatGPT account or a Z.ai / BigModel account signed in from the app, relays such as OpenRouter, Sub2API and New API / One API, a ThinkWatch Enterprise gateway, and local models such as Ollama. When a client and an upstream use different API formats, requests are converted between Anthropic Messages, OpenAI Chat Completions, OpenAI Responses and Gemini, and the fields that cannot be carried over are listed on the request. A model's reasoning survives the conversion: the reasoning a Chat Completions upstream such as DeepSeek, Kimi or GLM returns reaches the client as it is and goes back to that upstream on the next turn, so a conversation with tool calls can continue, and the thought signatures on a Gemini model's tool calls are kept as well. When a Chat Completions model writes a tool call into its answer text, the gateway recognises it as an ordinary tool call, provided the request defined that tool, and it goes through tool-call inspection like any other. A request body a client sends compressed with gzip, deflate or zstd is read as usual, and an answer an upstream sends compressed reaches the client decoded. Clients such as Codex mark no prompt-cache breakpoints; when their requests are converted for an upstream in Anthropic Messages format, or for a Claude model on Bedrock that AWS lists for prompt caching (Claude 3.5 Sonnet v2, Claude 3.7 Sonnet, and Claude 4.5 and later), the gateway marks them, so each turn reads what the previous one cached. An upstream that refuses the marks receives the request again without them. Upstreams can be reached through an outbound proxy and priced with a price sheet of their own; aliases, proxies and price sheets have tabs on the same page. The **Traffic · 24 h** column of the **Proxies** tab gives the upload and download through each proxy over the last 24 hours, with 7 and 30 days on hover. An optional **Concurrency limit** suits relays and accounts that allow only so many requests at once: when the upstream is full, a conversation that stays on it waits for a free slot, other requests go to the next upstream, and when every upstream is full a request waits and then receives a busy error. A streamed request waiting for a slot or for its key's usage window receives keep-alive pings while it waits. **Specs…** in an upstream's model list sets by hand a model's context window, maximum output, and whether it reasons and takes images, for a model the price table lacks or gets wrong; the values set there are used in place of the price table's. A connection test times the DNS lookup and the TCP, TLS and proxy handshakes without incurring any cost; an inference test measures the time to first token and estimates its cost before it runs. -**New upstream** starts with the service. The services are listed in three groups, each with its logo and a one-line description, and can be searched: **Model vendors** (Anthropic, OpenAI, Google Gemini, DeepSeek, Z.ai / BigModel), **Platforms and relays** (Amazon Bedrock, OpenRouter, ThinkWatch, Sub2API, New API / One API) and **Local and custom** (Ollama, Custom). Picking one goes straight to **Connection**, which asks only for what that service needs. **Authentication** offers the methods the service has: an API key or a ChatGPT account for OpenAI, an API key or an account sign-in for Z.ai / BigModel, an API key, access keys or an AWS profile for Bedrock, and an API key or OAuth for relays and custom endpoints; a service with a single method shows no choice. What the service already decides, such as its address, its protocol or that Ollama takes no key, is filled in or left out. A ChatGPT or Z.ai / BigModel account is signed in inside the dialog, once its notes are acknowledged: in the default browser, or in another browser through **Copy sign-in link**, and a ChatGPT account also with a device code. Once signed in, the upstream is saved, and the next two steps set its models and billing. When the app is connected to a remote core, a ChatGPT account signs in with a device code only, and the verification address and the code can each be copied. +**New upstream** starts with the service. The services are listed in three groups, each with its logo and a one-line description, and can be searched: **Model vendors** (Anthropic, OpenAI, Google Gemini, DeepSeek, Z.ai / BigModel), **Platforms and relays** (Amazon Bedrock, OpenRouter, ThinkWatch, Sub2API, New API / One API) and **Local and custom** (Ollama, Custom). Picking one goes straight to **Connection**, which asks only for what that service needs. **Authentication** offers the methods the service has: an API key or a ChatGPT account for OpenAI, an API key or an account sign-in for Z.ai / BigModel, an API key, access keys or an AWS profile for Bedrock, and an API key or OAuth for custom endpoints, while ThinkWatch, Sub2API and New API / One API take an API key; a service with a single method shows no choice. What the service already decides, such as its address, its protocol or that Ollama takes no key, is filled in or left out. Request headers, client identity forwarding, the behaviour when the proxy is unavailable and the concurrency limit are under **Advanced settings**, which opens by itself when one of them is set. **Next** checks the connection at no cost: when it passes, **Models** opens with the latency, the number of models found and any balance on top; when it fails, the reason is shown with **Retry** and **Continue anyway**, for an upstream that refuses the check but serves requests. A ChatGPT or Z.ai / BigModel account is signed in inside the dialog, once its notes are acknowledged: in the default browser, or in another browser through **Copy link**, and a ChatGPT account also with a device code. Once signed in, the upstream is saved and the dialog goes to **Models**, with the account on top. When the app is connected to a remote core, a ChatGPT account signs in with a device code only, and the verification address and the code can each be copied. **Edit upstream** recognizes the service from the upstream's address, or for Sub2API, New API / One API and ThinkWatch from where its balance is read, shows its logo and name, and asks what creating it would ask. A value already set is always shown, even where the service would not ask for it. A Z.ai or BigModel upstream written by signing in shows **Account sign-in** as its method, with **Sign in again**; one added with a key can switch to **Account sign-in**, and signing in replaces its key while the model scope, billing and other settings stay as they are. -The **Quota / billing** column shows the quotas and balances that services report. A ChatGPT account shows its usage limits and reset times. So does an upstream on a GLM Coding Plan, that is, one whose address is on `api.z.ai` or `open.bigmodel.cn`, whether it was signed in from the app or added with a key: its 5-hour and weekly limits and, on a plan billed in credits, the credits left (“1,976 / 2,000 credits left”). Other upstreams show their balance: the key's quota, or the tightest of its time windows, as a bar with what is left; the money left in the account (“Balance $18.40”); or, for a key without a limit, what it has spent (“$12.40 spent this month”). Hovering lists every window with its use and reset time, the exact amounts and when the balance was read. Balances are read from OpenRouter, DeepSeek, Moonshot, Sub2API, New API / One API and ThinkWatch Enterprise; the source is recognized from the address, or set by the service picked when the upstream was created. On a ThinkWatch Enterprise gateway, a key with limits of its own shows its own limits and use; a key without them shows the account's limits and its total over all of its keys, marked as the account's. **Check connection** shows the balance under its result, and an upstream's menu has **Refresh balance**. A balance that cannot be read shows why on hover; reading it never affects requests. +The **Quota / billing** column shows the quotas and balances that services report. A ChatGPT account shows its usage limits and reset times. So does an upstream on a GLM Coding Plan, that is, one whose address is on `api.z.ai` or `open.bigmodel.cn`, whether it was signed in from the app or added with a key: its 5-hour and weekly limits and, on a plan billed in credits, the credits left (“1,976 / 2,000 credits left”). Other upstreams show their balance: the key's quota, or the tightest of its time windows, as a bar with what is left; the money left in the account (“Balance $18.40”); or, for a key without a limit, what it has spent (“$12.40 spent this month”). Hovering lists every window with its use and reset time, the exact amounts and when the balance was read. Balances are read from OpenRouter, DeepSeek, Moonshot, Sub2API, New API / One API and ThinkWatch Enterprise; the source is recognized from the address, or set by the service picked when the upstream was created. On a ThinkWatch Enterprise gateway, a key with limits of its own shows its own limits and use; a key without them shows the account's limits and its total over all of its keys, marked as the account's. The connection check shows the balance with its result, and an upstream's menu has **Refresh balance**. A balance that cannot be read shows why on hover; reading it never affects requests. An upstream's models are the ones it lists plus any added by hand. Upstreams often leave out models they serve: an account backend hides newer models, a relay lists only some. **Add models…** in an upstream's model list adds such models by their exact IDs, several at a time. An ID cannot contain `*` or `?` or have spaces around it, is at most 256 characters, and is added once; the dialog points out an ID that breaks these rules, or one the upstream already lists, before saving. A model added by hand is marked **Manual**, and routing and failover, aliases, routing rules that name a model, a key's allowed models, the model list clients see, the dry run and the speed test all treat it like a listed model. The summary at the top of the list counts the models the upstream lists apart from those added by hand. Hovering over a manual model shows **Remove**, which takes effect at once, with **Undo** in the message that follows. The **Models** section of the **New upstream** and **Edit upstream** dialogs ends with the same input, for an upstream with or without a list, so models can also be added while it is created or edited. They are saved with the rest of the upstream, and with **Selected models** a model added there is enabled at once. For an upstream that lists no models, the models added by hand are its whole list. diff --git a/src/content/docs-lite/zh-CN/claude-code-other-models.md b/src/content/docs-lite/zh-CN/claude-code-other-models.md index 517f29c..4931704 100644 --- a/src/content/docs-lite/zh-CN/claude-code-other-models.md +++ b/src/content/docs-lite/zh-CN/claude-code-other-models.md @@ -12,11 +12,11 @@ ThinkWatch Lite 把 Claude Code 接到本机的网关上,网关再把每个请 1. 在「上游」页点击「新建上游」。第一步「服务类型」把服务分三组列出,可以搜索;选定后直接进入「连接」,只询问该服务需要的内容: - 「DeepSeek」:自动填入 `https://api.deepseek.com/anthropic` 和接口协议,再填写「API 密钥」。 - - GLM(API 密钥):选「Z.ai / BigModel」,在「站点」中选择「Z.ai(国际)」或「BigModel(中国大陆)」,兼容 Anthropic 接口的地址随之确定,再填写「API 密钥」。自 ThinkWatch Lite 2026.10.5 起,也可以选「自定义」使用 GLM 的 OpenAI 兼容地址,「接口协议」选「OpenAI Chat Completions」:`https://api.z.ai/api/paas/v4` 或 `https://open.bigmodel.cn/api/paas/v4`,GLM Coding Plan 使用 `…/api/coding/paas/v4`。这时 Claude Code 的请求需要转换格式,因此 Anthropic 地址更直接。 - - GLM(账号登录):选「Z.ai / BigModel」,「认证方式」选「账号登录」,在「站点」中选择站点,勾选「已阅读上述说明」,点击「在浏览器中登录」并完成授权;要在默认浏览器以外的浏览器中登录,改点「复制登录链接」。应用在该账号中创建一把名为 `thinkwatch` 的 API 密钥,并写入上游。 - - Kimi:选「自定义」,「接口地址」填 Kimi 文档给出的兼容 Anthropic 接口的地址,「接口协议」选「Anthropic Messages」。Kimi For Coding 还需打开「转发客户端身份」。 + - GLM(API 密钥):选「Z.ai / BigModel」,在「站点」中选择「BigModel(中国大陆)」或「Z.ai(国际)」,兼容 Anthropic 接口的地址随之确定,再填写「API 密钥」。自 ThinkWatch Lite 2026.10.5 起,也可以选「自定义」使用 GLM 的 OpenAI 兼容地址,「接口协议」选「OpenAI Chat Completions」:`https://api.z.ai/api/paas/v4` 或 `https://open.bigmodel.cn/api/paas/v4`,GLM Coding Plan 使用 `…/api/coding/paas/v4`。这时 Claude Code 的请求需要转换格式,因此 Anthropic 地址更直接。 + - GLM(账号登录):选「Z.ai / BigModel」,「认证方式」选「账号登录」,在「站点」中选择站点,勾选「已阅读上述说明」,点击「在浏览器中登录」并完成授权;要在默认浏览器以外的浏览器中登录,改点「复制链接」。应用在该账号中创建一把名为 `thinkwatch` 的 API 密钥,并写入上游。 + - Kimi:选「自定义」,「接口地址」填 Kimi 文档给出的兼容 Anthropic 接口的地址,「接口协议」选「Anthropic Messages」。Kimi For Coding 还需在「高级设置」中打开「转发客户端身份」。 - 使用 API 密钥时,「检测连接」验证地址与凭据并获取模型列表,不产生费用;之后点击两次「下一步」,再点击「创建」。账号登录后上游已经写入,点击两次「下一步」,再点击「完成」。 + 使用 API 密钥时,点击「下一步」即验证地址与凭据并获取模型列表,不产生费用;之后再点击两次「下一步」,然后点击「创建」。账号登录后上游已经写入,对话框直接进入「模型」,点击「下一步」,再点击「完成」。 2. 在「客户端」页 Claude Code 一行点击「接管…」。对话框列出 `~/.claude/settings.json` 中要修改的字段:`env.ANTHROPIC_BASE_URL`、`env.ANTHROPIC_AUTH_TOKEN`(新密钥 `claude-code`)和 `env.CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`。点击「接管」。 3. 选择指定模型的方式: - **直接使用模型名。**在 Claude Code 中输入 `/model <模型 ID>` 即切换到该模型,也可以用 `claude --model <模型 ID>` 启动。要让 Claude Code 的模型别名对应到该模型,在 `~/.claude/settings.json` 的 `env` 中加入以下变量;其中 Haiku 一项也用于后台任务。 diff --git a/src/content/docs-lite/zh-CN/codex-other-models.md b/src/content/docs-lite/zh-CN/codex-other-models.md index f030d09..59d980a 100644 --- a/src/content/docs-lite/zh-CN/codex-other-models.md +++ b/src/content/docs-lite/zh-CN/codex-other-models.md @@ -10,7 +10,7 @@ ThinkWatch Lite 把 Codex 接到本机的网关上,网关接收 OpenAI Respons ## 步骤 -1. 在「上游」页点击「新建上游」,在第一步「服务类型」中选择服务,选定后直接进入「连接」:Claude 选「Anthropic」,Gemini 选「Google Gemini」,接口地址和接口协议会自动填入。中转站在「平台与中转」中选择对应的服务,其他中转站选「自定义」。「OpenRouter」自动填入地址和接口协议;选「Sub2API」「New API / One API」或「自定义」时,「接口地址」填中转站的 Base URL(不含 `/chat/completions` 等接口路径),「接口协议」选「OpenAI Chat Completions」;例如 GLM 选「自定义」,填 `https://api.z.ai/api/paas/v4`,GLM Coding Plan 填 `…/api/coding/paas/v4`。以自带版本号结尾的地址(如 `/v4`、火山方舟的 `/api/v3`),自 ThinkWatch Lite 2026.10.5 起按原样使用。填写「API 密钥」,点击「检测连接」,再点击「下一步」。中转站不提供模型列表或没有列全时,在「模型」一节末尾的输入框中逐个填写缺少的模型 ID 并回车。再点击「下一步」,然后点击「创建」。 +1. 在「上游」页点击「新建上游」,在第一步「服务类型」中选择服务,选定后直接进入「连接」:Claude 选「Anthropic」,Gemini 选「Google Gemini」,接口地址和接口协议会自动填入。中转站在「平台与中转」中选择对应的服务,其他中转站选「自定义」。「OpenRouter」自动填入地址和接口协议;选「Sub2API」「New API / One API」或「自定义」时,「接口地址」填中转站的 Base URL(不含 `/chat/completions` 等接口路径),「接口协议」选「OpenAI Chat Completions」;例如 GLM 选「自定义」,填 `https://api.z.ai/api/paas/v4`,GLM Coding Plan 填 `…/api/coding/paas/v4`。以自带版本号结尾的地址(如 `/v4`、火山方舟的 `/api/v3`),自 ThinkWatch Lite 2026.10.5 起按原样使用。填写「API 密钥」,点击「下一步」,同时检测连接。中转站不提供模型列表或没有列全时,在「模型」一节末尾的输入框中逐个填写缺少的模型 ID 并回车。再点击「下一步」,然后点击「创建」。 2. 在「客户端」页 Codex 一行点击「接管…」。对话框列出对 `~/.codex/config.toml` 的修改: | 字段 | 写入 | diff --git a/src/content/docs-lite/zh-CN/failover-and-load-balancing.md b/src/content/docs-lite/zh-CN/failover-and-load-balancing.md index b5c8367..3ba4565 100644 --- a/src/content/docs-lite/zh-CN/failover-and-load-balancing.md +++ b/src/content/docs-lite/zh-CN/failover-and-load-balancing.md @@ -9,7 +9,7 @@ ThinkWatch Lite 把每个中转站的每把密钥建成一个上游,再把多 ## 步骤 -1. 在上游页选择「新建上游」,在「服务类型」中选择服务(中转站在「平台与中转」中选择对应的服务,或选「自定义」)。在「连接」中填写「名称」和一把「API 密钥」,服务要求时再填写「接口地址」,选择「检测连接」,再依次选择「下一步」直到「创建」。每把密钥重复一次:一个上游只有一把密钥,故障转移和暂停都以上游为单位。 +1. 在上游页选择「新建上游」,在「服务类型」中选择服务(中转站在「平台与中转」中选择对应的服务,或选「自定义」)。在「连接」中填写「名称」和一把「API 密钥」,服务要求时再填写「接口地址」,再依次选择「下一步」直到「创建」,第一次「下一步」时检测连接。每把密钥重复一次:一个上游只有一把密钥,故障转移和暂停都以上游为单位。 2. 在路由页的「策略组」标签中选择「新建策略组」。填写「名称」,选择「策略」,在「成员」中勾选上游并拖动排序,然后选择「创建」。策略为「轮询」时,还要填写每个成员的「权重」并选择「分配依据」。 3. 在「路由」标签中打开路由,对要使用该策略组的规则选择「编辑…」(通常是「全部请求(兜底)」那一条),在「转发至」中选择该策略组,并在两个对话框中各选择一次「保存」。 4. 「试算」可以检查结果,不会发出请求。在流量页打开请求,「路由」标签的「尝试链」列出尝试过的每个上游。 diff --git a/src/content/docs-lite/zh-CN/features.md b/src/content/docs-lite/zh-CN/features.md index cbb6309..1bded9f 100644 --- a/src/content/docs-lite/zh-CN/features.md +++ b/src/content/docs-lite/zh-CN/features.md @@ -47,11 +47,11 @@ WSL 2 默认使用 NAT 网络,此时 Windows 上的网关无法从 WSL 内访 上游是网关转发请求的目标:Anthropic、OpenAI、Google Gemini、DeepSeek 或任何兼容接口的 API 密钥,Amazon Bedrock(API 密钥、访问密钥或 AWS profile),在应用内登录的 ChatGPT 账号或 Z.ai / BigModel 账号,OpenRouter、Sub2API、New API / One API 等中转服务,ThinkWatch 企业版网关,以及 Ollama 等本机模型。客户端与上游的 API 格式不同时,请求在 Anthropic Messages、OpenAI Chat Completions、OpenAI Responses 与 Gemini 之间自动转换,无法转换的字段会在请求上逐一列出。模型的思考在转换中保留:DeepSeek、Kimi、GLM 等 Chat Completions 格式上游返回的思考内容原样交给客户端,下一轮送回同一上游,带工具调用的对话因此能继续;Gemini 模型工具调用上的思考签名同样保留。Chat Completions 格式的模型把工具调用写进回答正文时,只要请求定义了这个工具,网关就把它识别为普通的工具调用,并与其他工具调用一样经过工具调用审查。客户端以 gzip、deflate 或 zstd 压缩发送的请求正文照常读取,上游压缩返回的回答解码后交给客户端。Codex 等不标注提示缓存断点的客户端,请求转换后发往 Anthropic Messages 格式的上游,或 Bedrock 上 AWS 列为支持提示缓存的 Claude 模型(Claude 3.5 Sonnet v2、Claude 3.7 Sonnet 以及 Claude 4.5 起的模型)时,由网关标注断点,每一轮都能读取上一轮写入的缓存。上游拒绝这些标注时,网关去掉标注重新发送一次。上游可以经出站代理访问,也可以使用单独的价目表计价,别名、代理与价目表在同一页的标签中管理。「代理」标签页的「流量 · 24 小时」一列给出经过每个代理的上传与下载,悬停可查看 7 天与 30 天的数据。可选的「并发上限」适用于限制并发的中转站或账号:上游已满时,留在它上面的对话等待空位,其他请求交给下一个上游;所有上游都满时,请求先等待,仍无空位则返回繁忙错误。流式请求等待空位或密钥的用量窗口期间,客户端会收到保活心跳。在上游的模型列表中选择「规格…」,可以手动设置模型的上下文窗口、输出上限,以及是否支持推理与图片输入,适用于价目表中没有或数值有误的模型,手动设置的值优先于价目表。链路测速测量 DNS 解析以及 TCP、TLS、代理握手的耗时,不产生费用;推理测速测量首个 token 的时间,运行前先给出费用预估。 -「新建上游」先选择服务。服务分为「模型厂商」(Anthropic、OpenAI、Google Gemini、DeepSeek、Z.ai / BigModel)、「平台与中转」(Amazon Bedrock、OpenRouter、ThinkWatch、Sub2API、New API / One API)与「本机与自定义」(Ollama、自定义)三组,各带标志和一句介绍,可以搜索。选定后直接进入「连接」,只询问该服务需要的内容。「认证方式」按服务给出:OpenAI 为 API 密钥或 ChatGPT 账号,Z.ai / BigModel 为 API 密钥或账号登录,Bedrock 为 API 密钥、访问密钥或 AWS profile,中转与自定义为 API 密钥或 OAuth;只有一种方式的服务不显示这一项。服务已经决定的内容,例如地址、接口协议,或 Ollama 不需要密钥,直接填好或不再显示。ChatGPT 与 Z.ai / BigModel 账号在对话框内登录,阅读说明后,可以在默认浏览器中登录,也可以「复制登录链接」到常用的浏览器中打开;ChatGPT 账号还可以用设备码登录。登录后上游即写入配置,后两步设置它的模型与计费。连接远程 core 时,ChatGPT 账号只能用设备码登录,验证网址和设备码都可以复制。 +「新建上游」先选择服务。服务分为「模型厂商」(Anthropic、OpenAI、Google Gemini、DeepSeek、Z.ai / BigModel)、「平台与中转」(Amazon Bedrock、OpenRouter、ThinkWatch、Sub2API、New API / One API)与「本机与自定义」(Ollama、自定义)三组,各带标志和一句介绍,可以搜索。选定后直接进入「连接」,只询问该服务需要的内容。「认证方式」按服务给出:OpenAI 为 API 密钥或 ChatGPT 账号,Z.ai / BigModel 为 API 密钥或账号登录,Bedrock 为 API 密钥、访问密钥或 AWS profile,自定义为 API 密钥或 OAuth,ThinkWatch、Sub2API 与 New API / One API 为 API 密钥;只有一种方式的服务不显示这一项。服务已经决定的内容,例如地址、接口协议,或 Ollama 不需要密钥,直接填好或不再显示。请求头、转发客户端身份、代理不可用时的处理与并发上限收在「高级设置」中,其中任何一项有设置时自动展开。点击「下一步」即检测连接,不产生费用:通过后进入「模型」,顶部显示响应时间、发现的模型数和余额(如有);没有通过时写明原因,可以「重试」,也可以「仍然继续」,适用于拒绝检测但能正常转发的上游。ChatGPT 与 Z.ai / BigModel 账号在对话框内登录,阅读说明后,可以在默认浏览器中登录,也可以「复制链接」到常用的浏览器中打开;ChatGPT 账号还可以用设备码登录。登录后上游即写入配置,对话框直接进入「模型」,顶部显示登录的账号。连接远程 core 时,ChatGPT 账号只能用设备码登录,验证网址和设备码都可以复制。 「编辑上游」按地址认出服务(Sub2API、New API / One API 与 ThinkWatch 按余额来源认出),显示它的标志和名称,询问的内容与新建时一致;已经设置的值始终显示,即使该服务新建时不询问这一项。经账号登录写入的 Z.ai 或 BigModel 上游,认证方式显示为「账号登录」,可以「重新登录」;手动填写密钥的上游可以改为「账号登录」,登录后账号中取得的密钥替换当前密钥,模型范围、计费方式等设置保持不变。 -「额度 / 计费」一列显示服务报告的额度与余额。ChatGPT 账号显示订阅额度与重置时间;GLM Coding Plan 的上游(地址在 `api.z.ai` 或 `open.bigmodel.cn` 上,在应用内登录或手动填写密钥均可)同样显示:5 小时与每周额度,积分制套餐另外显示剩余积分(「剩余 1,976 / 2,000 积分」)。其他上游显示余额:密钥的额度或最紧的时间窗口,以进度条和剩余量表示;账户中的余额(「余额 $18.40」);没有限额的密钥则显示已用金额(「本月已用 $12.40」)。悬停可以查看全部窗口的用量与重置时间、确切数字和读取时间。余额来源包括 OpenRouter、DeepSeek、Moonshot、Sub2API、New API / One API 与 ThinkWatch 企业版,按地址认出,或由新建上游时所选的服务决定。在 ThinkWatch 企业版网关上,密钥设了自己的限额时显示密钥的限额与用量;没设时显示账号的限额与所有密钥合计的用量,并注明是账号的。「检测连接」的结果下方也显示余额,上游的菜单中有「刷新余额」。余额读不到时,悬停可以查看原因;读取余额不影响请求转发。 +「额度 / 计费」一列显示服务报告的额度与余额。ChatGPT 账号显示订阅额度与重置时间;GLM Coding Plan 的上游(地址在 `api.z.ai` 或 `open.bigmodel.cn` 上,在应用内登录或手动填写密钥均可)同样显示:5 小时与每周额度,积分制套餐另外显示剩余积分(「剩余 1,976 / 2,000 积分」)。其他上游显示余额:密钥的额度或最紧的时间窗口,以进度条和剩余量表示;账户中的余额(「余额 $18.40」);没有限额的密钥则显示已用金额(「本月已用 $12.40」)。悬停可以查看全部窗口的用量与重置时间、确切数字和读取时间。余额来源包括 OpenRouter、DeepSeek、Moonshot、Sub2API、New API / One API 与 ThinkWatch 企业版,按地址认出,或由新建上游时所选的服务决定。在 ThinkWatch 企业版网关上,密钥设了自己的限额时显示密钥的限额与用量;没设时显示账号的限额与所有密钥合计的用量,并注明是账号的。检测连接的结果中也显示余额,上游的菜单中有「刷新余额」。余额读不到时,悬停可以查看原因;读取余额不影响请求转发。 一家上游的模型,是它自己列出的模型加上手动添加的模型。上游常常没有列全它能服务的模型:账号类的后端会隐藏较新的模型,中转站只列出一部分。在上游的模型列表中选择「添加模型…」,可以按确切的模型 ID 添加这类模型,一次可以添加多个。模型 ID 不能含 `*` 或 `?`,前后不能有空格,最多 256 个字符,且不能重复;不符合要求的,以及上游已经列出的,对话框在保存之前当场指出。手动添加的模型标有「手动」,路由与故障转移、别名、指定模型的路由规则、密钥的可用模型、客户端看到的模型列表、试算与推理测速都把它当作列出的模型。列表顶部的摘要把上游列出的模型与手动添加的模型分开计数。悬停在手动添加的模型上会出现「移除」,立即生效,随后的提示中可以「撤销」。「新建上游」与「编辑上游」对话框的「模型」一节末尾有同样的输入框,无论上游是否提供模型列表,创建或编辑时都可以在这里添加模型,随上游的其他设置一起保存;启用范围为「指定模型」时,在这里添加的模型立即勾选启用。上游不提供模型列表时,手动添加的模型就是它的全部模型。