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
464 changes: 379 additions & 85 deletions src/components/ImportLinkBuilder.astro

Large diffs are not rendered by default.

428 changes: 314 additions & 114 deletions src/components/pages/ImportPage.astro

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/content/docs-lite/en/compare-cc-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A dash means the feature is not described in that product's documentation.
| | CC Switch | ThinkWatch Lite |
|---|---|---|
| Clients | Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes Agent, Pi, MiniMax Code | In one step: Claude Code, Claude Desktop, Codex (also in the ChatGPT desktop app), opencode, Pi, oh-my-pi, Grok Build, Qwen Code, Hermes Agent, Zed, Aider, DeepSeek Harness. With instructions: Cursor, Continue, Antigravity CLI |
| Adding providers | More than 50 presets; `ccswitch://` links import providers, MCP servers, prompts and skills | A new upstream starts from the service, in three groups: model vendors (Anthropic, OpenAI, Google Gemini, DeepSeek, Z.ai / BigModel), platforms and relays (Amazon Bedrock, OpenRouter, ThinkWatch Enterprise, Sub2API, New API / One API), and Ollama or any compatible endpoint; ChatGPT and Z.ai / BigModel accounts sign in inside the dialog; `thinkwatch://import` links from a relay or vendor pre-fill one upstream |
| Adding providers | More than 50 presets; `ccswitch://` links import providers, MCP servers, prompts and skills | A new upstream starts from the service, in three groups: model vendors (Anthropic, OpenAI, Google Gemini, DeepSeek, Z.ai / BigModel), platforms and relays (Amazon Bedrock, OpenRouter, ThinkWatch Enterprise, Sub2API, New API / One API), and Ollama or any compatible endpoint; ChatGPT and Z.ai / BigModel accounts sign in inside the dialog; `thinkwatch://import` links from a relay, a vendor or a ThinkWatch Enterprise console fill in the New upstream dialog for any service, headers, models and prices included |
| Routing | In proxy mode, each client's requests go to its current provider; models can be mapped per provider | Ordered rules per key by model, API format, input tokens, tools, images, extended thinking and more; rules can rewrite the model |
| Failover | Queue in priority order with a circuit breaker (proxy mode) | Next upstream in the group when an attempt fails before the answer begins; a session stays on one upstream |
| Load balancing | — | Group strategies: in order, manual, round robin, lowest latency, lowest cost |
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs-lite/en/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Each upstream is also compared over the last 7 days with the others serving the

API keys and header values can be written as `${NAME}` to read a system environment variable. On macOS these come from the login shell, so variables exported in `~/.zshrc` and similar files apply, and the same holds on Linux (`~/.bashrc`, `~/.profile` and so on); on Windows they are the environment variables configured in system settings. After a variable changes, reopening the app picks it up. Proxy variables such as `HTTPS_PROXY`, and `PATH`, are not read.

A relay or vendor can hand out an import link, `thinkwatch://import?…` or its web form `https://thinkwat.ch/import#…`, that pre-fills a new upstream with a name, base URL, protocol, API key and model list. The app shows the settings and the host that will receive requests and the key in a confirmation dialog, and writes nothing and contacts nothing before Create is chosen. A link only ever adds one upstream: it cannot change existing ones, headers, proxies, pricing or routing, and a key that refers to an environment variable is rejected. The parameters and a link builder are in [Import links](/docs/lite/import-links).
A relay, a vendor or a ThinkWatch Enterprise console can hand out an import link, `thinkwatch://import?…` or its web form `https://thinkwat.ch/import#…`, that opens the New upstream dialog with the service, address, key, headers, concurrency limit, models, model specs and a price sheet already filled in. The dialog names the host that will receive requests and keys, and nothing is written or sent before Next is chosen or a sign-in is started. A link only ever adds one upstream and cannot set proxies, aliases, routes or environment variable references; a link that needs a newer version of the app says so. The parameters for each service and a link builder are in [Import links](/docs/lite/import-links).

## Routing and failover

