dsh-thinking-levels 4.4.3 → 4.4.5
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.de.md +465 -0
- package/CHANGELOG.es.md +477 -0
- package/CHANGELOG.fr.md +474 -0
- package/CHANGELOG.it.md +462 -0
- package/CHANGELOG.ja.md +9 -0
- package/CHANGELOG.ko.md +9 -0
- package/CHANGELOG.md +26 -0
- package/CHANGELOG.ru.md +456 -0
- package/INSTALL.de.md +175 -0
- package/INSTALL.es.md +175 -0
- package/INSTALL.fr.md +175 -0
- package/INSTALL.it.md +175 -0
- package/INSTALL.ru.md +175 -0
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.it.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +31 -5
- package/README.ru.md +1 -1
- package/README.zh.md +24 -3
- package/dsh.plugin.json +2 -2
- package/lib/client.js +176 -26
- package/lib/client.js.map +1 -1
- package/lib/index.d.ts +25 -0
- package/lib/index.js +28 -14
- package/package.json +25 -10
package/lib/client.js
CHANGED
|
@@ -102,8 +102,10 @@ window.__ModuleLoader__.load({
|
|
|
102
102
|
"panel.search.placeholder": "搜索模型…",
|
|
103
103
|
"card.takeoverUi": "模型界面接管",
|
|
104
104
|
"card.takeoverUiHint": "开启后由本插件重绘输入框的模型选择面板(含每行上下文/档位编辑与搜索);关闭(默认)保留官方模型弹窗——auto 档位照常出现,搜索与加载由官方界面负责。切换即时生效,无需重载。",
|
|
105
|
-
"card.capabilities.apiUnsupported": "该提供方使用非 openai-completions 协议:thinkingFormat / supportsReasoningEffort 是 openai-completions
|
|
106
|
-
"card.capabilities.thinkingNative": "思考开关在所有协议下都可勾选:写入 protocol 中立的 reasoningEfforts,由宿主 pi-ai 按各协议原生映射(Anthropic 思考预算 / Responses reasoning effort);仅 thinkingFormat / supportsReasoningEffort 为 openai-completions
|
|
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 专属,指明是思考模型且协议为 openai-completions 后才出现。",
|
|
107
|
+
"card.capabilities.staleCompat": "旧版本曾强塞进该模型行的 openai-completions 专属字段",
|
|
108
|
+
"card.capabilities.stripStaleCompat": "清除这些残留字段",
|
|
107
109
|
"card.dsContextTitle": "官方 DeepSeek 模型上下文上限",
|
|
108
110
|
"input.effort.default": "提供方默认",
|
|
109
111
|
"input.effort.reset": "恢复提供方默认",
|
|
@@ -201,8 +203,10 @@ window.__ModuleLoader__.load({
|
|
|
201
203
|
"panel.search.placeholder": "Search models…",
|
|
202
204
|
"card.takeoverUi": "Model UI takeover",
|
|
203
205
|
"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.",
|
|
204
|
-
"card.capabilities.apiUnsupported": "This provider uses a non-openai-completions protocol: thinkingFormat / supportsReasoningEffort are openai-completions-only
|
|
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).
|
|
206
|
+
"card.capabilities.apiUnsupported": "This provider uses a non-openai-completions protocol: thinkingFormat / supportsReasoningEffort are openai-completions-only fields and are not offered here (a write carrying them is rejected wholesale by the host). The thinking switch is unaffected: it writes the protocol-neutral reasoningEfforts, which pi-ai maps natively per protocol.",
|
|
207
|
+
"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). thinkingFormat / supportsReasoningEffort are openai-completions-only and appear only once the model is declared a thinking model on that protocol.",
|
|
208
|
+
"card.capabilities.staleCompat": "openai-completions-only fields an older version forced onto this model row",
|
|
209
|
+
"card.capabilities.stripStaleCompat": "Remove these leftovers",
|
|
206
210
|
"card.dsContextTitle": "Official DeepSeek context windows",
|
|
207
211
|
"input.effort.default": "Provider default",
|
|
208
212
|
"input.effort.reset": "Restore provider default",
|
|
@@ -300,8 +304,10 @@ window.__ModuleLoader__.load({
|
|
|
300
304
|
"panel.search.placeholder": "モデルを検索…",
|
|
301
305
|
"card.takeoverUi": "モデルUI引き継ぎ",
|
|
302
306
|
"card.takeoverUiHint": "ON にするとこのプラグインが入力欄のモデル選択を独自パネル(行別のコンテキスト/レベル編集+検索)に置き換えます。OFF(既定)では公式ポップアップが維持され、auto レベルは引き続き表示され、検索と読み込みは標準セレクタの役割です。変更は即時反映されます(再読み込み不要)。",
|
|
303
|
-
"card.capabilities.apiUnsupported": "このプロバイダーは openai-completions 以外のプロトコルを使用しています:thinkingFormat / supportsReasoningEffort は openai-completions
|
|
304
|
-
"card.capabilities.thinkingNative": "思考スイッチはすべてのプロトコルでチェックできます:protocol 非依存の reasoningEfforts を書き込み、pi-ai が各プロトコルでネイティブ変換します(Anthropic の思考予算 / Responses の reasoning effort)。
|
|
307
|
+
"card.capabilities.apiUnsupported": "このプロバイダーは openai-completions 以外のプロトコルを使用しています:thinkingFormat / supportsReasoningEffort は openai-completions 専用フィールドのためここでは提供しません(書き込むとホストが providers 全体を拒否します)。思考スイッチは影響を受けません — protocol 非依存の reasoningEfforts を書き込み、pi-ai がプロトコルごとにネイティブ変換します。",
|
|
308
|
+
"card.capabilities.thinkingNative": "思考スイッチはすべてのプロトコルでチェックできます:protocol 非依存の reasoningEfforts を書き込み、pi-ai が各プロトコルでネイティブ変換します(Anthropic の思考予算 / Responses の reasoning effort)。thinkingFormat / supportsReasoningEffort は openai-completions 専用で、そのプロトコルで思考モデルと宣言した場合のみ表示されます。",
|
|
309
|
+
"card.capabilities.staleCompat": "旧バージョンがこのモデル行に強制挿入した openai-completions 専用フィールド",
|
|
310
|
+
"card.capabilities.stripStaleCompat": "この残留フィールドを削除",
|
|
305
311
|
"card.dsContextTitle": "公式 DeepSeek モデルのコンテキスト上限",
|
|
306
312
|
"input.effort.default": "プロバイダーの既定",
|
|
307
313
|
"input.effort.reset": "プロバイダーの既定に戻す",
|
|
@@ -399,8 +405,10 @@ window.__ModuleLoader__.load({
|
|
|
399
405
|
"panel.search.placeholder": "모델 검색…",
|
|
400
406
|
"card.takeoverUi": "모델 UI 인수",
|
|
401
407
|
"card.takeoverUiHint": "켜면 이 플러그인이 입력창의 모델 선택을 자체 패널(행별 컨텍스트/레벨 편집 + 검색)로 대체합니다. 끄면(기본) 공식 팝업이 유지되며 auto 레벨은 계속 표시되고 검색과 로딩은 표준 셀렉터가 담당합니다. 변경이 즉시 반영됩니다(새로고침 불필요).",
|
|
402
|
-
"card.capabilities.apiUnsupported": "이 제공자는 openai-completions 이외 프로토콜을 사용합니다: thinkingFormat / supportsReasoningEffort 는 openai-completions 전용
|
|
403
|
-
"card.capabilities.thinkingNative": "사고 스위치는 모든 프로토콜에서 체크할 수 있습니다: protocol 중립적인 reasoningEfforts 를 기록하고 pi-ai 가 각 프로토콜에서 네이티브 변환합니다(Anthropic 사고 예산 / Responses reasoning effort). openai-completions
|
|
408
|
+
"card.capabilities.apiUnsupported": "이 제공자는 openai-completions 이외 프로토콜을 사용합니다: thinkingFormat / supportsReasoningEffort 는 openai-completions 전용 필드이므로 여기서 제공하지 않습니다(기록하면 호스트가 providers 전체를 거부합니다). 사고 스위치는 영향받지 않습니다 — protocol 중립적인 reasoningEfforts 를 기록하면 pi-ai 가 프로토콜별로 네이티브 변환합니다.",
|
|
409
|
+
"card.capabilities.thinkingNative": "사고 스위치는 모든 프로토콜에서 체크할 수 있습니다: protocol 중립적인 reasoningEfforts 를 기록하고 pi-ai 가 각 프로토콜에서 네이티브 변환합니다(Anthropic 사고 예산 / Responses reasoning effort). thinkingFormat / supportsReasoningEffort 는 openai-completions 전용이며, 해당 프로토콜에서 사고 모델로 선언한 경우에만 표시됩니다.",
|
|
410
|
+
"card.capabilities.staleCompat": "구버전이 이 모델 행에 강제로 주입한 openai-completions 전용 필드",
|
|
411
|
+
"card.capabilities.stripStaleCompat": "이 잔여 필드 제거",
|
|
404
412
|
"card.dsContextTitle": "공식 DeepSeek 모델 컨텍스트 상한",
|
|
405
413
|
"input.effort.default": "공급자 기본값",
|
|
406
414
|
"input.effort.reset": "공급자 기본값으로 복원",
|
|
@@ -498,8 +506,10 @@ window.__ModuleLoader__.load({
|
|
|
498
506
|
"panel.search.placeholder": "Rechercher des modèles…",
|
|
499
507
|
"card.takeoverUi": "Reprise de l'UI modèle",
|
|
500
508
|
"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.",
|
|
501
|
-
"card.capabilities.apiUnsupported": "Ce fournisseur utilise un protocole autre qu'openai-completions : thinkingFormat / supportsReasoningEffort sont des champs
|
|
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).
|
|
509
|
+
"card.capabilities.apiUnsupported": "Ce fournisseur utilise un protocole autre qu'openai-completions : thinkingFormat / supportsReasoningEffort sont des champs propres à openai-completions et ne sont pas proposés ici (une écriture qui les porte est rejetée en bloc par l'hôte). L'interrupteur de réflexion n'est pas affecté : il écrit reasoningEfforts, neutre au protocole, que pi-ai traduit nativement.",
|
|
510
|
+
"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). thinkingFormat / supportsReasoningEffort sont propres à openai-completions et n'apparaissent qu'une fois le modèle déclaré réflexif sur ce protocole.",
|
|
511
|
+
"card.capabilities.staleCompat": "champs propres à openai-completions qu une version antérieure a forcés sur cette ligne de modèle",
|
|
512
|
+
"card.capabilities.stripStaleCompat": "Supprimer ces résidus",
|
|
503
513
|
"card.dsContextTitle": "Fenêtres de contexte DeepSeek officielles",
|
|
504
514
|
"input.effort.default": "Valeur par défaut du fournisseur",
|
|
505
515
|
"input.effort.reset": "Restaurer la valeur par défaut du fournisseur",
|
|
@@ -597,8 +607,10 @@ window.__ModuleLoader__.load({
|
|
|
597
607
|
"panel.search.placeholder": "Modelle suchen…",
|
|
598
608
|
"card.takeoverUi": "Modell-UI-Übernahme",
|
|
599
609
|
"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.",
|
|
600
|
-
"card.capabilities.apiUnsupported": "Dieser Provider nutzt ein anderes Protokoll als openai-completions: thinkingFormat / supportsReasoningEffort sind openai-completions-exklusive
|
|
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).
|
|
610
|
+
"card.capabilities.apiUnsupported": "Dieser Provider nutzt ein anderes Protokoll als openai-completions: thinkingFormat / supportsReasoningEffort sind openai-completions-exklusive Felder und werden hier nicht angeboten (eine Schreiboperation damit wird vom Host als Ganzes abgelehnt). Der Thinking-Schalter ist nicht betroffen: er schreibt protokollneutral reasoningEfforts, die pi-ai protokollweit nativ übersetzt.",
|
|
611
|
+
"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). thinkingFormat / supportsReasoningEffort sind openai-completions-exklusiv und erscheinen erst, wenn das Modell auf diesem Protokoll als Thinking-Modell deklariert ist.",
|
|
612
|
+
"card.capabilities.staleCompat": "openai-completions-exklusive Felder, die eine ältere Version in diese Modellzeile gezwungen hat",
|
|
613
|
+
"card.capabilities.stripStaleCompat": "Diese Reste entfernen",
|
|
602
614
|
"card.dsContextTitle": "Kontextfenster der offiziellen DeepSeek-Modelle",
|
|
603
615
|
"input.effort.default": "Anbieterstandard",
|
|
604
616
|
"input.effort.reset": "Auf Anbieterstandard zurücksetzen",
|
|
@@ -696,8 +708,10 @@ window.__ModuleLoader__.load({
|
|
|
696
708
|
"panel.search.placeholder": "Cerca modelli…",
|
|
697
709
|
"card.takeoverUi": "Sostituzione UI modello",
|
|
698
710
|
"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.",
|
|
699
|
-
"card.capabilities.apiUnsupported": "Questo provider usa un protocollo diverso da openai-completions: thinkingFormat / supportsReasoningEffort sono campi
|
|
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).
|
|
711
|
+
"card.capabilities.apiUnsupported": "Questo provider usa un protocollo diverso da openai-completions: thinkingFormat / supportsReasoningEffort sono campi esclusivi di openai-completions e qui non vengono offerti (una scrittura che li contiene viene rifiutata in blocco dall host). L interruttore thinking non è interessato: scrive reasoningEfforts, neutro rispetto al protocollo, che pi-ai traduce nativamente.",
|
|
712
|
+
"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). thinkingFormat / supportsReasoningEffort sono esclusivi di openai-completions e compaiono solo dopo che il modello è dichiarato thinking su quel protocollo.",
|
|
713
|
+
"card.capabilities.staleCompat": "campi esclusivi di openai-completions che una versione precedente ha forzato su questa riga di modello",
|
|
714
|
+
"card.capabilities.stripStaleCompat": "Rimuovi questi residui",
|
|
701
715
|
"card.dsContextTitle": "Finestra di contesto dei modelli DeepSeek ufficiali",
|
|
702
716
|
"input.effort.default": "Predefinito del provider",
|
|
703
717
|
"input.effort.reset": "Ripristina il predefinito del provider",
|
|
@@ -795,8 +809,10 @@ window.__ModuleLoader__.load({
|
|
|
795
809
|
"panel.search.placeholder": "Поиск моделей…",
|
|
796
810
|
"card.takeoverUi": "Перехват UI модели",
|
|
797
811
|
"card.takeoverUiHint": "Включено: этот плагин заменяет выбор модели в композиторе собственной панелью (редакторы контекста/уровня в строках + поиск). Выключено (по умолчанию) остаётся официальное popup-окно — уровень auto по-прежнему виден, поиск и загрузка обеспечиваются штатным селектором. Изменения применяются сразу, без перезагрузки.",
|
|
798
|
-
"card.capabilities.apiUnsupported": "Этот провайдер использует протокол, отличный от openai-completions: thinkingFormat / supportsReasoningEffort
|
|
799
|
-
"card.capabilities.thinkingNative": "Переключатель thinking доступен на всех протоколах: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно (бюджет thinking Anthropic / reasoning effort Responses).
|
|
812
|
+
"card.capabilities.apiUnsupported": "Этот провайдер использует протокол, отличный от openai-completions: thinkingFormat / supportsReasoningEffort доступны только на openai-completions и здесь не предлагаются (запись с ними отклоняется хостом целиком). Переключатель thinking не затронут: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно.",
|
|
813
|
+
"card.capabilities.thinkingNative": "Переключатель thinking доступен на всех протоколах: он пишет протоколонезависимый reasoningEfforts, который pi-ai транслирует нативно (бюджет thinking Anthropic / reasoning effort Responses). thinkingFormat / supportsReasoningEffort доступны только на openai-completions и появляются лишь после того, как модель объявлена thinking на этом протоколе.",
|
|
814
|
+
"card.capabilities.staleCompat": "поля, доступные только на openai-completions, которые старая версия принудительно записала в эту строку модели",
|
|
815
|
+
"card.capabilities.stripStaleCompat": "Удалить эти остатки",
|
|
800
816
|
"card.dsContextTitle": "Лимиты контекста официальных моделей DeepSeek",
|
|
801
817
|
"input.effort.default": "Значение провайдера по умолчанию",
|
|
802
818
|
"input.effort.reset": "Вернуть значение провайдера по умолчанию",
|
|
@@ -894,8 +910,10 @@ window.__ModuleLoader__.load({
|
|
|
894
910
|
"panel.search.placeholder": "Buscar modelos…",
|
|
895
911
|
"card.takeoverUi": "Relevo de la UI de modelo",
|
|
896
912
|
"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.",
|
|
897
|
-
"card.capabilities.apiUnsupported": "Este proveedor usa un protocolo distinto de openai-completions: thinkingFormat / supportsReasoningEffort son campos
|
|
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).
|
|
913
|
+
"card.capabilities.apiUnsupported": "Este proveedor usa un protocolo distinto de openai-completions: thinkingFormat / supportsReasoningEffort son campos exclusivos de openai-completions y aquí no se ofrecen (una escritura que los lleve es rechazada en bloque por el host). El interruptor de thinking no se ve afectado: escribe reasoningEfforts, neutral respecto al protocolo, que pi-ai traduce de forma nativa.",
|
|
914
|
+
"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). thinkingFormat / supportsReasoningEffort son exclusivos de openai-completions y solo aparecen cuando el modelo se declara de thinking en ese protocolo.",
|
|
915
|
+
"card.capabilities.staleCompat": "campos exclusivos de openai-completions que una versión anterior forzó en esta fila de modelo",
|
|
916
|
+
"card.capabilities.stripStaleCompat": "Eliminar estos restos",
|
|
899
917
|
"card.dsContextTitle": "Ventana de contexto de los modelos DeepSeek oficiales",
|
|
900
918
|
"input.effort.default": "Predeterminado del proveedor",
|
|
901
919
|
"input.effort.reset": "Restaurar el valor predeterminado del proveedor",
|
|
@@ -3549,6 +3567,54 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3549
3567
|
if (compat["thinkingFormat"] === void 0) compat["thinkingFormat"] = "qwen-chat-template";
|
|
3550
3568
|
});
|
|
3551
3569
|
}
|
|
3570
|
+
/**
|
|
3571
|
+
* The two compat switches that exist ONLY on the openai-completions protocol.
|
|
3572
|
+
* Both are model-level writes; on any other protocol the host's
|
|
3573
|
+
* `resolveModelCompat` refuses the entry and fails the WHOLE providers payload
|
|
3574
|
+
* (`model "x" sets compat "…", but its api is "…", which does not take it`).
|
|
3575
|
+
*/
|
|
3576
|
+
const THINKING_COMPAT_FIELDS = ["thinkingFormat", "supportsReasoningEffort"];
|
|
3577
|
+
/**
|
|
3578
|
+
* The openai-completions-only compat fields an entry's OWN model row still
|
|
3579
|
+
* carries while its route speaks another protocol — i.e. leftovers from a
|
|
3580
|
+
* version that offered those switches on every route (4.4.0–4.4.2), or a
|
|
3581
|
+
* hand-edited `cordis.yml`. They are a hard write blocker: the next save of
|
|
3582
|
+
* ANY model switch on this route fails wholesale until they are removed.
|
|
3583
|
+
*
|
|
3584
|
+
* This is the "split the force-written format out and check it" half of issue
|
|
3585
|
+
* #7: the fields are no longer offered on such routes, so what remains is
|
|
3586
|
+
* exactly this audit + one-click cleanup.
|
|
3587
|
+
* @param entry - the capability entry (model row + its route's protocol).
|
|
3588
|
+
* @returns the offending field names, in {@link THINKING_COMPAT_FIELDS} order.
|
|
3589
|
+
*/
|
|
3590
|
+
function staleThinkingCompatFields(entry) {
|
|
3591
|
+
if (completionsCompatConfigurable(entry)) return [];
|
|
3592
|
+
const own = entry.model["compat"];
|
|
3593
|
+
if (typeof own !== "object" || own === null || Array.isArray(own)) return [];
|
|
3594
|
+
const compat = own;
|
|
3595
|
+
return THINKING_COMPAT_FIELDS.filter((field) => compat[field] !== void 0);
|
|
3596
|
+
}
|
|
3597
|
+
/**
|
|
3598
|
+
* Remove those leftovers from ONE model row, returning what was removed (empty
|
|
3599
|
+
* when the row was already clean, so the caller can skip the write). Sibling
|
|
3600
|
+
* compat fields survive; an emptied compat object is deleted rather than left
|
|
3601
|
+
* as `{}`.
|
|
3602
|
+
* @param entry - the capability entry whose protocol decides what is stale.
|
|
3603
|
+
* @param row - the model row to mutate.
|
|
3604
|
+
* @returns the removed field names.
|
|
3605
|
+
*/
|
|
3606
|
+
function stripThinkingCompat(entry, row) {
|
|
3607
|
+
const removed = staleThinkingCompatFields({
|
|
3608
|
+
...entry,
|
|
3609
|
+
model: row
|
|
3610
|
+
});
|
|
3611
|
+
if (removed.length === 0) return [];
|
|
3612
|
+
const compat = { ...row["compat"] };
|
|
3613
|
+
for (const field of removed) delete compat[field];
|
|
3614
|
+
if (Object.keys(compat).length === 0) delete row["compat"];
|
|
3615
|
+
else row["compat"] = compat;
|
|
3616
|
+
return removed;
|
|
3617
|
+
}
|
|
3552
3618
|
/** Flatten the user-layer providers into capability entries (models arrays only). */
|
|
3553
3619
|
function entriesOf(providers) {
|
|
3554
3620
|
return Object.entries(providers).flatMap(([providerId, profile]) => {
|
|
@@ -3830,8 +3896,15 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3830
3896
|
const toggleThinking = (entry, next) => {
|
|
3831
3897
|
patchModel(entry.providerId, entry.index, (row) => writeThinkingRow(entry, row, next));
|
|
3832
3898
|
};
|
|
3833
|
-
/**
|
|
3899
|
+
/**
|
|
3900
|
+
* Toggle whether a model accepts reasoning_effort levels.
|
|
3901
|
+
*
|
|
3902
|
+
* openai-completions only, by construction: the checkbox is no longer
|
|
3903
|
+
* rendered anywhere else (issue #7), so this writer can never be reached with
|
|
3904
|
+
* a route whose protocol would refuse the field.
|
|
3905
|
+
*/
|
|
3834
3906
|
const toggleEffortCapable = (entry, next) => {
|
|
3907
|
+
if (!completionsCompatConfigurable(entry)) return;
|
|
3835
3908
|
patchModel(entry.providerId, entry.index, (row) => {
|
|
3836
3909
|
patchCompat(row, (compat) => {
|
|
3837
3910
|
compat["supportsReasoningEffort"] = next;
|
|
@@ -3839,6 +3912,33 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3839
3912
|
});
|
|
3840
3913
|
});
|
|
3841
3914
|
};
|
|
3915
|
+
/** Remove the completions-only compat leftovers from one model row (issue
|
|
3916
|
+
* #7's cleanup half). The audit lives in {@link staleThinkingCompatFields};
|
|
3917
|
+
* this is the one-click repair, and it is a no-op when the row is already
|
|
3918
|
+
* clean. */
|
|
3919
|
+
const stripStaleCompat = (entry) => {
|
|
3920
|
+
patchModel(entry.providerId, entry.index, (row) => {
|
|
3921
|
+
stripThinkingCompat(entry, row);
|
|
3922
|
+
});
|
|
3923
|
+
};
|
|
3924
|
+
/**
|
|
3925
|
+
* Sweep every stale row in one providers write (card-level audit button).
|
|
3926
|
+
* One write instead of N: the host validates the whole payload, so a
|
|
3927
|
+
* half-cleaned section could still be refused by a row the sweep had not
|
|
3928
|
+
* reached yet.
|
|
3929
|
+
*/
|
|
3930
|
+
const stripAllStaleCompat = () => {
|
|
3931
|
+
commitProviders((current) => {
|
|
3932
|
+
for (const entry of entriesOf(current)) {
|
|
3933
|
+
const profile = current[entry.providerId];
|
|
3934
|
+
if (profile === void 0 || !Array.isArray(profile.models)) continue;
|
|
3935
|
+
const row = profile.models[entry.index];
|
|
3936
|
+
if (typeof row !== "object" || row === null) continue;
|
|
3937
|
+
stripThinkingCompat(entry, row);
|
|
3938
|
+
}
|
|
3939
|
+
return current;
|
|
3940
|
+
});
|
|
3941
|
+
};
|
|
3842
3942
|
/** Apply one model's wire draft as its `reasoningEfforts` table. */
|
|
3843
3943
|
const applyDraft = (entry) => {
|
|
3844
3944
|
const key = entryKey(entry);
|
|
@@ -3847,6 +3947,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3847
3947
|
const table = effortTableOf(draft);
|
|
3848
3948
|
patchModel(entry.providerId, entry.index, (row) => {
|
|
3849
3949
|
row["reasoningEfforts"] = table;
|
|
3950
|
+
if (!completionsCompatConfigurable(entry)) return;
|
|
3850
3951
|
const extended = Object.keys(table).some((level) => level !== "off" && level !== "on" && level !== "high");
|
|
3851
3952
|
if (supportsEffortOf(row) || extended) patchCompat(row, (compat) => {
|
|
3852
3953
|
compat["supportsReasoningEffort"] = true;
|
|
@@ -3978,6 +4079,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3978
4079
|
const needle = query.trim().toLowerCase();
|
|
3979
4080
|
const visible = needle === "" ? allEntries : allEntries.filter((entry) => entry.modelId.toLowerCase().includes(needle) || entry.providerId.toLowerCase().includes(needle));
|
|
3980
4081
|
const providerIds = [...new Set(visible.map((entry) => entry.providerId))];
|
|
4082
|
+
const staleEntries = allEntries.filter((entry) => staleThinkingCompatFields(entry).length > 0);
|
|
3981
4083
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3982
4084
|
style: sectionStyle,
|
|
3983
4085
|
children: [
|
|
@@ -3999,6 +4101,31 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
3999
4101
|
role: "status",
|
|
4000
4102
|
children: ["⚠ ", writeError]
|
|
4001
4103
|
}),
|
|
4104
|
+
staleEntries.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4105
|
+
style: { margin: "4px 0 6px" },
|
|
4106
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4107
|
+
style: {
|
|
4108
|
+
...hintStyle,
|
|
4109
|
+
color: "var(--dsw-alias-warning, #b7791f)"
|
|
4110
|
+
},
|
|
4111
|
+
children: [
|
|
4112
|
+
t("card.capabilities.staleCompat"),
|
|
4113
|
+
": ",
|
|
4114
|
+
staleEntries.length,
|
|
4115
|
+
" / ",
|
|
4116
|
+
allEntries.length
|
|
4117
|
+
]
|
|
4118
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4119
|
+
type: "button",
|
|
4120
|
+
disabled: readonly || busy,
|
|
4121
|
+
onClick: stripAllStaleCompat,
|
|
4122
|
+
style: {
|
|
4123
|
+
...controlStyle,
|
|
4124
|
+
cursor: readonly || busy ? "default" : "pointer"
|
|
4125
|
+
},
|
|
4126
|
+
children: t("card.capabilities.stripStaleCompat")
|
|
4127
|
+
})]
|
|
4128
|
+
}),
|
|
4002
4129
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4003
4130
|
style: {
|
|
4004
4131
|
display: "flex",
|
|
@@ -4106,6 +4233,8 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4106
4233
|
const compat = compatOf(entry);
|
|
4107
4234
|
const supportsEffort = compat["supportsReasoningEffort"] === true;
|
|
4108
4235
|
const compatGated = !completionsCompatConfigurable(entry);
|
|
4236
|
+
const compatOffered = thinking && !compatGated;
|
|
4237
|
+
const stale = staleThinkingCompatFields(entry);
|
|
4109
4238
|
const meta = summaryOf(entry);
|
|
4110
4239
|
const format = typeof compat["thinkingFormat"] === "string" ? compat["thinkingFormat"] : void 0;
|
|
4111
4240
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -4176,6 +4305,29 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4176
4305
|
style: hintStyle,
|
|
4177
4306
|
children: t("card.capabilities.apiUnsupported")
|
|
4178
4307
|
}),
|
|
4308
|
+
stale.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4309
|
+
style: { margin: "0 0 8px" },
|
|
4310
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
4311
|
+
style: {
|
|
4312
|
+
...hintStyle,
|
|
4313
|
+
color: "var(--dsw-alias-warning, #b7791f)"
|
|
4314
|
+
},
|
|
4315
|
+
children: [
|
|
4316
|
+
t("card.capabilities.staleCompat"),
|
|
4317
|
+
": ",
|
|
4318
|
+
stale.join(", ")
|
|
4319
|
+
]
|
|
4320
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4321
|
+
type: "button",
|
|
4322
|
+
disabled: readonly || busy,
|
|
4323
|
+
onClick: () => stripStaleCompat(entry),
|
|
4324
|
+
style: {
|
|
4325
|
+
...controlStyle,
|
|
4326
|
+
cursor: readonly || busy ? "default" : "pointer"
|
|
4327
|
+
},
|
|
4328
|
+
children: t("card.capabilities.stripStaleCompat")
|
|
4329
|
+
})]
|
|
4330
|
+
}),
|
|
4179
4331
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4180
4332
|
style: {
|
|
4181
4333
|
display: "flex",
|
|
@@ -4235,7 +4387,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4235
4387
|
}, modality))
|
|
4236
4388
|
]
|
|
4237
4389
|
}),
|
|
4238
|
-
|
|
4390
|
+
compatOffered ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
4239
4391
|
style: {
|
|
4240
4392
|
display: "inline-flex",
|
|
4241
4393
|
alignItems: "center",
|
|
@@ -4243,15 +4395,14 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4243
4395
|
fontSize: "12px",
|
|
4244
4396
|
margin: "0 0 8px"
|
|
4245
4397
|
},
|
|
4246
|
-
title: compatGated ? t("card.capabilities.apiUnsupported") : void 0,
|
|
4247
4398
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
4248
4399
|
type: "checkbox",
|
|
4249
4400
|
checked: supportsEffort,
|
|
4250
|
-
disabled: readonly || busy
|
|
4401
|
+
disabled: readonly || busy,
|
|
4251
4402
|
onChange: (event) => toggleEffortCapable(entry, event.currentTarget.checked)
|
|
4252
4403
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("card.capabilities.supportsEffort") })]
|
|
4253
4404
|
}) : null,
|
|
4254
|
-
thinking && supportsEffort ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4405
|
+
thinking && (!compatOffered || supportsEffort) ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
4255
4406
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4256
4407
|
style: fieldLabelStyle,
|
|
4257
4408
|
children: t("card.capabilities.efforts")
|
|
@@ -4342,7 +4493,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4342
4493
|
})]
|
|
4343
4494
|
})
|
|
4344
4495
|
] }) : null,
|
|
4345
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4496
|
+
compatOffered && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4346
4497
|
style: {
|
|
4347
4498
|
display: "flex",
|
|
4348
4499
|
gap: "16px",
|
|
@@ -4357,8 +4508,7 @@ body:not([data-ds-dark-theme]) .${ZONE_CLASS}[data-top="1"] .${TRACK_CLASS} { an
|
|
|
4357
4508
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
4358
4509
|
style: controlStyle,
|
|
4359
4510
|
value: format ?? "inherit",
|
|
4360
|
-
disabled: readonly || busy
|
|
4361
|
-
title: compatGated ? t("card.capabilities.apiUnsupported") : void 0,
|
|
4511
|
+
disabled: readonly || busy,
|
|
4362
4512
|
onChange: (event) => {
|
|
4363
4513
|
const next = event.currentTarget.value;
|
|
4364
4514
|
patchModel(entry.providerId, entry.index, (row) => {
|