dsh-thinking-levels 4.4.2 → 4.4.3

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/CHANGELOG.ja.md CHANGED
@@ -11,27 +11,35 @@
11
11
  - [Список изменений на русском](./CHANGELOG.ru.md)
12
12
  - [Changelog en español](./CHANGELOG.es.md)
13
13
 
14
- ## [4.4.2] — 2026-10-19(カードのトグル・可視説明 — ユーザーフィードバック)
15
-
16
- - 設定カードのチェックボックス(有効化/引継ぎマスター/レベル下げ/レベル上げ/モデルUI引き継ぎ)を楽観的な横置きピルトグルに変更(クリックで即時反転、書込拒否時はロールバック)。
17
- - モデルUI引き継ぎ行の下に常時表示の説明を追加(従来はツールチップのみ):ON で何が置き換わり、OFF で何が残り、auto マスクはどちらでも提供され続けること。
18
-
19
- ## [4.4.1] — 2026-10-19(takeoverUi 座席ウォッチドッグ — デスクトップ実測フィードバック)
20
-
21
- - 修正:`takeoverUi` がリロード不要で即時反映。4.4.0 はシート inject 時に設定ミラーを一度だけ読んでいたため、実機では設定チャネルのバインド/ミラー折り込みよりモデルシート呼出が先に走り、スイッチ ON でもパネルが着席しなかった(公式ポップアップのまま、コンテキストチップも消失)。着席判定はウォッチドッグ化され、設定ウェイストのバインドと各設定変更のたびに再評価されます。
22
- - カード:takeoverUi 行は楽観的な横置きピルトグルに(クリックで即反転、書込拒否時はロールバック)。
23
-
24
- ## [4.4.0] — 2026-10-19(issue まとめ対応:#2 #3 #4 #5)
25
-
26
- ### 修正
27
- - 能力カード(#2):`api` が openai-completions 以外のプロバイダーでは、Thinking / Supports-effort / thinkingFormat のコントロールを説明付きで無効化。無効な書き込みによる `card.writeError` を解消(ホストの Responses 互換ゲートはこれらのモデルレベルフィールドを提供しません)。
28
- - 読み込みコスト(#4):`resolveModel` 広告を冪等化(WeakSet ガード)。従来は `llm/adapters-updated` ごとにラッパーが積まれ、解決ごとに全量 settings 読み出しが発生していました。readout は世代キャッシュ化し、設定コミットで無効化。takeover ミラーの再同期は関連 namespace のコミットのみに実行。
29
- - 档位 chip(#5):レベルが `auto` のとき chip は **Auto** を維持し、そのステップの解決値は `→ <level>` の二次表示に降格(表示が上書きされる問題の解消)。
30
-
31
- ### 追加
32
- - `takeoverUi` 設定(既定 OFF、#3/#4):公式モデルポップアップを維持(検索・読み込みはネイティブ、`auto` はサーバー側広告で引き続き提供)。OFF の間は公式モデルのコンテキスト編集は設定カードに。ON で ModelPanel 引き継ぎを復元。変更後はリロードが必要。
33
- - ModelPanel ポップアップの検索(#3):4 モデル超で表示、公式の規則に準拠。
34
-
14
+ ## [4.4.3] — 2026-10-21(思考は全プロトコルで設定可能 — issue #6)
15
+
16
+ - 能力カード:思考チェックボックスが openai-completions 以外(Responses / Anthropic)でも再び選択可能に。書き込むのは protocol 非依存の `reasoningEfforts` で、ホスト llm-pi-ai が `reasoning: true` + `thinkingLevelMap` に解決し、pi-ai がプロトコルごとにネイティブ変換します(エフォート選択の前提)。
17
+ - 非 completions の思考宣言に completions 専用の `thinkingFormat` を同梱しなくなりました(モデル階層への書き込みは providers 全体の拒否を招くため、qwen 形式の自動補完はスキップ)。`off` は実値(`none`)を保つため、Off が「未対応」扱いで消えることはありません。
18
+ - `thinkingFormat` / 支持 think effort は従来どおり openai-completions 限定(実際に completions 専用の互換フィールド)。カードの注記もその旨に修正。
19
+ - ホスト側の互換同期:明示的な非 completions `api` を「カスタム openai-completions ゲートウェイ」と判定しないように(baseURL 判定はプロトコル未指定時のみ)。
20
+ - テスト 168/168 グリーン。
21
+
22
+ ## [4.4.2] — 2026-10-19(カードのトグル・可視説明 — ユーザーフィードバック)
23
+
24
+ - 設定カードのチェックボックス(有効化/引継ぎマスター/レベル下げ/レベル上げ/モデルUI引き継ぎ)を楽観的な横置きピルトグルに変更(クリックで即時反転、書込拒否時はロールバック)。
25
+ - モデルUI引き継ぎ行の下に常時表示の説明を追加(従来はツールチップのみ):ON で何が置き換わり、OFF で何が残り、auto マスクはどちらでも提供され続けること。
26
+
27
+ ## [4.4.1] — 2026-10-19(takeoverUi 座席ウォッチドッグ — デスクトップ実測フィードバック)
28
+
29
+ - 修正:`takeoverUi` がリロード不要で即時反映。4.4.0 はシート inject 時に設定ミラーを一度だけ読んでいたため、実機では設定チャネルのバインド/ミラー折り込みよりモデルシート呼出が先に走り、スイッチ ON でもパネルが着席しなかった(公式ポップアップのまま、コンテキストチップも消失)。着席判定はウォッチドッグ化され、設定ウェイストのバインドと各設定変更のたびに再評価されます。
30
+ - カード:takeoverUi 行は楽観的な横置きピルトグルに(クリックで即反転、書込拒否時はロールバック)。
31
+
32
+ ## [4.4.0] — 2026-10-19(issue まとめ対応:#2 #3 #4 #5)
33
+
34
+ ### 修正
35
+ - 能力カード(#2):`api` が openai-completions 以外のプロバイダーでは、Thinking / Supports-effort / thinkingFormat のコントロールを説明付きで無効化。無効な書き込みによる `card.writeError` を解消(ホストの Responses 互換ゲートはこれらのモデルレベルフィールドを提供しません)。
36
+ - 読み込みコスト(#4):`resolveModel` 広告を冪等化(WeakSet ガード)。従来は `llm/adapters-updated` ごとにラッパーが積まれ、解決ごとに全量 settings 読み出しが発生していました。readout は世代キャッシュ化し、設定コミットで無効化。takeover ミラーの再同期は関連 namespace のコミットのみに実行。
37
+ - 档位 chip(#5):レベルが `auto` のとき chip は **Auto** を維持し、そのステップの解決値は `→ <level>` の二次表示に降格(表示が上書きされる問題の解消)。
38
+
39
+ ### 追加
40
+ - `takeoverUi` 設定(既定 OFF、#3/#4):公式モデルポップアップを維持(検索・読み込みはネイティブ、`auto` はサーバー側広告で引き続き提供)。OFF の間は公式モデルのコンテキスト編集は設定カードに。ON で ModelPanel 引き継ぎを復元。変更後はリロードが必要。
41
+ - ModelPanel ポップアップの検索(#3):4 モデル超で表示、公式の規則に準拠。
42
+
35
43
  ## [4.3.1] — 2026-10-17(ホスト列挙の更新:0.2.1-rc.1 を追加)
36
44
 
37
45
  ### Fixed
@@ -40,21 +48,21 @@
40
48
  - devDependencies の `@deepseek-ai/dsh-client-*` を 0.2.0-rc.1 → 0.2.1-rc.1 に更新し、ビルドと全テスト(140 件)を対象ラインで検証。
41
49
  - README の互換記述(en/zh/ja/ko/de/es/fr/it/ru)を列挙に同期。動作変更なし。
42
50
 
43
- ## [4.3.0] — 2026-10-17
44
-
45
- ### 追加
46
- - 価格カタログ(src/price-catalog.ts):29 モデル x 地域。DeepSeek V4.1-Flash / V4-Flash / V4-Pro は公式のピーク/オフピーク2段(北京 09-12・14-18 がピーク、2026-08-17 施行)、GLM / Kimi / Qwen / Doubao / MiniMax / Ernie は一律価格。各項目は百万トークンあたりの3価格(非キャッシュ入力 / キャッシュヒット入力 / 出力)を保持し、asOf と出典を明記。海外(USD)枠は構造上予約するも公式確認まで意図的に空(数値の捏造なし)。
47
- - defaultPricing 設定(cn / global / custom / off、既定 off):カタログ外モデルは Flash 価格で估算せず「未計価」と表示。
48
- - 2026 国務院祝日/振替修正表(39 エントリ、dsh-session-guard と同源):振替出勤の週末は平日としてピーク判定、法定祝日は終日オフピーク。表外年は週末のみの劣化動作。
49
-
50
- ### 変更
51
- - プロジェクション stateVersion 1 -> 2:usage サンプルごとに確定時の計価レシートを state に永続化、同一 step 置換は記録値を減算(费率混在再計算と負値を排除)、会話/ターン集計は通貨別バケット。アップグレード直後に旧セッションは現行カタログで再折りたたみされ総額が一度変動、以降の設定変更は新規サンプルのみ影响。
52
- - 請求ポップオーバー:通貨別記号(¥ / $、不明は ISO コード)、flat/-null の正直な表示、「<model> で計価」はカタログ名から、混合通貨会話は合計せず通貨別行。
53
-
54
- ### 修正
55
- - settings.describe() の形状正規化(進程内配列 vs RPC エンベロープ {namespaces:[...]}):想定外形状は例外を投げず欠扱い(静默冻结クラスを解消)。
56
- - プロジェクション登録を try/catch で保護:請求单元的失败不再毒化插件整体或冷会话历史加载。
57
-
51
+ ## [4.3.0] — 2026-10-17
52
+
53
+ ### 追加
54
+ - 価格カタログ(src/price-catalog.ts):29 モデル x 地域。DeepSeek V4.1-Flash / V4-Flash / V4-Pro は公式のピーク/オフピーク2段(北京 09-12・14-18 がピーク、2026-08-17 施行)、GLM / Kimi / Qwen / Doubao / MiniMax / Ernie は一律価格。各項目は百万トークンあたりの3価格(非キャッシュ入力 / キャッシュヒット入力 / 出力)を保持し、asOf と出典を明記。海外(USD)枠は構造上予約するも公式確認まで意図的に空(数値の捏造なし)。
55
+ - defaultPricing 設定(cn / global / custom / off、既定 off):カタログ外モデルは Flash 価格で估算せず「未計価」と表示。
56
+ - 2026 国務院祝日/振替修正表(39 エントリ、dsh-session-guard と同源):振替出勤の週末は平日としてピーク判定、法定祝日は終日オフピーク。表外年は週末のみの劣化動作。
57
+
58
+ ### 変更
59
+ - プロジェクション stateVersion 1 -> 2:usage サンプルごとに確定時の計価レシートを state に永続化、同一 step 置換は記録値を減算(费率混在再計算と負値を排除)、会話/ターン集計は通貨別バケット。アップグレード直後に旧セッションは現行カタログで再折りたたみされ総額が一度変動、以降の設定変更は新規サンプルのみ影响。
60
+ - 請求ポップオーバー:通貨別記号(¥ / $、不明は ISO コード)、flat/-null の正直な表示、「<model> で計価」はカタログ名から、混合通貨会話は合計せず通貨別行。
61
+
62
+ ### 修正
63
+ - settings.describe() の形状正規化(進程内配列 vs RPC エンベロープ {namespaces:[...]}):想定外形状は例外を投げず欠扱い(静默冻结クラスを解消)。
64
+ - プロジェクション登録を try/catch で保護:請求单元的失败不再毒化插件整体或冷会话历史加载。
65
+
58
66
  ## [4.2.1] — 2026-10-12
59
67
 
60
68
  ### 変更 — stable への昇格(4.2.0-beta.29 からコード変更なし)
package/CHANGELOG.ko.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  `dsh-thinking-levels`의 주요 변경 사항을 기록합니다.
4
4
 
5
+ ## [4.4.3] — 2026-10-21 (사고는 모든 프로토콜에서 설정 가능 — issue #6)
6
+
7
+ - 능력 카드: 사고 체크박스가 openai-completions 외(Responses / Anthropic)에서도 다시 선택 가능합니다. 기록하는 값은 protocol 중립적인 `reasoningEfforts` 이며, 호스트 llm-pi-ai 가 `reasoning: true` + `thinkingLevelMap` 으로 해석하고 pi-ai 가 프로토콜별로 네이티브 변환합니다(에포트 선택의 전제).
8
+ - 비 completions 사고 선언에 completions 전용 `thinkingFormat` 을 더 이상 함께 기록하지 않습니다(모델 계층 기록은 providers 전체 거부를 유발하므로 qwen 형식 자동 채움 생략). `off` 는 실제 값(`none`)을 유지해 Off 가 "미지원"으로 사라지지 않습니다.
9
+ - `thinkingFormat` / 支持 think effort 는 계속 openai-completions 전용(실제로 completions 전용 호환 필드). 카드 안내 문구도 그에 맞게 수정.
10
+ - 호스트 측 호환 동기화: 명시적인 비 completions `api` 를 커스텀 openai-completions 게이트웨이로 판정하지 않음(baseURL 판정은 프로토콜 미지정 시에만).
11
+ - 테스트 168/168 통과.
12
+
5
13
  - [English changelog](./CHANGELOG.md)
6
14
  - [日本語 changelog](./CHANGELOG.ja.md)
7
15
  - [한국어 changelog](./CHANGELOG.ko.md)
@@ -11,27 +19,27 @@
11
19
  - [Список изменений на русском](./CHANGELOG.ru.md)
12
20
  - [Changelog en español](./CHANGELOG.es.md)
13
21
 
14
- ## [4.4.2] — 2026-10-19(카드 토글·가시 설명 — 사용자 피드백)
15
-
16
- - 설정 카드의 체크박스(활성화/인수 마스터/강등 허용/승격 허용/모델 UI 인수)를 낙관적 횡형 알약 토글로 변경 — 클릭 즉시 반전, 쓰기 거부 시 롤백.
17
- - 모델 UI 인수 행 아래에 상시 표시 설명 추가(기존엔 툴팁만): ON이 무엇을 대체하고 OFF가 무엇을 유지하며 auto 마스크는 양쪽 모두 계속 제공됨.
18
-
19
- ## [4.4.1] — 2026-10-19(takeoverUi 시트 감시 — 데스크톱 실측 피드백)
20
-
21
- - 수정: `takeoverUi` 즉시 반영(새로고침 불필요). 4.4.0은 시트 inject 시 설정 미러를 1회만 읽어, 실제 호스트에서 설정 바인딩/미러 접힘보다 모델 시트 콜백이 먼저 실행되면 ON이어도 착석하지 않았다. 이제 웨이스트 바인딩과 모든 설정 변경 시 재평가하는 감시 방식으로 전환.
22
- - 카드: takeoverUi 줄을 낙관적 횡형 알약 토글로 변경.
23
-
24
- ## [4.4.0] — 2026-10-19(issue 일괄 처리: #2 #3 #4 #5)
25
-
26
- ### 수정
27
- - 기능 카드(#2): `api`가 openai-completions이 아닌 제공자에서는 Thinking / Supports-effort / thinkingFormat 컨트롤을 안내 문구와 함께 비활성화 — 잘못된 쓰기로 인한 `card.writeError` 제거(호스트 Responses 호환 게이트는 이 모델 필드를 제공하지 않음).
28
- - 로딩 비용(#4): `resolveModel` 광고를 멱등화(WeakSet 가드). 기존에는 `llm/adapters-updated`마다 래퍼가 중첩되어 해석마다 전체 settings 읽기가 발생. readout 세대 캐시화, 설정 커밋 시 무효화, takeover 미러 재동기는 관련 namespace에서만 실행.
29
- - 단계 chip(#5): `auto` 선택 시 chip은 **Auto**를 유지하고 해당 스텝의 해석 값은 `→ <level>` 보조 표기로 격하.
30
-
31
- ### 추가
32
- - `takeoverUi` 설정(기본 OFF, #3/#4): 공식 모델 팝업 유지(검색·로딩은 네이티브, `auto`는 서버측 광고로 계속 제공). OFF일 때 공식 모델 컨텍스트 편집은 설정 카드로. ON이면 ModelPanel 인수 복원. 변경 후 새로고침 필요.
33
- - ModelPanel 팝업 검색(#3): 4개 모델 초과 시 표시, 공식 규칙과 동일.
34
-
22
+ ## [4.4.2] — 2026-10-19(카드 토글·가시 설명 — 사용자 피드백)
23
+
24
+ - 설정 카드의 체크박스(활성화/인수 마스터/강등 허용/승격 허용/모델 UI 인수)를 낙관적 횡형 알약 토글로 변경 — 클릭 즉시 반전, 쓰기 거부 시 롤백.
25
+ - 모델 UI 인수 행 아래에 상시 표시 설명 추가(기존엔 툴팁만): ON이 무엇을 대체하고 OFF가 무엇을 유지하며 auto 마스크는 양쪽 모두 계속 제공됨.
26
+
27
+ ## [4.4.1] — 2026-10-19(takeoverUi 시트 감시 — 데스크톱 실측 피드백)
28
+
29
+ - 수정: `takeoverUi` 즉시 반영(새로고침 불필요). 4.4.0은 시트 inject 시 설정 미러를 1회만 읽어, 실제 호스트에서 설정 바인딩/미러 접힘보다 모델 시트 콜백이 먼저 실행되면 ON이어도 착석하지 않았다. 이제 웨이스트 바인딩과 모든 설정 변경 시 재평가하는 감시 방식으로 전환.
30
+ - 카드: takeoverUi 줄을 낙관적 횡형 알약 토글로 변경.
31
+
32
+ ## [4.4.0] — 2026-10-19(issue 일괄 처리: #2 #3 #4 #5)
33
+
34
+ ### 수정
35
+ - 기능 카드(#2): `api`가 openai-completions이 아닌 제공자에서는 Thinking / Supports-effort / thinkingFormat 컨트롤을 안내 문구와 함께 비활성화 — 잘못된 쓰기로 인한 `card.writeError` 제거(호스트 Responses 호환 게이트는 이 모델 필드를 제공하지 않음).
36
+ - 로딩 비용(#4): `resolveModel` 광고를 멱등화(WeakSet 가드). 기존에는 `llm/adapters-updated`마다 래퍼가 중첩되어 해석마다 전체 settings 읽기가 발생. readout 세대 캐시화, 설정 커밋 시 무효화, takeover 미러 재동기는 관련 namespace에서만 실행.
37
+ - 단계 chip(#5): `auto` 선택 시 chip은 **Auto**를 유지하고 해당 스텝의 해석 값은 `→ <level>` 보조 표기로 격하.
38
+
39
+ ### 추가
40
+ - `takeoverUi` 설정(기본 OFF, #3/#4): 공식 모델 팝업 유지(검색·로딩은 네이티브, `auto`는 서버측 광고로 계속 제공). OFF일 때 공식 모델 컨텍스트 편집은 설정 카드로. ON이면 ModelPanel 인수 복원. 변경 후 새로고침 필요.
41
+ - ModelPanel 팝업 검색(#3): 4개 모델 초과 시 표시, 공식 규칙과 동일.
42
+
35
43
  ## [4.3.1] — 2026-10-17(호스트 열거 갱신: 0.2.1-rc.1 추가)
36
44
 
37
45
  ### Fixed
@@ -40,21 +48,21 @@
40
48
  - devDependencies `@deepseek-ai/dsh-client-*`를 0.2.0-rc.1 → 0.2.1-rc.1로 전환, 빌드·전체 테스트(140건) 대상 라인에서 검증.
41
49
  - README 호환 서술(en/zh/ja/ko/de/es/fr/it/ru)을 열거와 동기화. 동작 변경 없음.
42
50
 
43
- ## [4.3.0] — 2026-10-17
44
-
45
- ### 추가
46
- - 가격 카탈로그(src/price-catalog.ts): 29개 모델 x 지역 — DeepSeek V4.1-Flash / V4-Flash / V4-Pro는 공식 봉우/곡선 2단(베이징 09-12, 14-18 봉우리; 2026-08-17 시행), GLM / Kimi / Qwen / Doubao / MiniMax / Ernie는 평일 가격. 각 항목은 백만 토큰당 3개 슬롯(비캐시 입력 / 캐시 히트 입력 / 출력)과 asOf + 출처 표기를 가짐. 해외(USD) 항목은 구조만 확보, 공식 페이지 검증 전까지 의도적 비움(날조 없음).
47
- - defaultPricing 설정(cn / global / custom / off, 기본 off): 카탈로그 밖 모델은 더 이상 Flash 가격으로 추정하지 않고 "미과금"으로 표시.
48
- - 2026 국무원 공휴/보근 수정표(39항목, dsh-session-guard 와 동일 출처): 보근 주말은 평일처럼 봉우리의 대상, 법정 공휴는 종일 곡선. 표 밖 연도는 주말 규칙으로 축퇴.
49
-
50
- ### 변경
51
- - 프로젝션 stateVersion 1 -> 2: 사용 샘플에 절입 시점 계산 전표를 영속화, 동일 단계 교체는 기록값 차감(혼합 요율 재계산·음수 제거), 합계는 통화별 버킷. 업그레이드 후 옛 세션은 현재 카탈로그로 재절입되어 총액이 한 번 변동, 이후 설정 변경은 신규 샘플에만 반영.
52
- - 과금 팝오버: 통화별 기호(¥ / $, 미지는 ISO 코드), flat/null 정직한 표시, "모댔 기반 과금", 혼통화 세션은 합산 대신 통화별 행.
53
-
54
- ### 수정
55
- - settings.describe() 모양 정규화(프로세스 내 배열 vs RPC ​​{namespaces:[...]} 봉투): 이상 모양은 예외 대신 결측 처리(조용한 동결 classe 해소).
56
- - 프로젝션 등록 try/catch 보호: 과금 단위 실패가 플러그인 전체/콜드 세션 히스토리를 오염시키지 않음.
57
-
51
+ ## [4.3.0] — 2026-10-17
52
+
53
+ ### 추가
54
+ - 가격 카탈로그(src/price-catalog.ts): 29개 모델 x 지역 — DeepSeek V4.1-Flash / V4-Flash / V4-Pro는 공식 봉우/곡선 2단(베이징 09-12, 14-18 봉우리; 2026-08-17 시행), GLM / Kimi / Qwen / Doubao / MiniMax / Ernie는 평일 가격. 각 항목은 백만 토큰당 3개 슬롯(비캐시 입력 / 캐시 히트 입력 / 출력)과 asOf + 출처 표기를 가짐. 해외(USD) 항목은 구조만 확보, 공식 페이지 검증 전까지 의도적 비움(날조 없음).
55
+ - defaultPricing 설정(cn / global / custom / off, 기본 off): 카탈로그 밖 모델은 더 이상 Flash 가격으로 추정하지 않고 "미과금"으로 표시.
56
+ - 2026 국무원 공휴/보근 수정표(39항목, dsh-session-guard 와 동일 출처): 보근 주말은 평일처럼 봉우리의 대상, 법정 공휴는 종일 곡선. 표 밖 연도는 주말 규칙으로 축퇴.
57
+
58
+ ### 변경
59
+ - 프로젝션 stateVersion 1 -> 2: 사용 샘플에 절입 시점 계산 전표를 영속화, 동일 단계 교체는 기록값 차감(혼합 요율 재계산·음수 제거), 합계는 통화별 버킷. 업그레이드 후 옛 세션은 현재 카탈로그로 재절입되어 총액이 한 번 변동, 이후 설정 변경은 신규 샘플에만 반영.
60
+ - 과금 팝오버: 통화별 기호(¥ / $, 미지는 ISO 코드), flat/null 정직한 표시, "모댔 기반 과금", 혼통화 세션은 합산 대신 통화별 행.
61
+
62
+ ### 수정
63
+ - settings.describe() 모양 정규화(프로세스 내 배열 vs RPC ​​{namespaces:[...]} 봉투): 이상 모양은 예외 대신 결측 처리(조용한 동결 classe 해소).
64
+ - 프로젝션 등록 try/catch 보호: 과금 단위 실패가 플러그인 전체/콜드 세션 히스토리를 오염시키지 않음.
65
+
58
66
  ## [4.2.1] — 2026-10-12
59
67
 
60
68
  ### 변경 — 안정 버전 승격 (4.2.0-beta.29 이후 코드 변경 없음)
package/CHANGELOG.md CHANGED
@@ -1,30 +1,41 @@
1
1
  # Changelog
2
-
3
- ## [4.4.2] — 2026-10-19 (card toggles, visible explainer — user feedback)
4
-
5
- - The settings-card checkboxes (启用 / 接管主控 / 允许降档 / 允许升档 / 模型界面接管) are now optimistic horizontal pill toggles — click flips instantly, a refused write rolls back.
6
- - The 模型界面接管 row gained a VISIBLE explainer under the row (previously tooltip-only): what ON replaces, what OFF keeps, and that the auto mask still arrives either way.
7
-
8
- ## [4.4.1] — 2026-10-19 (takeoverUi seat watchdog — desktop field report)
9
-
10
- - Fixed: `takeoverUi` now applies live, no reload. The 4.4.0 gate read the settings mirror once at seat-inject time; on the real desktop host the model-seat callback can fire BEFORE the settings channel binds or the mirror folds, so with the switch on the panel never seated (and the official popup stayed with no context chips). Seating is now a watchdog re-evaluated whenever the settings waist binds or any settings change lands: flipping the switch seats the ModelPanel — flipping back returns the shipped ModelSelect — immediately.
11
- - Card: the takeoverUi row is an optimistic horizontal pill toggle (flips on click, rolls back on a refused write).
12
-
13
- ## [4.4.0] — 2026-10-19 (issue batch: #2 #3 #4 #5)
14
-
15
- ### Fixed
16
- - Capability card (#2): providers whose `api` is not `openai-completions` (openai-responses family, anthropic-messages …) now grey out the Thinking / Supports-effort / thinkingFormat controls with an explanatory note instead of failing the whole providers write with a generic `card.writeError` — the host's Responses compat gate never offers those model-level fields.
17
- - Load cost (#4): the `resolveModel` advertisement is idempotent again — repeated `llm/adapters-updated` used to STACK wrappers, each replaying a full settings readout (O(models × wrappers) on the model page). The readout is generation-cached (invalidated on settings commits) and the takeover mirror re-check only runs for namespaces that can move the judgment. Note: the 4.3.0 projection stateVersion bump keeps a ONE-TIME history re-fold on the first load after upgrading.
18
- - Effort chip (#5): with the level set to `auto` the panel chip keeps showing **Auto** and demotes the step's resolved level to a secondary `→ <level>` hint, instead of being overwritten by the scheduler's wire value.
19
-
20
- ### Added
21
- - `takeoverUi` setting (default OFF, #3/#4): the composer keeps the official model popup — native search and loading, and the `auto` mask still arrives through the server-side advertisement; official-model context editing lives on the settings card while it is OFF. Flip it ON to restore the ModelPanel takeover. Reload the page after changing.
22
- - ModelPanel popup search (#3): shown past four models, mirroring the shipped selector's rule.
23
-
24
- ## 4.3.3 (2026-10-18)
25
-
26
- - 计价目录化上线:price-catalog 41 条(国内 30 CNY 峰谷/平价 + 海外 11 USD:Claude 4 官方页一手、GPT 4/Gemini 3 Copilot 计费文档×公告交叉核实),注入型号按目录实价入账、目录外走 estimate 典型价兜底并标「未校准·仅供参考」(免费档调用=按标准价折算的花费/白嫖额度感知)。
27
- - 凭证入账 stateVersion 2→3;设置卡目录外定价五档选择器(9 语);CATALOG_VERSION 1→2;golden 150/150 绿。
2
+
3
+ ## [4.4.3] — 2026-10-21 (thinking stays configurable on every protocol — issue #6)
4
+
5
+ ### Fixed
6
+ - Capability card: the 思考 (thinking) checkbox is selectable again on every wire protocol, not only openai-completions. It writes the protocol-neutral `reasoningEfforts` (host llm-pi-ai → `reasoning: true` + `thinkingLevelMap`, which pi-ai maps natively per protocol), so the prerequisite the effort selector needs is back on Responses/Anthropic routes too.
7
+ - A non-completions thinking declaration no longer carries the completions-only `thinkingFormat` along: the qwen format autofill is skipped there (a model-level write of it made the host reject the WHOLE providers payload), and `off` keeps a real wire token (`none`) so the Off level stays selectable instead of being marked unsupported by pi-ai.
8
+ - `thinkingFormat` / 支持 think effort remain gated to openai-completions — those two ARE completions-only compat fields — and the card note now says exactly that instead of claiming thinking itself is unconfigurable.
9
+ - Host-side compat sync: an explicitly non-completions `api` is no longer treated as a custom openai-completions gateway (the baseURL heuristic applies only when no protocol is named), so the auto-sync cannot write completions-only compat into a Responses/Anthropic route.
10
+
11
+ ### Tests
12
+ - 168/168: new `writeThinkingRow` protocol matrix (completions / responses / anthropic), the 4.4.x alias, and the sync gateway guard.
13
+
14
+ ## [4.4.2] — 2026-10-19 (card toggles, visible explainer — user feedback)
15
+
16
+ - The settings-card checkboxes (启用 / 接管主控 / 允许降档 / 允许升档 / 模型界面接管) are now optimistic horizontal pill toggles — click flips instantly, a refused write rolls back.
17
+ - The 模型界面接管 row gained a VISIBLE explainer under the row (previously tooltip-only): what ON replaces, what OFF keeps, and that the auto mask still arrives either way.
18
+
19
+ ## [4.4.1] — 2026-10-19 (takeoverUi seat watchdog — desktop field report)
20
+
21
+ - Fixed: `takeoverUi` now applies live, no reload. The 4.4.0 gate read the settings mirror once at seat-inject time; on the real desktop host the model-seat callback can fire BEFORE the settings channel binds or the mirror folds, so with the switch on the panel never seated (and the official popup stayed with no context chips). Seating is now a watchdog re-evaluated whenever the settings waist binds or any settings change lands: flipping the switch seats the ModelPanel — flipping back returns the shipped ModelSelect — immediately.
22
+ - Card: the takeoverUi row is an optimistic horizontal pill toggle (flips on click, rolls back on a refused write).
23
+
24
+ ## [4.4.0] — 2026-10-19 (issue batch: #2 #3 #4 #5)
25
+
26
+ ### Fixed
27
+ - Capability card (#2): providers whose `api` is not `openai-completions` (openai-responses family, anthropic-messages …) now grey out the Thinking / Supports-effort / thinkingFormat controls with an explanatory note instead of failing the whole providers write with a generic `card.writeError` — the host's Responses compat gate never offers those model-level fields.
28
+ - Load cost (#4): the `resolveModel` advertisement is idempotent again — repeated `llm/adapters-updated` used to STACK wrappers, each replaying a full settings readout (O(models × wrappers) on the model page). The readout is generation-cached (invalidated on settings commits) and the takeover mirror re-check only runs for namespaces that can move the judgment. Note: the 4.3.0 projection stateVersion bump keeps a ONE-TIME history re-fold on the first load after upgrading.
29
+ - Effort chip (#5): with the level set to `auto` the panel chip keeps showing **Auto** and demotes the step's resolved level to a secondary `→ <level>` hint, instead of being overwritten by the scheduler's wire value.
30
+
31
+ ### Added
32
+ - `takeoverUi` setting (default OFF, #3/#4): the composer keeps the official model popup — native search and loading, and the `auto` mask still arrives through the server-side advertisement; official-model context editing lives on the settings card while it is OFF. Flip it ON to restore the ModelPanel takeover. Reload the page after changing.
33
+ - ModelPanel popup search (#3): shown past four models, mirroring the shipped selector's rule.
34
+
35
+ ## 4.3.3 (2026-10-18)
36
+
37
+ - 计价目录化上线:price-catalog 41 条(国内 30 CNY 峰谷/平价 + 海外 11 USD:Claude 4 官方页一手、GPT 4/Gemini 3 Copilot 计费文档×公告交叉核实),注入型号按目录实价入账、目录外走 estimate 典型价兜底并标「未校准·仅供参考」(免费档调用=按标准价折算的花费/白嫖额度感知)。
38
+ - 凭证入账 stateVersion 2→3;设置卡目录外定价五档选择器(9 语);CATALOG_VERSION 1→2;golden 150/150 绿。
28
39
 
29
40
  ## 4.3.2 (2026-10-18)
30
41
 
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-thinking-levels",
3
- "version": "4.4.2",
3
+ "version": "4.4.3",
4
4
  "main": "./lib/index.js",
5
5
  "description": "thinking-level (reasoning_effort) control — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
6
6
  "engines": {
package/lib/client.js CHANGED
@@ -102,7 +102,8 @@ window.__ModuleLoader__.load({
102
102
  "panel.search.placeholder": "搜索模型…",
103
103
  "card.takeoverUi": "模型界面接管",
104
104
  "card.takeoverUiHint": "开启后由本插件重绘输入框的模型选择面板(含每行上下文/档位编辑与搜索);关闭(默认)保留官方模型弹窗——auto 档位照常出现,搜索与加载由官方界面负责。切换即时生效,无需重载。",
105
- "card.capabilities.apiUnsupported": "该提供方使用非 openai-completions 协议:思考兼容字段由宿主 pi-ai 原生处理,此处不可配置。",
105
+ "card.capabilities.apiUnsupported": "该提供方使用非 openai-completions 协议:thinkingFormat / supportsReasoningEffort 是 openai-completions 专属的思考兼容字段,写入会被宿主整体拒绝,故此处禁用。思考开关不受影响——它写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按协议原生映射。",
106
+ "card.capabilities.thinkingNative": "思考开关在所有协议下都可勾选:写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按各协议原生映射(Anthropic 思考预算 / Responses reasoning effort);仅 thinkingFormat / supportsReasoningEffort 为 openai-completions 专属。",
106
107
  "card.dsContextTitle": "官方 DeepSeek 模型上下文上限",
107
108
  "input.effort.default": "提供方默认",
108
109
  "input.effort.reset": "恢复提供方默认",
@@ -200,7 +201,8 @@ window.__ModuleLoader__.load({
200
201
  "panel.search.placeholder": "Search models…",
201
202
  "card.takeoverUi": "Model UI takeover",
202
203
  "card.takeoverUiHint": "On: this plugin replaces the composer model picker with its own panel (per-line context/effort editors + search). Off (default): the official popup stays — the auto level still appears, and search and loading remain the shipped selector’s. Changes apply immediately — no reload needed.",
203
- "card.capabilities.apiUnsupported": "This provider uses a non-openai-completions protocol: the thinking-compat fields are handled natively by pi-ai and are not configurable here.",
204
+ "card.capabilities.apiUnsupported": "This provider uses a non-openai-completions protocol: thinkingFormat / supportsReasoningEffort are openai-completions-only thinking-compat fields, and a write carrying them is rejected wholesale by the host — hence disabled here. The thinking switch is unaffected: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively per protocol.",
205
+ "card.capabilities.thinkingNative": "The thinking switch is available on every protocol: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively (Anthropic thinking budget / Responses reasoning effort). Only thinkingFormat / supportsReasoningEffort are openai-completions-only.",
204
206
  "card.dsContextTitle": "Official DeepSeek context windows",
205
207
  "input.effort.default": "Provider default",
206
208
  "input.effort.reset": "Restore provider default",
@@ -298,7 +300,8 @@ window.__ModuleLoader__.load({
298
300
  "panel.search.placeholder": "モデルを検索…",
299
301
  "card.takeoverUi": "モデルUI引き継ぎ",
300
302
  "card.takeoverUiHint": "ON にするとこのプラグインが入力欄のモデル選択を独自パネル(行別のコンテキスト/レベル編集+検索)に置き換えます。OFF(既定)では公式ポップアップが維持され、auto レベルは引き続き表示され、検索と読み込みは標準セレクタの役割です。変更は即時反映されます(再読み込み不要)。",
301
- "card.capabilities.apiUnsupported": "このプロバイダーは openai-completions 以外のプロトコルを使用しています:思考互換フィールドは pi-ai がネイティブに処理するため、ここで設定できません。",
303
+ "card.capabilities.apiUnsupported": "このプロバイダーは openai-completions 以外のプロトコルを使用しています:thinkingFormat / supportsReasoningEffort は openai-completions 専用の思考互換フィールドで、書き込むとホストが providers 全体を拒否するためここでは無効化しています。思考スイッチは影響を受けません — protocol 非依存の reasoningEfforts を書き込み、pi-ai がプロトコルごとにネイティブ変換します。",
304
+ "card.capabilities.thinkingNative": "思考スイッチはすべてのプロトコルでチェックできます:protocol 非依存の reasoningEfforts を書き込み、pi-ai が各プロトコルでネイティブ変換します(Anthropic の思考予算 / Responses の reasoning effort)。openai-completions 専用なのは thinkingFormat / supportsReasoningEffort のみです。",
302
305
  "card.dsContextTitle": "公式 DeepSeek モデルのコンテキスト上限",
303
306
  "input.effort.default": "プロバイダーの既定",
304
307
  "input.effort.reset": "プロバイダーの既定に戻す",
@@ -396,7 +399,8 @@ window.__ModuleLoader__.load({
396
399
  "panel.search.placeholder": "모델 검색…",
397
400
  "card.takeoverUi": "모델 UI 인수",
398
401
  "card.takeoverUiHint": "켜면 이 플러그인이 입력창의 모델 선택을 자체 패널(행별 컨텍스트/레벨 편집 + 검색)로 대체합니다. 끄면(기본) 공식 팝업이 유지되며 auto 레벨은 계속 표시되고 검색과 로딩은 표준 셀렉터가 담당합니다. 변경이 즉시 반영됩니다(새로고침 불필요).",
399
- "card.capabilities.apiUnsupported": "이 제공자는 openai-completions 이외 프로토콜을 사용합니다: 사고 호환 필드는 pi-ai가 네이티브로 처리하므로 여기서 설정할 수 없습니다.",
402
+ "card.capabilities.apiUnsupported": "이 제공자는 openai-completions 이외 프로토콜을 사용합니다: thinkingFormat / supportsReasoningEffort 는 openai-completions 전용 사고 호환 필드이며, 기록하면 호스트가 providers 전체를 거부하므로 여기서 비활성화됩니다. 사고 스위치는 영향받지 않습니다 — protocol 중립적인 reasoningEfforts 를 기록하면 pi-ai 가 프로토콜별로 네이티브 변환합니다.",
403
+ "card.capabilities.thinkingNative": "사고 스위치는 모든 프로토콜에서 체크할 수 있습니다: protocol 중립적인 reasoningEfforts 를 기록하고 pi-ai 가 각 프로토콜에서 네이티브 변환합니다(Anthropic 사고 예산 / Responses reasoning effort). openai-completions 전용은 thinkingFormat / supportsReasoningEffort 뿐입니다.",
400
404
  "card.dsContextTitle": "공식 DeepSeek 모델 컨텍스트 상한",
401
405
  "input.effort.default": "공급자 기본값",
402
406
  "input.effort.reset": "공급자 기본값으로 복원",
@@ -494,7 +498,8 @@ window.__ModuleLoader__.load({
494
498
  "panel.search.placeholder": "Rechercher des modèles…",
495
499
  "card.takeoverUi": "Reprise de l'UI modèle",
496
500
  "card.takeoverUiHint": "Activé, ce plugin remplace le sélecteur de modèle du composeur par son propre panneau (éditeurs contexte/niveau par ligne + recherche). Désactivé (défaut), la popup officielle reste en place — le niveau auto apparaît toujours, recherche et chargement appartiennent au sélecteur d'origine. Le changement s’applique immédiatement, sans rechargement.",
497
- "card.capabilities.apiUnsupported": "Ce fournisseur utilise un protocole autre qu'openai-completions : les champs de compat de réflexion sont gérés nativement par pi-ai et ne sont pas configurables ici.",
501
+ "card.capabilities.apiUnsupported": "Ce fournisseur utilise un protocole autre qu'openai-completions : thinkingFormat / supportsReasoningEffort sont des champs de compat de réflexion propres à openai-completions et une écriture qui les porte est rejetée en bloc par l'hôte — donc désactivés ici. L'interrupteur de réflexion n'est pas affecté : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement par protocole.",
502
+ "card.capabilities.thinkingNative": "L'interrupteur de réflexion est disponible sur tous les protocoles : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement (budget de réflexion Anthropic / reasoning effort Responses). Seuls thinkingFormat / supportsReasoningEffort sont propres à openai-completions.",
498
503
  "card.dsContextTitle": "Fenêtres de contexte DeepSeek officielles",
499
504
  "input.effort.default": "Valeur par défaut du fournisseur",
500
505
  "input.effort.reset": "Restaurer la valeur par défaut du fournisseur",
@@ -592,7 +597,8 @@ window.__ModuleLoader__.load({
592
597
  "panel.search.placeholder": "Modelle suchen…",
593
598
  "card.takeoverUi": "Modell-UI-Übernahme",
594
599
  "card.takeoverUiHint": "Ein: dieses Plugin ersetzt die Modellauswahl des Composers durch ein eigenes Panel (Kontext-/Stufen-Editoren je Zeile + Suche). Aus (Standard): die offizielle Popup bleibt — die auto-Stufe erscheint weiterhin; Suche und Laden übernimmt der mitgelieferte Wähler. Änderungen wirken sofort — neu laden ist nicht nötig.",
595
- "card.capabilities.apiUnsupported": "Dieser Provider nutzt ein anderes Protokoll als openai-completions: die Thinking-Kompatibilitätsfelder werden von pi-ai nativ behandelt und sind hier nicht konfigurierbar.",
600
+ "card.capabilities.apiUnsupported": "Dieser Provider nutzt ein anderes Protokoll als openai-completions: thinkingFormat / supportsReasoningEffort sind openai-completions-exklusive Thinking-Kompatibilitätsfelder, und eine Schreiboperation damit wird vom Host als Ganzes abgelehnt — daher hier deaktiviert. Der Thinking-Schalter ist nicht betroffen: er schreibt protokollneutral reasoningEfforts, die pi-ai protokollweit nativ übersetzt.",
601
+ "card.capabilities.thinkingNative": "Der Thinking-Schalter ist auf jedem Protokoll verfügbar: er schreibt protokollneutral reasoningEfforts, die pi-ai nativ übersetzt (Anthropic-Thinking-Budget / Responses reasoning effort). Nur thinkingFormat / supportsReasoningEffort sind openai-completions-exklusiv.",
596
602
  "card.dsContextTitle": "Kontextfenster der offiziellen DeepSeek-Modelle",
597
603
  "input.effort.default": "Anbieterstandard",
598
604
  "input.effort.reset": "Auf Anbieterstandard zurücksetzen",
@@ -690,7 +696,8 @@ window.__ModuleLoader__.load({
690
696
  "panel.search.placeholder": "Cerca modelli…",
691
697
  "card.takeoverUi": "Sostituzione UI modello",
692
698
  "card.takeoverUiHint": "Se attivo, questo plugin sostituisce il selettore modelli del compositore con un pannello proprio (editor contesto/livello per riga + ricerca). Se spento (predefinito) resta il popup ufficiale: il livello auto è comunque visibile, ricerca e caricamento sono a carico del selettore originale. La modifica ha effetto immediato, senza ricaricare.",
693
- "card.capabilities.apiUnsupported": "Questo provider usa un protocollo diverso da openai-completions: i campi di compatibilità thinking sono gestiti nativamente da pi-ai e non sono configurabili qui.",
699
+ "card.capabilities.apiUnsupported": "Questo provider usa un protocollo diverso da openai-completions: thinkingFormat / supportsReasoningEffort sono campi di compatibilità thinking esclusivi di openai-completions e una scrittura che li contiene viene rifiutata in blocco dall host — quindi qui sono disabilitati. L interruttore thinking non è interessato: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente per protocollo.",
700
+ "card.capabilities.thinkingNative": "L interruttore thinking è disponibile su ogni protocollo: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente (budget thinking Anthropic / reasoning effort Responses). Solo thinkingFormat / supportsReasoningEffort sono esclusivi di openai-completions.",
694
701
  "card.dsContextTitle": "Finestra di contesto dei modelli DeepSeek ufficiali",
695
702
  "input.effort.default": "Predefinito del provider",
696
703
  "input.effort.reset": "Ripristina il predefinito del provider",
@@ -788,7 +795,8 @@ window.__ModuleLoader__.load({
788
795
  "panel.search.placeholder": "Поиск моделей…",
789
796
  "card.takeoverUi": "Перехват UI модели",
790
797
  "card.takeoverUiHint": "Включено: этот плагин заменяет выбор модели в композиторе собственной панелью (редакторы контекста/уровня в строках + поиск). Выключено (по умолчанию) остаётся официальное popup-окно — уровень auto по-прежнему виден, поиск и загрузка обеспечиваются штатным селектором. Изменения применяются сразу, без перезагрузки.",
791
- "card.capabilities.apiUnsupported": "Этот провайдер использует протокол, отличный от openai-completions: поля совместимости thinking обрабатываются pi-ai нативно и здесь не настраиваются.",
798
+ "card.capabilities.apiUnsupported": "Этот провайдер использует протокол, отличный от openai-completions: thinkingFormat / supportsReasoningEffort — поля совместимости thinking, доступные только openai-completions, и запись с ними отклоняется хостом целиком, поэтому здесь они отключены. Переключатель thinking не затронут: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно для каждого протокола.",
799
+ "card.capabilities.thinkingNative": "Переключатель thinking доступен на всех протоколах: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно (бюджет thinking Anthropic / reasoning effort Responses). Только thinkingFormat / supportsReasoningEffort относятся исключительно к openai-completions.",
792
800
  "card.dsContextTitle": "Лимиты контекста официальных моделей DeepSeek",
793
801
  "input.effort.default": "Значение провайдера по умолчанию",
794
802
  "input.effort.reset": "Вернуть значение провайдера по умолчанию",
@@ -886,7 +894,8 @@ window.__ModuleLoader__.load({
886
894
  "panel.search.placeholder": "Buscar modelos…",
887
895
  "card.takeoverUi": "Relevo de la UI de modelo",
888
896
  "card.takeoverUiHint": "Si está activo, este plugin sustituye el selector de modelos del compositor por un panel propio (editores de contexto/nivel por línea + búsqueda). Si está desactivado (predeterminado) se mantiene el popup oficial: el nivel auto sigue apareciendo y la búsqueda y la carga corresponden al selector nativo. El cambio se aplica de inmediato, sin recargar.",
889
- "card.capabilities.apiUnsupported": "Este proveedor usa un protocolo distinto de openai-completions: los campos de compatibilidad de thinking los gestiona pi-ai de forma nativa y no son configurables aquí.",
897
+ "card.capabilities.apiUnsupported": "Este proveedor usa un protocolo distinto de openai-completions: thinkingFormat / supportsReasoningEffort son campos de compatibilidad de thinking exclusivos de openai-completions y una escritura que los lleve es rechazada en bloque por el host, por eso aquí están desactivados. El interruptor de thinking no se ve afectado: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa por protocolo.",
898
+ "card.capabilities.thinkingNative": "El interruptor de thinking está disponible en todos los protocolos: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa (presupuesto de thinking de Anthropic / reasoning effort de Responses). Solo thinkingFormat / supportsReasoningEffort son exclusivos de openai-completions.",
890
899
  "card.dsContextTitle": "Ventana de contexto de los modelos DeepSeek oficiales",
891
900
  "input.effort.default": "Predeterminado del proveedor",
892
901
  "input.effort.reset": "Restaurar el valor predeterminado del proveedor",
@@ -3478,17 +3487,68 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
3478
3487
  } : base;
3479
3488
  }
3480
3489
  /**
3481
- * Whether the model-level thinking-compat fields (`compat.thinkingFormat`,
3482
- * `compat.supportsReasoningEffort`) may be written for this entry's provider
3483
- * (issue #2): the host llm-pi-ai gate offers them ONLY on the
3484
- * openai-completions protocol — a Responses route carrying them fails the
3485
- * WHOLE providers write (`not configurable here`). An absent `api` keeps
3486
- * pi-ai's openai-completions default, so the row stays editable.
3487
- * (exported for the gate's unit regression, issue #2)
3490
+ * Whether this entry's wire protocol takes the model-level
3491
+ * openai-completions compat fields (`compat.thinkingFormat`,
3492
+ * `compat.supportsReasoningEffort`). The host llm-pi-ai gate (`COMPAT_GATES`)
3493
+ * offers them ONLY on openai-completions, and a MODEL-level write carrying one
3494
+ * on a Responses/Anthropic route fails the WHOLE providers payload
3495
+ * (`not configurable here`). An absent `api` keeps pi-ai's
3496
+ * openai-completions default, so the row stays editable.
3497
+ *
3498
+ * Scoped to the FIELD, never to thinking: the thinking DECLARATION
3499
+ * (`reasoningEfforts`) is protocol-neutral and stays editable everywhere — a
3500
+ * non-completions route merely must not carry the completions-only compat
3501
+ * fields alongside it (issue #6).
3502
+ * (exported for the gate's unit regression, issues #2/#6)
3488
3503
  */
3489
- function effortCompatConfigurable(entry) {
3504
+ function completionsCompatConfigurable(entry) {
3490
3505
  return typeof entry.providerApi !== "string" || entry.providerApi === "openai-completions";
3491
3506
  }
3507
+ /**
3508
+ * Write the Thinking checkbox's declaration onto ONE model row (the caller
3509
+ * hands the row inside its cloned providers payload). Protocol-aware on
3510
+ * purpose (issue #6):
3511
+ *
3512
+ * - `reasoningEfforts` is protocol-NEUTRAL: the host llm-pi-ai resolves it to
3513
+ * `reasoning: true` + `thinkingLevelMap` for every wire protocol, and pi-ai
3514
+ * then maps the levels natively (Anthropic thinking budget, Responses
3515
+ * reasoning effort). Thinking is therefore declarable on all three protocol
3516
+ * families — it is the prerequisite of the effort selector.
3517
+ * - the `off` wire value is where the protocols DIVERGE. `off: null` marks the
3518
+ * level unsupported to pi-ai (`getSupportedThinkingLevels` drops it), which
3519
+ * is the completions transport's "send nothing" toggle — fine there, but on
3520
+ * a pi-ai-served route it would leave thinking un-turn-off-able. A
3521
+ * non-completions route therefore keeps `off` SELECTABLE with the
3522
+ * providers' own "no reasoning" token: Anthropic only needs it non-null
3523
+ * (`thinking: {type:'disabled'}`), Responses sends `effort: 'none'`.
3524
+ * - the qwen `thinkingFormat` autofill is an openai-completions-ONLY compat
3525
+ * field: writing it on a Responses/Anthropic route makes the host reject the
3526
+ * whole providers payload, so it is skipped there and the format simply
3527
+ * stays inherited.
3528
+ * @param entry - the capability entry whose provider protocol decides the gate.
3529
+ * @param row - the model row to mutate.
3530
+ * @param next - the new Thinking state.
3531
+ */
3532
+ function writeThinkingRow(entry, row, next) {
3533
+ if (!next) {
3534
+ row["reasoningEfforts"] = false;
3535
+ return;
3536
+ }
3537
+ const effortCapable = supportsEffortOf(row);
3538
+ const completions = completionsCompatConfigurable(entry);
3539
+ if (effortCapable) row["reasoningEfforts"] = effortTableOf({ high: "high" });
3540
+ else if (completions) row["reasoningEfforts"] = {
3541
+ off: null,
3542
+ high: "high"
3543
+ };
3544
+ else row["reasoningEfforts"] = {
3545
+ off: "none",
3546
+ high: "high"
3547
+ };
3548
+ if (!effortCapable && completions) patchCompat(row, (compat) => {
3549
+ if (compat["thinkingFormat"] === void 0) compat["thinkingFormat"] = "qwen-chat-template";
3550
+ });
3551
+ }
3492
3552
  /** Flatten the user-layer providers into capability entries (models arrays only). */
3493
3553
  function entriesOf(providers) {
3494
3554
  return Object.entries(providers).flatMap(([providerId, profile]) => {
@@ -3761,20 +3821,14 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
3761
3821
  return current;
3762
3822
  });
3763
3823
  };
3764
- /** Toggle whether a model is a thinking model (reasoningEfforts table vs false). */
3824
+ /**
3825
+ * Toggle whether a model is a thinking model (`reasoningEfforts` table vs
3826
+ * false). Delegates the row patch to {@link writeThinkingRow}: thinking is
3827
+ * declared on every protocol, only the completions-only format autofill is
3828
+ * protocol-gated.
3829
+ */
3765
3830
  const toggleThinking = (entry, next) => {
3766
- patchModel(entry.providerId, entry.index, (row) => {
3767
- if (next) {
3768
- const effortCapable = supportsEffortOf(row);
3769
- row["reasoningEfforts"] = effortCapable ? effortTableOf({ high: "high" }) : {
3770
- off: null,
3771
- high: "high"
3772
- };
3773
- if (!effortCapable) patchCompat(row, (compat) => {
3774
- if (compat["thinkingFormat"] === void 0) compat["thinkingFormat"] = "qwen-chat-template";
3775
- });
3776
- } else row["reasoningEfforts"] = false;
3777
- });
3831
+ patchModel(entry.providerId, entry.index, (row) => writeThinkingRow(entry, row, next));
3778
3832
  };
3779
3833
  /** Toggle whether a model accepts reasoning_effort levels. */
3780
3834
  const toggleEffortCapable = (entry, next) => {
@@ -4051,7 +4105,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
4051
4105
  const thinking = typeof effortsOf(entry.model) === "object";
4052
4106
  const compat = compatOf(entry);
4053
4107
  const supportsEffort = compat["supportsReasoningEffort"] === true;
4054
- const apiGated = !effortCompatConfigurable(entry);
4108
+ const compatGated = !completionsCompatConfigurable(entry);
4055
4109
  const meta = summaryOf(entry);
4056
4110
  const format = typeof compat["thinkingFormat"] === "string" ? compat["thinkingFormat"] : void 0;
4057
4111
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -4118,7 +4172,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
4118
4172
  borderTop: "1px solid var(--dsw-alias-border-l2)"
4119
4173
  },
4120
4174
  children: [
4121
- apiGated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4175
+ compatGated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
4122
4176
  style: hintStyle,
4123
4177
  children: t("card.capabilities.apiUnsupported")
4124
4178
  }),
@@ -4137,11 +4191,11 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
4137
4191
  gap: "6px",
4138
4192
  fontSize: "12px"
4139
4193
  },
4140
- title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
4194
+ title: compatGated ? t("card.capabilities.thinkingNative") : void 0,
4141
4195
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
4142
4196
  type: "checkbox",
4143
4197
  checked: thinking,
4144
- disabled: readonly || busy || apiGated,
4198
+ disabled: readonly || busy,
4145
4199
  onChange: (event) => toggleThinking(entry, event.currentTarget.checked)
4146
4200
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("card.capabilities.thinking") })]
4147
4201
  }),
@@ -4189,11 +4243,11 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
4189
4243
  fontSize: "12px",
4190
4244
  margin: "0 0 8px"
4191
4245
  },
4192
- title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
4246
+ title: compatGated ? t("card.capabilities.apiUnsupported") : void 0,
4193
4247
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
4194
4248
  type: "checkbox",
4195
4249
  checked: supportsEffort,
4196
- disabled: readonly || busy || apiGated,
4250
+ disabled: readonly || busy || compatGated,
4197
4251
  onChange: (event) => toggleEffortCapable(entry, event.currentTarget.checked)
4198
4252
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("card.capabilities.supportsEffort") })]
4199
4253
  }) : null,
@@ -4303,8 +4357,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
4303
4357
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
4304
4358
  style: controlStyle,
4305
4359
  value: format ?? "inherit",
4306
- disabled: readonly || busy || apiGated,
4307
- title: apiGated ? t("card.capabilities.apiUnsupported") : void 0,
4360
+ disabled: readonly || busy || compatGated,
4361
+ title: compatGated ? t("card.capabilities.apiUnsupported") : void 0,
4308
4362
  onChange: (event) => {
4309
4363
  const next = event.currentTarget.value;
4310
4364
  patchModel(entry.providerId, entry.index, (row) => {