cc-viewer 1.6.329 → 1.6.331

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.
Files changed (60) hide show
  1. package/README.md +7 -8
  2. package/cli.js +6 -6
  3. package/concepts/ar/GlobalSettings.md +5 -2
  4. package/concepts/ar/ProxySwitch.md +15 -5
  5. package/concepts/da/GlobalSettings.md +5 -2
  6. package/concepts/da/ProxySwitch.md +15 -5
  7. package/concepts/de/GlobalSettings.md +5 -2
  8. package/concepts/de/ProxySwitch.md +15 -5
  9. package/concepts/en/GlobalSettings.md +7 -2
  10. package/concepts/en/ProxySwitch.md +15 -5
  11. package/concepts/es/GlobalSettings.md +5 -2
  12. package/concepts/es/ProxySwitch.md +15 -5
  13. package/concepts/fr/GlobalSettings.md +5 -2
  14. package/concepts/fr/ProxySwitch.md +15 -5
  15. package/concepts/it/GlobalSettings.md +5 -2
  16. package/concepts/it/ProxySwitch.md +15 -5
  17. package/concepts/ja/GlobalSettings.md +5 -2
  18. package/concepts/ja/ProxySwitch.md +15 -5
  19. package/concepts/ko/GlobalSettings.md +5 -2
  20. package/concepts/ko/ProxySwitch.md +15 -5
  21. package/concepts/no/GlobalSettings.md +5 -2
  22. package/concepts/no/ProxySwitch.md +15 -5
  23. package/concepts/pl/GlobalSettings.md +5 -2
  24. package/concepts/pl/ProxySwitch.md +15 -5
  25. package/concepts/pt-BR/GlobalSettings.md +5 -2
  26. package/concepts/pt-BR/ProxySwitch.md +34 -24
  27. package/concepts/ru/GlobalSettings.md +5 -2
  28. package/concepts/ru/ProxySwitch.md +15 -5
  29. package/concepts/th/GlobalSettings.md +5 -2
  30. package/concepts/th/ProxySwitch.md +15 -5
  31. package/concepts/tr/GlobalSettings.md +5 -2
  32. package/concepts/tr/ProxySwitch.md +34 -24
  33. package/concepts/uk/GlobalSettings.md +5 -2
  34. package/concepts/uk/ProxySwitch.md +15 -5
  35. package/concepts/zh/GlobalSettings.md +5 -2
  36. package/concepts/zh/ProxySwitch.md +15 -5
  37. package/concepts/zh-TW/GlobalSettings.md +7 -4
  38. package/concepts/zh-TW/ProxySwitch.md +15 -5
  39. package/dist/assets/App-Bla1Fr_X.css +1 -0
  40. package/dist/assets/{App-zGAU2EYM.js → App-CCQARuiH.js} +1 -1
  41. package/dist/assets/{MdxEditorPanel-5Pb0ZTc6.js → MdxEditorPanel-BjJTwpmV.js} +1 -1
  42. package/dist/assets/{Mobile-BYT_A8TX.js → Mobile-BsJPIcqy.js} +1 -1
  43. package/dist/assets/index-ReSZCrNR.js +2 -0
  44. package/dist/assets/seqResourceLoaders-K-REW6io.js +2 -0
  45. package/dist/assets/{seqResourceLoaders-BFMsIN74.css → seqResourceLoaders-P_ytfji6.css} +1 -1
  46. package/dist/index.html +1 -1
  47. package/dist/voice-packs/default/pack.json +1 -1
  48. package/findcc.js +50 -40
  49. package/interceptor.js +1 -1
  50. package/package.json +8 -4
  51. package/plugins/README.md +8 -0
  52. package/server/_paths.js +24 -22
  53. package/server/interceptor.js +39 -25
  54. package/server/lib/interceptor-core.js +107 -0
  55. package/server/routes/preferences.js +14 -1
  56. package/server.js +1 -0
  57. package/ultraAgents/README.md +49 -40
  58. package/dist/assets/App-j3FcuV1C.css +0 -1
  59. package/dist/assets/index-DENLOp7J.js +0 -2
  60. package/dist/assets/seqResourceLoaders-C7QiLG9L.js +0 -2
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  <img height="200" width="1500" alt="CC-Viewer" src="https://github.com/user-attachments/assets/abec0513-1d56-4244-b7ed-9382b6c09049" />
2
2
 
