Skip to content

Commit 5d86c4a

Browse files
docs(claude): separate the fixed picker floor from launch-slot marking
Discovery and Desktop picker rows use the fixed 829,800-token floor. Launch env slots follow the configured compact threshold. Forced subagents mark a non-Anthropic selector at that floor and keep the genuine-1M rule for Anthropic Claude and bare claude-* ids. Co-authored-by: JUN <[email protected]>
1 parent 0a75875 commit 5d86c4a

8 files changed

Lines changed: 65 additions & 52 deletions

File tree

‎docs-site/src/content/docs/fr/guides/claude-code.md‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,8 +470,9 @@ résolution de l'alias et le routage.
470470
Claude Code attribue une limite de 200k jetons à tout modèle qu'il ne reconnaît pas. Le **contexte automatique**, activé
471471
par défaut, corrige ce comportement :
472472

473-
1. Les modèles dont la fenêtre réelle dépasse 200k **et** atteint au moins le seuil de compactage automatique obtiennent le
474-
marqueur `[1m]` dans les lignes du sélecteur et les variables d'environnement qui les désignent.
473+
1. Les variables d'environnement de lancement reçoivent le marqueur `[1m]` lorsque la fenêtre réelle dépasse 200k **et**
474+
atteint au moins le seuil de compactage automatique configuré. Les lignes de découverte et du sélecteur Desktop ne suivent pas
475+
ce seuil : elles utilisent le plancher fixe de 829 800 jetons (1M réel pour un modèle Claude sur une route Anthropic).
475476
2. `CLAUDE_CODE_AUTO_COMPACT_WINDOW` (`829800` par défaut, plage `100000`–`1000000`) est injecté afin
476477
que la conversation soit automatiquement résumée à ce seuil.
477478

@@ -484,8 +485,9 @@ Trois états de configuration :
484485
La valeur de compactage est réglable dans **Connexion → Claude**. **Avertissement :** une valeur supérieure à la fenêtre réelle d'un modèle
485486
rend ce modèle inutilisable : les tours échouent avant que le résumé puisse se déclencher.
486487

487-
Les modèles Anthropic natifs dont le contexte est inférieur à 1M ne sont jamais marqués automatiquement. Les valeurs que vous exportez vous-même
488-
restent prioritaires ; le proxy s'appuie sur votre valeur pour déterminer les modèles qui peuvent recevoir le marqueur sans risque.
488+
Les modèles Anthropic natifs dont le contexte est inférieur à 1M ne sont jamais marqués automatiquement. Une fenêtre de compactage que vous exportez vous-même
489+
reste prioritaire pour le marquage des variables de lancement ; le proxy s'appuie sur votre valeur pour déterminer les modèles qui peuvent recevoir le marqueur sans risque.
490+
Les lignes de découverte ignorent cet export et conservent le plancher fixe.
489491
Les valeurs de configuration invalides définies manuellement reviennent à 829,800.
490492

491493
### Environnement effectif des modèles
@@ -746,7 +748,7 @@ une valeur `ANTHROPIC_BASE_URL` obsolète. Ouvrez un nouveau terminal ou réexé
746748

747749
**Plafond de contexte 200k malgré un grand modèle** — Sélectionnez la variante `[1m]` dans le sélecteur ou activez
748750
le contexte automatique, activé par défaut. Si le sélecteur n'affiche aucune ligne `[1m]`, la fenêtre de contexte de référence du modèle
749-
peut être inférieure au seuil de compactage automatique.
751+
peut être inférieure au plancher fixe de 829 800 jetons.
750752

751753
**Nombre élevé de jetons provenant du chargement des compétences** — La compétence `claude-api` fournie (~136k jetons) se charge automatiquement
752754
quand un modèle Claude est mentionné. Ce comportement est normal avec le transfert natif ; pour les modèles routés, opencodex la remplace
@@ -770,7 +772,7 @@ The Subagents page offers **Force all subagents onto one model**, off by default
770772

771773
`ocx agent subagents force combo/tev-auto` sets `claudeCode.subagentModelForce`; `ocx agent subagents force -` clears it. `ocx agent status` reports the setting. `GET /api/subagent-models` returns `force`, `forceAvailable`, and `forceStatus`; `PUT` accepts `{ "force": "combo/tev-auto" }` or `{ "force": null }` without changing the roster. Omitting `force` leaves it unchanged. Invalid or unexposed targets are rejected on write; stale targets are reported and skipped at launch.
772774

