mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
docs: document Codex Chat reasoning auto-detection
Add a "Reasoning Auto-Detection" subsection to the Codex local-routing manual (zh/en/ja) with the provider capability matrix, and record the feature plus the streaming-usage and tool-call reasoning backfill fixes in the changelog. Drop the removed Kimi For Coding preset from the changelog's Codex Chat preset list.
This commit is contained in:
@@ -581,6 +581,24 @@ Once **Needs Local Routing** is enabled, a **Model Mapping** table appears below
|
||||
- Entries are saved exactly as listed and are the single source of truth for the model list
|
||||
- **Codex must be restarted** to refresh the model list after changes (`model_catalog_json` is loaded at Codex startup)
|
||||
|
||||
#### Reasoning Auto-Detection
|
||||
|
||||
With Local Routing on, CC Switch **auto-detects** each provider's reasoning interface and converts Codex's outgoing reasoning request into a parameter the upstream understands — **no manual setup required**. Detection is based on the provider's name, base URL, and model:
|
||||
|
||||
- **Aggregator / hosting platforms first**: OpenRouter, SiliconFlow, etc. are handled by platform rules (the same model can expose a completely different reasoning interface on different platforms)
|
||||
- **Otherwise by model brand**: DeepSeek, Kimi / Moonshot, Zhipu GLM, Qwen, MiniMax, Xiaomi MiMo, StepFun each have their own rules
|
||||
|
||||
Providers fall into two reasoning-capability tiers:
|
||||
|
||||
| Capability | Meaning | Example providers |
|
||||
|------------|---------|-------------------|
|
||||
| **Effort levels supported** | Reasoning strength is adjustable (low / medium / high, etc.) | DeepSeek, OpenRouter, StepFun (`step-3.5-flash-2603` only) |
|
||||
| **On/off switch only** | Reasoning can only be turned on or off; **levels have no effect** | Kimi, Zhipu GLM, Qwen, MiniMax, Xiaomi MiMo, SiliconFlow |
|
||||
|
||||
> ⚠️ **Effort levels do nothing for some providers**: if a provider only supports an on/off switch, changing the reasoning effort in Codex (`model_reasoning_effort` low / medium / high) has **no effect** — CC Switch does not forward the level to these upstreams (their API rejects the parameter, and sending it anyway may break the request). Their reasoning is **on by default** and works via on/off rather than tiering. Only providers with real effort levels (e.g. DeepSeek, OpenRouter) actually respond to a level change.
|
||||
|
||||
> 💡 **Detection is keyword matching on name / base URL / model**, not a real capability probe. Official domains (e.g. `api.deepseek.com`, `api.moonshot.cn`) are always recognized; a relay that rewrites the domain and model name may not be detected, in which case no reasoning parameter is injected.
|
||||
|
||||
### Codex 1M Context Window
|
||||
|
||||
When adding a Codex provider, an **Enable 1M Context Window** toggle is available:
|
||||
|
||||
@@ -581,6 +581,24 @@ Codex プロバイダーの編集時、**ローカルルーティングが必要
|
||||
- リストの内容はそのまま保存され、モデルリストの唯一の情報源となります
|
||||
- 変更後、モデルリストを更新するには **Codex の再起動が必要** です(`model_catalog_json` は Codex 起動時に読み込まれます)
|
||||
|
||||
#### 思考能力(Reasoning)の自動判定
|
||||
|
||||
ローカルルーティングを有効にすると、CC Switch はプロバイダーの「思考」(reasoning)インターフェースを**自動判定**し、Codex が送る思考リクエストを上流が理解できるパラメータに変換します(**手動設定は不要**)。判定はプロバイダーの名前・エンドポイント・モデル名に基づきます:
|
||||
|
||||
- **集約 / ホスティングプラットフォーム優先**:OpenRouter、SiliconFlow などはプラットフォーム規則で処理(同じモデルでもプラットフォームごとに思考インターフェースが全く異なる場合があるため)
|
||||
- **それ以外はモデルブランド別**:DeepSeek、Kimi / Moonshot、Zhipu GLM、Qwen、MiniMax、Xiaomi MiMo、StepFun などにそれぞれ規則あり
|
||||
|
||||
プロバイダーの「思考」能力は 2 種類に分かれます:
|
||||
|
||||
| 能力 | 意味 | 代表的なプロバイダー |
|
||||
|------|------|----------------------|
|
||||
| **思考レベル対応** | 思考の強度を調整可能(low / medium / high など) | DeepSeek、OpenRouter、StepFun(`step-3.5-flash-2603` のみ) |
|
||||
| **オン / オフ切替のみ** | 思考のオン / オフのみ、**レベルは無効** | Kimi、Zhipu GLM、Qwen、MiniMax、Xiaomi MiMo、SiliconFlow |
|
||||
|
||||
> ⚠️ **一部のプロバイダーでは思考レベルが効きません**:オン / オフ切替のみのプロバイダーでは、Codex で思考レベル(`model_reasoning_effort` の low / medium / high)を変えても**効果はありません**——CC Switch はこれらの上流にレベルを送りません(API がパラメータを受け付けず、無理に送るとリクエストが拒否される可能性があるため)。これらのプロバイダーの思考は**デフォルトでオン**で、「調整」ではなく「オン / オフ」で動作します。実際にレベル変更が効くのは、思考レベルに対応したプロバイダー(DeepSeek、OpenRouter など)だけです。
|
||||
|
||||
> 💡 **判定は名前 / エンドポイント / モデル名のキーワードマッチング**であり、実際の能力探索ではありません。公式ドメイン(`api.deepseek.com`、`api.moonshot.cn` など)は常に認識されますが、ドメインとモデル名を書き換えた中継サービスでは判定できないことがあり、その場合は思考パラメータが一切注入されません。
|
||||
|
||||
### Codex 1M コンテキストウィンドウ
|
||||
|
||||
Codex プロバイダーの追加時、**1M コンテキストウィンドウを有効化** トグルが利用できます:
|
||||
|
||||
@@ -581,6 +581,24 @@ v3.13.0 起新增的高级选项。默认情况下,CC Switch 会把配置的 `
|
||||
- 表中条目按填写内容原样保存,是模型列表的唯一来源
|
||||
- **修改后需要重启 Codex** 才能刷新模型列表(`model_catalog_json` 在 Codex 启动时加载)
|
||||
|
||||
#### 思考能力(Reasoning)自适应
|
||||
|
||||
开启本地路由后,CC Switch 会**自动识别**供应商的「思考」(reasoning)接口,把 Codex 发出的思考请求转换成上游能理解的参数,**无需手动配置**。识别依据是供应商的名称、端点和模型名:
|
||||
|
||||
- **聚合 / 托管平台优先**:OpenRouter、SiliconFlow 等按平台规则处理(同一模型在不同平台上的思考接口可能完全不同)
|
||||
- **其余按模型品牌**:DeepSeek、Kimi / Moonshot、智谱 GLM、通义千问、MiniMax、小米 MiMo、阶跃星辰 StepFun 等各有对应规则
|
||||
|
||||
不同供应商支持的「思考」能力分两类:
|
||||
|
||||
| 能力 | 含义 | 代表供应商 |
|
||||
|------|------|-----------|
|
||||
| **支持思考等级** | 可调节思考强度(low / medium / high 等) | DeepSeek、OpenRouter、StepFun(仅 `step-3.5-flash-2603`) |
|
||||
| **仅支持思考开关** | 只能开 / 关思考,**等级无效** | Kimi、智谱 GLM、通义千问、MiniMax、小米 MiMo、SiliconFlow |
|
||||
|
||||
> ⚠️ **思考等级对部分供应商无效**:如果供应商只支持「思考开关」,那么在 Codex 里调节思考等级(`model_reasoning_effort` 的 low / medium / high)**不会有任何效果**——CC Switch 不会把等级透传给这类上游(它们的接口不接受该参数,硬传可能导致请求被拒)。这类供应商的思考默认**开启**,靠「开 / 关」而非「调档」工作。只有支持思考等级的供应商(如 DeepSeek、OpenRouter),调节等级才真正生效。
|
||||
|
||||
> 💡 **识别基于名称 / 端点 / 模型名的关键词匹配**,不是真正的能力探测。官方域名(如 `api.deepseek.com`、`api.moonshot.cn`)都能正确识别;如果你用的中转改写了域名和模型名,可能识别不到,此时不会注入任何思考参数。
|
||||
|
||||
### Codex 1M 上下文窗口
|
||||
|
||||
添加 Codex 供应商时,提供 **启用 1M 上下文窗口** 开关:
|
||||
|
||||
Reference in New Issue
Block a user