3
+ As the author's account has been disabled by Claude Code, updates to the repository are paused for a few weeks.
4
+
5
+ The author is taking this opportunity to work on a multimodal project.
6
+
7
+ If there are any critical bugs requiring fixes, please submit them via the issues section; they can still be addressed.
8
+
3
9
  # CC-Viewer
4
10
 
5
11
  Based on Claude Code, a Vibe Coding tool that distills and accumulates real development experience:
6
12
 
7
- 1. Raise your capability ceiling: run /ultraPlan and /ultraReview locally, while avoiding fully exposing your project code to Claude's cloud;
8
- 2. Multi-device compatibility: code on mobile devices (within your LAN), the web version adapts to all kinds of scenarios, easy to embed into browser extensions or OS split-screen, and native installers are provided;
9
- 3. Complete log tracing: full Claude Code payload interception and analysis — ideal for logging, troubleshooting, learning, and reverse engineering;
10
- 4. Shared learning and experience: lots of learning material and development know-how are baked in (see the "?" icons throughout the system);
11
- 5. Native experience preserved: only enhances Claude Code's capabilities without making any substantive changes to the core, keeping the native experience intact;
12
- 6. Third-party model support: compatible with deepseek-v4-\*, GLM 5.1, Kimi K2.6, with cc-switch built in so you can hot-swap third-party tools at any time;
13
-
14
13
  <img width="860" alt="cc-viewer — deploy once, share with every device" src="https://raw.githubusercontent.com/weiesky/cc-viewer/main/docs/cc-viewer-share.svg" />
15
14
 
16
15
  English | [简体中文](./docs/README.zh.md) | [繁體中文](./docs/README.zh-TW.md) | [한국어](./docs/README.ko.md) | [日本語](./docs/README.ja.md) | [Deutsch](./docs/README.de.md) | [Español](./docs/README.es.md) | [Français](./docs/README.fr.md) | [Italiano](./docs/README.it.md) | [Dansk](./docs/README.da.md) | [Polski](./docs/README.pl.md) | [Русский](./docs/README.ru.md) | [العربية](./docs/README.ar.md) | [Norsk](./docs/README.no.md) | [Português (Brasil)](./docs/README.pt-BR.md) | [ไทย](./docs/README.th.md) | [Türkçe](./docs/README.tr.md) | [Українська](./docs/README.uk.md)
@@ -152,7 +151,7 @@ By default, remote (LAN) access requires the `?token=` query that ccv prints at
152
151
  * Each request inlines Token usage stats (input/output tokens, cache creation/read, hit rate)
153
152
  * Compatible with Claude Code Router (CCR) and other proxy scenarios — falls back to matching requests by API path pattern
154
153
 
155
- <a href="https://www.star-history.com/?repos=weiesky%2Fcc-viewer&type=date&legend=top-left">
154
+ <a href="https://www.star-history.com/?type=date&repos=weiesky%2Fcc-viewer">
156
155
  <picture>
157
156
  <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=weiesky/cc-viewer&type=date&theme=dark&legend=top-left" />
158
157
  <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=weiesky/cc-viewer&type=date&legend=top-left" />
package/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // Windows NTFS + Defender 使每次异步 I/O 开销更大,默认 4 线程不够用
3
+ // Windows NTFS + Defender increase per-async-IO overhead; default 4 threads aren't enough
4
4
  if (process.platform === 'win32' && !process.env.UV_THREADPOOL_SIZE) {
5
5
  process.env.UV_THREADPOOL_SIZE = '16';
6
6
  }
@@ -19,8 +19,8 @@ import { createHardenedCleanup, installWinKeypressFallback } from './server/lib/
19
19
 
20
20
  const __dirname = fileURLToPath(new URL('.', import.meta.url));
21
21
 
22
- // 注入 marker 常量定义在 server/lib/cli-inject.js(便于单元测试);
23
- // 本文件仅 re-export helper hook 使用,保持现有行为。
22
+ // Injection marker constants are defined in server/lib/cli-inject.js (for testability);
23
+ // This file only re-exports them for use by helpers and hooks, preserving existing behavior.
24
24
  const INJECT_START = _INJECT_START;
25
25
  const INJECT_END = _INJECT_END;
26
26
  const INJECT_BLOCK = _buildInjectBlock(INJECT_IMPORT);
@@ -31,9 +31,9 @@ const SHELL_HOOK_END = '# <<< CC-Viewer Auto-Inject <<<';
31
31
 
32
32
  const cliPath = resolveCliPath();
33
33
 