773-
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` only for an authoritative million-token window; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
775+
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` when the authoritative window reaches the fixed 829,800-token floor, and only for a genuine 1M window on Anthropic Claude models and bare `claude-*` selectors; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
774776

775777
Claude Code **2.1.257 or newer** is required for FORCE. Plugin and built-in agents (including Explore/Plan) and per-call model arguments are overridden. Forks and subagent skills with `model: inherit` keep the main conversation model. The main loop and Haiku/small-fast sidecars are unaffected. Existing roster files remain available.
776778

‎docs-site/src/content/docs/guides/claude-code.md‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,10 @@ resolution and routing.
645645
Claude Code accounts 200k tokens for any model it does not recognize. **Auto context** (on by
646646
default) fixes that:
647647

648-
1. Models whose real window is above 200k **and** at least the auto-compact threshold get the
649-
`[1m]` marker on their picker rows and env slots.
648+
1. Launch env slots get the `[1m]` marker when the model's real window is above 200k **and** at
649+
least the configured auto-compact threshold. Discovery and Desktop picker rows do not follow
650+
that threshold: they use the fixed 829,800-token floor (a genuine 1M for Claude models on an
651+
Anthropic route).
650652
2. `CLAUDE_CODE_AUTO_COMPACT_WINDOW` (default `829800`, range `100000`–`1000000`) is injected so
651653
the conversation auto-summarizes at that point.
652654

@@ -671,8 +673,9 @@ history and try compacting a fork with fewer enabled tool or MCP schemas, if you
671673
that workflow. A `[1m]` marker or larger client accounting setting does not raise the upstream
672674
limit, and OpenCodex does not silently remove history or tools to make it fit.
673675

674-
Sub-1M native Anthropic models are never auto-marked. Values you export yourself always win (the
675-
proxy uses YOUR value to decide which models are safe to mark). Invalid hand-edited config values
676+
Sub-1M native Anthropic models are never auto-marked. A compact window you export yourself wins
677+
for launch-slot marking (the proxy uses YOUR value to decide which models are safe to mark).
678+
Discovery rows ignore that export and keep the fixed floor. Invalid hand-edited config values
676679
fall back to 829,800.
677680

678681
### Effective model environment
@@ -1004,7 +1007,7 @@ set (automatic with `ocx claude`). Run `ocx claude` to refresh the gateway model
10041007

10051008
**200k context ceiling despite big model** — Select the `[1m]` variant in the picker, or enable
10061009
auto-context (on by default). If the picker shows no `[1m]` row, the model's authoritative context
1007-
window may be below the auto-compact threshold.
1010+
window may be below the fixed 829,800-token floor.
10081011

10091012
**High token count from skill loads** — The bundled `claude-api` skill (~136k tokens) auto-loads
10101013
on Claude model mentions. This is normal for native passthrough; on routed models, opencodex stubs
@@ -1070,7 +1073,7 @@ The Subagents page offers **Force all subagents onto one model**, off by default
10701073

10711074
`ocx agent subagents force combo/tev-auto` sets `claudeCode.subagentModelForce`; `ocx agent subagents force -` clears it. `ocx agent status` reports the setting. `GET /api/subagent-models` returns `force`, `forceAvailable`, and `forceStatus`; `PUT` accepts `{ "force": "combo/tev-auto" }` or `{ "force": null }` without changing the roster. Omitting `force` leaves it unchanged. Invalid or unexposed targets are rejected on write; stale targets are reported and skipped at launch.
10721075

1073-
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` only for an authoritative million-token window; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
1076+
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` when the authoritative window reaches the fixed 829,800-token floor, and only for a genuine 1M window on Anthropic Claude models and bare `claude-*` selectors; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
10741077

10751078
Claude Code **2.1.257 or newer** is required for FORCE. Plugin and built-in agents (including Explore/Plan) and per-call model arguments are overridden. Forks and subagent skills with `model: inherit` keep the main conversation model. The main loop and Haiku/small-fast sidecars are unaffected. Existing roster files remain available.
10761079

