diff --git a/docs/user-manual/en/4-proxy/4.4-usage.md b/docs/user-manual/en/4-proxy/4.4-usage.md index fe93db20f..d72b26c84 100644 --- a/docs/user-manual/en/4-proxy/4.4-usage.md +++ b/docs/user-manual/en/4-proxy/4.4-usage.md @@ -186,6 +186,22 @@ Set prices for each model (per million tokens): | Cache Read Price | Price per million cache hit tokens | | Cache Creation Price | Price per million cache creation tokens | +### Model ID Normalization Rules + +Before matching pricing, CC Switch normalizes the requested model ID: + +- Remove everything before the last `/` +- Remove everything after `:` +- Replace `@` with `-` + +When adding pricing entries, enter the normalized Model ID rather than the full raw model name from the request. + +| Raw model name | Model ID to enter | Note | +|-------|-------------------|------| +| `stepfun-ai/step-3.5-flash` | `step-3.5-flash` | Removes the provider prefix | +| `moonshotai/kimi-k2-0905:exa` | `kimi-k2-0905` | Removes the prefix and the `:` suffix | +| `gpt-5.2-codex@low` | `gpt-5.2-codex-low` | Replaces `@` with `-` | + ### Operations - **Add**: Click the "Add" button to add model pricing diff --git a/docs/user-manual/ja/4-proxy/4.4-usage.md b/docs/user-manual/ja/4-proxy/4.4-usage.md index 9d34caebc..2c63d11c0 100644 --- a/docs/user-manual/ja/4-proxy/4.4-usage.md +++ b/docs/user-manual/ja/4-proxy/4.4-usage.md @@ -186,6 +186,22 @@ Token 使用量の変化を表示: | キャッシュ読取価格 | 100 万キャッシュヒット Token あたりの価格 | | キャッシュ作成価格 | 100 万キャッシュ作成 Token あたりの価格 | +### モデル ID の正規化ルール + +料金を照合する前に、CC Switch はリクエスト内のモデル ID を正規化します: + +- 最後の `/` より前の接頭辞を削除 +- `:` 以降の接尾辞を削除 +- `@` を `-` に置換 + +料金設定では、リクエスト内の完全な元のモデル名ではなく、正規化後のモデル ID を入力してください。 + +| 元のモデル名 | 入力するモデル ID | 説明 | +|------|------|------| +| `stepfun-ai/step-3.5-flash` | `step-3.5-flash` | プロバイダー接頭辞を削除 | +| `moonshotai/kimi-k2-0905:exa` | `kimi-k2-0905` | 接頭辞と `:` 以降を削除 | +| `gpt-5.2-codex@low` | `gpt-5.2-codex-low` | `@` を `-` に置換 | + ### 操作 - **追加**:「追加」ボタンで新しいモデル価格を追加 diff --git a/docs/user-manual/zh/4-proxy/4.4-usage.md b/docs/user-manual/zh/4-proxy/4.4-usage.md index c2c693a22..98d6d88d7 100644 --- a/docs/user-manual/zh/4-proxy/4.4-usage.md +++ b/docs/user-manual/zh/4-proxy/4.4-usage.md @@ -186,6 +186,22 @@ | 缓存读取价格 | 每百万缓存命中 Token 的价格 | | 缓存创建价格 | 每百万缓存创建 Token 的价格 | +### 模型 ID 匹配规则 + +在匹配定价前,CC Switch 会先对请求中的模型 ID 做标准化处理: + +- 去掉最后一个 `/` 之前的前缀 +- 去掉 `:` 之后的后缀 +- 将 `@` 替换为 `-` + +因此,在定价配置中请填写清洗后的模型 ID,而不是请求里的完整原始模型名。 + +| 原始模型名 | 应填写的模型 ID | 说明 | +|------|------|------| +| `stepfun-ai/step-3.5-flash` | `step-3.5-flash` | 去掉供应商前缀 | +| `moonshotai/kimi-k2-0905:exa` | `kimi-k2-0905` | 去掉前缀和 `:` 后缀 | +| `gpt-5.2-codex@low` | `gpt-5.2-codex-low` | 将 `@` 替换为 `-` | + ### 操作 - **添加**:点击「添加」按钮新增模型定价