34
- // 统一的"claude 找不到"错误提示:区分"Claude Code 2.x wrapper 装了但原生二进制
35
- // ready(--ignore-scripts / --omit=optional / 某些 pnpm 配置)"和"claude 根本
36
- // 没装"两种情况,给出针对性的修复指引。
34
+ // Unified "claude not found" error message: distinguishes between "Claude Code 2.x wrapper
35
+ // installed but native binary not ready (--ignore-scripts / --omit=optional / certain pnpm
36
+ // configurations)" and "claude not installed at all," giving targeted fix guidance.
37
37
  function reportClaudeNotFound(cliPathHint) {
38
38
  const globalRoot = getGlobalNodeModulesDir();
39
39
  if (hasClaude2xWrapper(globalRoot)) {
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 系列映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 系列使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 系列使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 系列使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 等级 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 家族映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 家族使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 家族使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 家族使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 级别 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 家族映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 家族使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 家族使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 家族使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 级别 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -1,5 +1,7 @@
1
1
  # CC-Viewer Configuration Reference
2
2
 
3
+ > Also available in [简体中文](../zh/GlobalSettings.md) and other languages.
4
+
3
5
  ## 1. Global Settings Panel (UI)
4
6
 
5
7
  Open via top-left menu → "Global Settings".
@@ -166,8 +168,11 @@ Stored in `<log_dir>/profile.json`, managed via the "Proxy Switch" panel in the
166
168
  | `name` | Display name |
167
169
  | `baseURL` | Proxy API address (replaces request origin) |
168
170
  | `apiKey` | Proxy API key (replaces auth headers) |
169
- | `models` | Available model list |
170
- | `activeModel` | Currently selected model |
171
+ | `ANTHROPIC_MODEL` | Primary model (fable/mythos family maps here) |
172
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | Model for the opus family (extended) |
173
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | Model for the sonnet family (extended) |
174
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Model for the haiku family (extended) |
175
+ | `effort` | Forced `output_config.effort` level |
171
176
 
172
177
  ## 9. Plugin System
173
178
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 家族映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 家族使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 家族使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 家族使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 级别 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 家族映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 家族使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 家族使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 家族使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 级别 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 主模型(fable/mythos 家族映射到此) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 家族使用的模型(扩展) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 家族使用的模型(扩展) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 家族使用的模型(扩展) |
172
+ | `effort` | 强制的 `output_config.effort` 级别 |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | Primary model. Requests whose model belongs to the `fable` / `mythos` family are rewritten to this |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | Extended: requests whose model contains `opus` are rewritten to this |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | Extended: requests whose model contains `sonnet` are rewritten to this |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | Extended: requests whose model contains `haiku` are rewritten to this |
20
+ | **Effort Level** | ❌ | Injects `output_config.effort` (`low`/`medium`/`high`/`xhigh`/`max`) into the request body. Leave as "Default" to skip |
21
+
22
+ Model matching is a case-insensitive substring test on the request's `model` field, so any version (e.g. `claude-opus-4-8`, a future `claude-opus-5`) maps to the same family with no reconfiguration. An empty family field means that family is left unchanged; an unrecognized family is passed through untouched.
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — Rewrites the request body `model` by family (opus/sonnet/haiku the matching field; fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — If an effort level is set, injects `output_config.effort` (skipped for `count_tokens` / heartbeat requests)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - Legacy profiles using `models` / `activeModel` are auto-migrated to `ANTHROPIC_MODEL` on load
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | プライマリモデル(fable/mythos ファミリーはここにマッピング) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus ファミリー向けのモデル(拡張) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet ファミリー向けのモデル(拡張) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku ファミリー向けのモデル(拡張) |
172
+ | `effort` | 強制する `output_config.effort` レベル |
170
173
 
171
174
  ## 九、插件系统
172
175
 
@@ -13,8 +13,13 @@ Hot-Switch Proxy lets you dynamically redirect API requests to a different endpo
13
13
  | **Name** | ✅ | Display name for this proxy, used to identify it |
14
14
  | **Base URL** | ✅ | Base URL of the API service (e.g. `https://api.example.com`). The original request origin will be replaced |
15
15
  | **API Key** | ✅ | API key for the proxy service, replaces the original authentication |
16
- | **Models** | ❌ | Comma-separated list of models supported by this proxy (e.g. `model-a, model-b`) |
17
- | **Active Model** | ❌ | Select the active model from the list. The `model` field in requests will be replaced |
16
+ | **ANTHROPIC_MODEL** | ❌ | プライマリモデル。`fable` / `mythos` ファミリーに属するモデルのリクエストはこの値に書き換えられます |
17
+ | **ANTHROPIC_DEFAULT_OPUS_MODEL** | ❌ | 拡張:`model` `opus` を含むリクエストはこの値に書き換えられます |
18
+ | **ANTHROPIC_DEFAULT_SONNET_MODEL** | ❌ | 拡張:`model` に `sonnet` を含むリクエストはこの値に書き換えられます |
19
+ | **ANTHROPIC_DEFAULT_HAIKU_MODEL** | ❌ | 拡張:`model` に `haiku` を含むリクエストはこの値に書き換えられます |
20
+ | **強度レベル** | ❌ | リクエストボディに `output_config.effort`(`low`/`medium`/`high`/`xhigh`/`max`)を注入します。「デフォルト」のままにするとスキップされます |
21
+
22
+ モデルのマッチングはリクエストの `model` フィールドに対する大文字小文字を区別しない部分文字列判定なので、任意のバージョン(例:`claude-opus-4-8`、将来の `claude-opus-5`)が再設定なしで同じファミリーにマッピングされます。ファミリーのフィールドが空の場合、そのファミリーは変更されません。認識できないファミリーはそのまま透過されます。
18
23
 
19
24
  ## How It Works
20
25
 
@@ -22,7 +27,8 @@ When a proxy is active, `server/interceptor.js` performs the following before ea
22
27
 
23
28
  1. **URL Rewrite** — Replaces the request origin with the proxy's Base URL
24
29
  2. **Auth Replace** — Replaces `x-api-key` or `Authorization` header with the proxy's API Key
25
- 3. **Model Replace** — If an active model is set, replaces the `model` field in the request body
30
+ 3. **Model Replace** — リクエストボディの `model` をファミリー単位で書き換えます(opus/sonnet/haiku 対応するフィールド、fable/mythos `ANTHROPIC_MODEL`)
31
+ 4. **Effort Inject** — 強度レベルが設定されている場合、`output_config.effort` を注入します(`count_tokens` / ハートビートリクエストはスキップ)
26
32
 
27
33
  ## Config File
28
34
 
@@ -38,8 +44,11 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
38
44
  "name": "My Proxy",
39
45
  "baseURL": "https://api.example.com",
40
46
  "apiKey": "sk-xxx",
41
- "models": ["model-a", "model-b"],
42
- "activeModel": "model-a"
47
+ "ANTHROPIC_MODEL": "model-primary",
48
+ "ANTHROPIC_DEFAULT_OPUS_MODEL": "model-opus",
49
+ "ANTHROPIC_DEFAULT_SONNET_MODEL": "model-sonnet",
50
+ "ANTHROPIC_DEFAULT_HAIKU_MODEL": "model-haiku",
51
+ "effort": "max"
43
52
  }
44
53
  ]
45
54
  }