‎docs-site/src/content/docs/ja/guides/claude-code.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,9 @@ v2 エイリアスはエスケープを展開します。読みやすい形式
322322
Claude Code は未知モデルのコンテキストを 200k トークンとして計算します。デフォルトでオンの**自動
323323
コンテキスト**がこの問題を解決します。
324324

325-
1. 実際のコンテキストウィンドウが 200k より大きく自動圧縮しきい値以上のモデルのピッカー行と環境スロットに
326-
`[1m]` 標識が付きます。
325+
1. 起動時の環境スロットには、実際のコンテキストウィンドウが 200k より大きく、設定した自動圧縮しきい値以上のとき
326+
`[1m]` 標識が付きます。ディスカバリーと Desktop のピッカー行はこのしきい値に従わず、固定の 829,800 トークン下限
327+
(Anthropic 経路の Claude モデルは実際の 1M)を使います。
327328
2. `CLAUDE_CODE_AUTO_COMPACT_WINDOW`(デフォルト `829800`、範囲 `100000`–`1000000`)を注入し、該当
328329
地点で会話を自動要約します。
329330

@@ -336,7 +337,7 @@ Claude Code は未知モデルのコンテキストを 200k トークンとし
336337
**接続 → Claude** で圧縮値を調整できます。**警告:** モデルの実際のコンテキストウィンドウより大きく上げると
337338
要約を開始する前にチャットエラーが発生します。
338339

339-
1M 未満のネイティブ Anthropic モデルには自動で標識を付けません。直接 export した値が常に優先し、プロキシは**ユーザーが指定した**値を基準にどのモデルに安全に標識を付けるか決定します。
340+
1M 未満のネイティブ Anthropic モデルには自動で標識を付けません。自分で export した圧縮値は起動スロットの標識に優先し、プロキシは**ユーザーが指定した**値を基準にどのモデルに安全に標識を付けるか決定します。ディスカバリー行はその export を無視し、固定の下限を保ちます。
340341
直接編集した設定値が不正な場合は 829,800 に戻ります。
341342

342343
### 実モデル環境
@@ -604,7 +605,7 @@ Anthropic バックエンドを明示すると意図的に失敗後停止しま
604605

605606
**大型モデルなのにコンテキストが 200k に制限される** — ピッカーで `[1m]` 変種を選ぶか、デフォルトでオンの
606607
自動コンテキストを使ってください。ピッカーに `[1m]` 行がない場合はモデルの公式コンテキストウィンドウが
607-
自動圧縮しきい値より小さい可能性があります。
608+
固定の 829,800 トークン下限より小さい可能性があります。
608609

609610
**スキル呼び出し時のトークン数が多い** — バンドル `claude-api` スキル(約 136k トークン)は Claude モデルに
610611
言及すると自動で読み込まれます。ネイティブパススルーでは正常で、ルーティングモデルでは opencodex が
@@ -624,7 +625,7 @@ The Subagents page offers **Force all subagents onto one model**, off by default
624625

625626
`ocx agent subagents force combo/tev-auto` sets `claudeCode.subagentModelForce`; `ocx agent subagents force -` clears it. `ocx agent status` reports the setting. `GET /api/subagent-models` returns `force`, `forceAvailable`, and `forceStatus`; `PUT` accepts `{ "force": "combo/tev-auto" }` or `{ "force": null }` without changing the roster. Omitting `force` leaves it unchanged. Invalid or unexposed targets are rejected on write; stale targets are reported and skipped at launch.
626627

627-
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` only for an authoritative million-token window; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
628+
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` when the authoritative window reaches the fixed 829,800-token floor, and only for a genuine 1M window on Anthropic Claude models and bare `claude-*` selectors; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
628629

629630
Claude Code **2.1.257 or newer** is required for FORCE. Plugin and built-in agents (including Explore/Plan) and per-call model arguments are overridden. Forks and subagent skills with `model: inherit` keep the main conversation model. The main loop and Haiku/small-fast sidecars are unaffected. Existing roster files remain available.
630631

‎docs-site/src/content/docs/ko/guides/claude-code.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ v2 별칭은 이스케이프를 펼쳐요. 읽기 쉬운 형식으로 표현할
354354
Claude Code는 알 수 없는 모델의 컨텍스트를 200k 토큰으로 계산해요. 기본으로 켜져 있는 **자동
355355
컨텍스트**는 이 문제를 해결해요.
356356

