@musistudio/claude-code-router 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,6 +44,7 @@ The `config.json` file has several key sections:
44
44
 
45
45
  - **`Providers`**: Used to configure different model providers.
46
46
  - **`Router`**: Used to set up routing rules. `default` specifies the default model, which will be used for all requests if no other route is configured.
47
+ - **`API_TIMEOUT_MS`**: Specifies the timeout for API calls in milliseconds.
47
48
 
48
49
  Here is a comprehensive example:
49
50
 
@@ -52,6 +53,7 @@ Here is a comprehensive example:
52
53
  "APIKEY": "your-secret-key",
53
54
  "PROXY_URL": "http://127.0.0.1:7890",
54
55
  "LOG": true,
56
+ "API_TIMEOUT_MS": 600000,
55
57
  "Providers": [
56
58
  {
57
59
  "name": "openrouter",
@@ -166,6 +168,19 @@ ccr code
166
168
  > ccr restart
167
169
  > ```
168
170
 
171
+ ### 4. UI Mode (Beta)
172
+
173
+ For a more intuitive experience, you can use the UI mode to manage your configuration:
174
+
175
+ ```shell
176
+ ccr ui
177
+ ```
178
+
179
+ This will open a web-based interface where you can easily view and edit your `config.json` file.
180
+
181
+ > **Note**: The UI mode is currently in beta. 100% vibe coding: including project initialization, I just created a folder and a project.md document, and all code was generated by ccr + qwen3-coder + gemini(webSearch).
182
+ If you encounter any issues, please submit an issue on GitHub.
183
+
169
184
  #### Providers
170
185
 
171
186
  The `Providers` array is where you define the different model providers you want to use. Each provider object requires:
@@ -238,6 +253,11 @@ Transformers allow you to modify the request and response payloads to ensure com
238
253
  - `maxtoken`: Sets a specific `max_tokens` value.
239
254
  - `tooluse`: Optimizes tool usage for certain models via `tool_choice`.
240
255
  - `gemini-cli` (experimental): Unofficial support for Gemini via Gemini CLI [gemini-cli.js](https://gist.github.com/musistudio/1c13a65f35916a7ab690649d3df8d1cd).
256
+ - `reasoning`: Used to process the `reasoning_content` field.
257
+ - `sampling`: Used to process sampling information fields such as `temperature`, `top_p`, `top_k`, and `repetition_penalty`.
258
+ - `enhancetool`: Adds a layer of error tolerance to the tool call parameters returned by the LLM (this will cause the tool call information to no longer be streamed).
259
+ - `cleancache`: Clears the `cache_control` field from requests.
260
+ - `vertex-gemini`: Handles the Gemini API using Vertex authentication.
241
261
 
242
262
  **Custom Transformers:**
243
263
 
@@ -428,5 +448,9 @@ A huge thank you to all our sponsors for their generous support!
428
448
  - [@congzhangzh](https://github.com/congzhangzh)
429
449
  - @\*\_
430
450
  - @Z\*m
451
+ - @*鑫
452
+ - @c\*y
453
+ - @\*昕
454
+
431
455
 
432
456
  (If your name is masked, please contact me via my homepage email to update it with your GitHub username.)
package/README_zh.md CHANGED
@@ -40,6 +40,7 @@ npm install -g @musistudio/claude-code-router
40
40
  - **`HOST`** (可选): 您可以设置服务的主机地址。如果未设置 `APIKEY`,出于安全考虑,主机地址将强制设置为 `127.0.0.1`,以防止未经授权的访问。例如:`"HOST": "0.0.0.0"`。
41
41
  - **`Providers`**: 用于配置不同的模型提供商。
42
42
  - **`Router`**: 用于设置路由规则。`default` 指定默认模型,如果未配置其他路由,则该模型将用于所有请求。
43
+ - **`API_TIMEOUT_MS`**: API 请求超时时间,单位为毫秒。
43
44
 
44
45
  这是一个综合示例:
45
46
 
@@ -48,6 +49,7 @@ npm install -g @musistudio/claude-code-router
48
49
  "APIKEY": "your-secret-key",
49
50
  "PROXY_URL": "http://127.0.0.1:7890",
50
51
  "LOG": true,
52
+ "API_TIMEOUT_MS": 600000,
51
53
  "Providers": [
52
54
  {
53
55
  "name": "openrouter",
@@ -162,6 +164,18 @@ ccr code
162
164
  > ccr restart
163
165
  > ```
164
166
 
167
+ ### 4. UI 模式 (Beta)
168
+
169
+ 为了获得更直观的体验,您可以使用 UI 模式来管理您的配置:
170
+
171
+ ```shell
172
+ ccr ui
173
+ ```
174
+
175
+ 这将打开一个基于 Web 的界面,您可以在其中轻松查看和编辑您的 `config.json` 文件。
176
+
177
+ > **注意**: UI 模式目前处于测试阶段。这是一个 100% vibe coding的项目,包括项目的初始化,我只是新建了一个文件夹和一个project.md文档。所有代码均由 ccr + qwen3-coder + gemini(webSearch) 实现。如有问题请提交 issue。
178
+
165
179
  #### Providers
166
180
 
167
181
  `Providers` 数组是您定义要使用的不同模型提供商的地方。每个提供商对象都需要:
@@ -233,6 +247,11 @@ Transformers 允许您修改请求和响应负载,以确保与不同提供商
233
247
  - `maxtoken`: 设置特定的 `max_tokens` 值。
234
248
  - `tooluse`: 优化某些模型的工具使用(通过`tool_choice`参数)。
235
249
  - `gemini-cli` (实验性): 通过 Gemini CLI [gemini-cli.js](https://gist.github.com/musistudio/1c13a65f35916a7ab690649d3df8d1cd) 对 Gemini 的非官方支持。
250
+ - `reasoning`: 用于处理 `reasoning_content` 字段。
251
+ - `sampling`: 用于处理采样信息字段,如 `temperature`、`top_p`、`top_k` 和 `repetition_penalty`。
252
+ - `enhancetool`: 对 LLM 返回的工具调用参数增加一层容错处理(这会导致不再流式返回工具调用信息)。
253
+ - `cleancache`: 清除请求中的 `cache_control` 字段。
254
+ - `vertex-gemini`: 处理使用 vertex 鉴权的 gemini api。
236
255
 
237
256
  **自定义 Transformer:**
238
257
 
@@ -423,6 +442,9 @@ jobs:
423
442
  - [@congzhangzh](https://github.com/congzhangzh)
424
443
  - @*_
425
444
  - @Z\*m
445
+ - @*鑫
446
+ - @c\*y
447
+ - @\*昕
426
448
 
427
449
  (如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。)
428
450
 
@@ -113,5 +113,6 @@
113
113
  "webSearch": "gemini,gemini-2.5-flash"
114
114
  },
115
115
  "APIKEY": "your-secret-key",
116
- "HOST": "0.0.0.0"
116
+ "HOST": "0.0.0.0",
117
+ "API_TIMEOUT_MS": 600000
117
118
  }