Expand Down
212 changes: 168 additions & 44 deletions src/content/docs-lite/en/import-links.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/content/docs-lite/zh-CN/compare-cc-switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ThinkWatch Lite 在本机运行网关 ThinkWatch Core。在客户端页把每个
| | CC Switch | ThinkWatch Lite |
|---|---|---|
| 客户端 | Claude Code、Claude Desktop、Codex、Gemini CLI、Grok Build、OpenCode、OpenClaw、Hermes Agent、Pi、MiniMax Code | 一键接管:Claude Code、Claude Desktop、Codex(含 ChatGPT 桌面版中的 Codex)、opencode、Pi、oh-my-pi、Grok Build、Qwen Code、Hermes Agent、Zed、Aider、DeepSeek Harness;提供配置方法:Cursor、Continue、Antigravity CLI |
| 添加供应商 | 50 余个供应商预设;`ccswitch://` 链接可导入供应商、MCP 服务器、提示词与技能 | 新建上游先选择服务,分三组:模型厂商(Anthropic、OpenAI、Google Gemini、DeepSeek、Z.ai / BigModel)、平台与中转(Amazon Bedrock、OpenRouter、ThinkWatch 企业版、Sub2API、New API / One API),以及 Ollama 与任何兼容接口;ChatGPT 与 Z.ai / BigModel 账号在对话框内登录;中转站或服务商可通过 `thinkwatch://import` 链接预填一个上游 |
| 添加供应商 | 50 余个供应商预设;`ccswitch://` 链接可导入供应商、MCP 服务器、提示词与技能 | 新建上游先选择服务,分三组:模型厂商(Anthropic、OpenAI、Google Gemini、DeepSeek、Z.ai / BigModel)、平台与中转(Amazon Bedrock、OpenRouter、ThinkWatch 企业版、Sub2API、New API / One API),以及 Ollama 与任何兼容接口;ChatGPT 与 Z.ai / BigModel 账号在对话框内登录;中转站、服务商或 ThinkWatch 企业版控制台可通过 `thinkwatch://import` 链接为任一服务类型预填「新建上游」对话框,包括请求头、模型与价目表 |
| 路由 | 代理模式下,每个客户端的请求发往它当前的供应商;可按供应商映射模型 | 每把密钥的规则按顺序匹配模型、API 格式、输入 token、工具、图片、扩展思考等条件;规则可以改写模型 |
| 故障转移 | 按优先级排列的故障转移队列,带熔断(代理模式) | 回答开始之前尝试失败时,转到策略组中的下一个上游;同一会话默认保持在同一个上游 |
| 负载均衡 | — | 策略组:按顺序、手动选择、轮询、延迟最低、费用最低 |
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs-lite/zh-CN/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ WSL 2 默认使用 NAT 网络,此时 Windows 上的网关无法从 WSL 内访

API 密钥和请求头的值可以写成 `${变量名}`,读取系统环境变量。macOS 上读的是登录 shell 里的环境变量,`~/.zshrc` 等文件中 `export` 的变量都会生效,Linux 同理(`~/.bashrc`、`~/.profile` 等);Windows 上读的是系统设置里配置的环境变量。修改变量后,重新打开应用即可生效。代理相关的变量(`HTTPS_PROXY` 等)和 `PATH` 不会被读取。

中转站或服务商可以提供导入链接(`thinkwatch://import?…`,或网页形式 `https://thinkwat.ch/import#…`),预填新上游的名称、接口地址、接口协议、API 密钥与模型清单。应用在确认对话框中列出这些设置,并写明请求与密钥将发往的主机;选择「创建」之前不写入配置,也不连接该地址。一条链接只能新增一个上游,不能修改已有的上游、请求头、代理、价目表或路由,引用环境变量的密钥一律拒绝。参数说明与链接生成器见[导入链接](/zh-CN/docs/lite/import-links)。
中转站、服务商或 ThinkWatch 企业版控制台可以提供导入链接(`thinkwatch://import?…`,或网页形式 `https://thinkwat.ch/import#…`),打开预填好的「新建上游」对话框,服务类型、地址、密钥、请求头、并发上限、模型、模型规格与价目表都可以预先填写。对话框写明接收请求与密钥的主机;选择「下一步」或开始登录之前,不写入配置,也不发出任何请求。一条链接只能新增一个上游,不能设置代理、模型别名、路由或环境变量引用;需要更新版本应用的链接会提示更新。各服务类型的参数与链接生成器见[导入链接](/zh-CN/docs/lite/import-links)。

## 路由与故障转移

Expand Down
Loading
Loading