357-
1. 실제 컨텍스트 창이 200k보다 크고 자동 압축 임곗값 이상인 모델의 선택기 행과 환경 슬롯에
358-
`[1m]` 표식이 붙어요.
357+
1. 실행 환경 슬롯에는 실제 컨텍스트 창이 200k보다 크고 설정한 자동 압축 임곗값 이상일 때
358+
`[1m]` 표식이 붙어요. 디스커버리와 Desktop 선택기 행은 그 임곗값을 따르지 않고, 고정된 829,800 토큰 하한
359+
(Anthropic 경로의 Claude 모델은 실제 1M)을 써요.
359360
2. `CLAUDE_CODE_AUTO_COMPACT_WINDOW`(기본값 `829800`, 범위 `100000`–`1000000`)를 주입해 해당
360361
지점에서 대화를 자동으로 요약해요.
361362

@@ -368,8 +369,9 @@ Claude Code는 알 수 없는 모델의 컨텍스트를 200k 토큰으로 계산
368369
**연결 → Claude**에서 압축 값을 조절할 수 있어요. **경고:** 모델의 실제 컨텍스트 창보다 크게 올리면
369370
요약을 시작하기 전에 채팅 오류가 발생해요.
370371

371-
1M 미만인 네이티브 Anthropic 모델에는 자동으로 표식을 붙이지 않아요. 직접 내보낸 값이 항상
372+
1M 미만인 네이티브 Anthropic 모델에는 자동으로 표식을 붙이지 않아요. 직접 내보낸 압축 값은 실행 슬롯 표식에서 항상
372373
우선하며, 프록시는 **사용자가 지정한** 값을 기준으로 어떤 모델에 안전하게 표식을 붙일지 결정해요.
374+
디스커버리 행은 그 값을 무시하고 고정 하한을 유지해요.
373375
직접 편집한 설정값이 잘못되면 829,800로 돌아가요.
374376

375377
### 실제 모델 환경
@@ -667,7 +669,7 @@ Anthropic 백엔드를 명시하면 의도적으로 실패 후 중단해요.
667669

668670
**대형 모델인데도 컨텍스트가 200k로 제한됨** — 선택기에서 `[1m]` 변형을 고르거나 기본으로
669671
켜져 있는 자동 컨텍스트를 사용하세요. 선택기에 `[1m]` 행이 없다면 모델의 공식 컨텍스트 창이
670-
자동 압축 임곗값보다 작을 수 있어요.
672+
고정된 829,800 토큰 하한보다 작을 수 있어요.
671673

672674
**스킬을 불러올 때 토큰 수가 많음** — 번들 `claude-api` 스킬(약 136k 토큰)은 Claude 모델을
673675
언급하면 자동으로 불러와요. 네이티브 패스스루에서는 정상이며, 라우팅 모델에서는 opencodex가
@@ -687,7 +689,7 @@ The Subagents page offers **Force all subagents onto one model**, off by default
687689

688690
`ocx agent subagents force combo/tev-auto` sets `claudeCode.subagentModelForce`; `ocx agent subagents force -` clears it. `ocx agent status` reports the setting. `GET /api/subagent-models` returns `force`, `forceAvailable`, and `forceStatus`; `PUT` accepts `{ "force": "combo/tev-auto" }` or `{ "force": null }` without changing the roster. Omitting `force` leaves it unchanged. Invalid or unexposed targets are rejected on write; stale targets are reported and skipped at launch.
689691

690-
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` only for an authoritative million-token window; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
692+
This takes effect on the **next routed `ocx claude` launch**, injecting `CLAUDE_CODE_SUBAGENT_MODEL` as an explicit proxy alias (with `[1m]` when the authoritative window reaches the fixed 829,800-token floor, and only for a genuine 1M window on Anthropic Claude models and bare `claude-*` selectors; native Claude targets use a reversible native alias) and `CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1`. Each nonempty shell-exported variable independently wins. Native launches inject neither variable; plain `claude` is not affected. No plugin files or `settings.json` are modified by this setting.
691693

692694
Claude Code **2.1.257 or newer** is required for FORCE. Plugin and built-in agents (including Explore/Plan) and per-call model arguments are overridden. Forks and subagent skills with `model: inherit` keep the main conversation model. The main loop and Haiku/small-fast sidecars are unaffected. Existing roster files remain available.
693695

0 commit comments

Comments
 (0)