@@ -47,4 +56,5 @@ Configuration is stored at `~/.claude/cc-viewer/profile.json`. Click the folder
47
56
 
48
57
  - `active` — ID of the current profile. Set to `"max"` for direct connection (no proxy)
49
58
  - `profiles` — Profile list. `id: "max"` is built-in and cannot be deleted
59
+ - 旧形式の `models` / `activeModel` を使用する profile は、読み込み時に自動的に `ANTHROPIC_MODEL` へ移行されます
50
60
  - Changes take effect within ~1.5 seconds (monitored via `fs.watchFile`), no restart needed
@@ -165,8 +165,11 @@ claude() { ... }
165
165
  | `name` | 显示名称 |
166
166
  | `baseURL` | 代理 API 地址(替换请求 origin) |
167
167
  | `apiKey` | 代理 API 密钥(替换认证头) |
168
- | `models` | 可用模型列表 |
169
- | `activeModel` | 当前选中的模型 |
168
+ | `ANTHROPIC_MODEL` | 기본 모델(fable/mythos 계열이 여기로 매핑됨) |
169
+ | `ANTHROPIC_DEFAULT_OPUS_MODEL` | opus 계열용 모델(확장) |
170
+ | `ANTHROPIC_DEFAULT_SONNET_MODEL` | sonnet 계열용 모델(확장) |
171
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | haiku 계열용 모델(확장) |
172
+ | `effort` | 강제 적용할 `output_config.effort` 레벨 |
170
173
 
171
174
  ## 九、插件系统
172
175