From b7d0a84552eba466e593ed530b7ac21830752126 Mon Sep 17 00:00:00 2001 From: mdwsk88 <924038395@qq.com> Date: Thu, 3 Sep 2026 00:49:07 +0800 Subject: [PATCH] docs: document the __omit__ sentinel for reasoning effort wire maps --- .../docs/fr/reference/configuration/providers.md | 4 ++-- .../docs/ja/reference/configuration/providers.md | 4 ++-- .../docs/ko/reference/configuration/providers.md | 4 ++-- .../docs/reference/configuration/providers.md | 4 ++-- .../docs/ru/reference/configuration/providers.md | 4 ++-- .../docs/tr/reference/configuration/providers.md | 4 ++-- .../docs/zh-cn/reference/configuration/providers.md | 4 ++-- .../docs/zh-tw/reference/configuration/providers.md | 4 ++-- src/types/provider.ts | 12 ++++++++++-- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/docs-site/src/content/docs/fr/reference/configuration/providers.md b/docs-site/src/content/docs/fr/reference/configuration/providers.md index 5948574eea..40b7a179d7 100644 --- a/docs-site/src/content/docs/fr/reference/configuration/providers.md +++ b/docs-site/src/content/docs/fr/reference/configuration/providers.md @@ -105,8 +105,8 @@ sauvegarde dont le contenu diffère, puis réécrit en identifiants sans préfix | `xaiResponsesXSearch?` | `boolean` | Désactivé par défaut. Sur une destination xAI Responses, ajoute la déclaration `x_search` hébergée par le fournisseur uniquement lorsqu’un outil `web_search` actif subsiste après la normalisation finale de la requête. Les déclarations existantes ne sont pas dupliquées, les sélecteurs `tool_choice`/`allowed_tools` de l’appelant ne sont jamais élargis, et cette option est distincte des options `search.xSearch` du service auxiliaire de recherche web. | | `modelPreferHostedTools?` | `Record` | Activation explicite par modèle exact pour les passerelles Responses hors transfert qui réservent un espace de noms aux outils hébergés. Seul `["image_generation"]` est actuellement accepté ; le modèle correspondant doit utiliser le protocole `openai-responses` et prendre en charge cet outil hébergé. Le proxy supprime les déclarations clientes `image_gen` en conflit et réécrit leurs sélecteurs afin de préserver le choix d'outil de l'appelant. Pour les modèles virtuels `-pro` de l'API OpenAI, l'identifiant public sélectionné est comparé en premier et l'identifiant résolu du modèle de base sur le protocole sert de repli. `modelAdapters` résout d'abord l'identifiant public, puis celui de base ; la seconde résolution détermine le protocole final. Les autres modèles conservent le comportement normal des alias. | | `annotateEmptyToolOutputs?` | `boolean` | Remplace un résultat d’outil présent mais vide par un court marqueur avant qu’il n’atteigne le modèle, afin qu’un résultat vide ne soit pas interprété comme manquant. S’applique aux chaînes vides et aux tableaux de parties contenant uniquement du texte ; les parties d’image, de fichier et chiffrées ne sont jamais modifiées. La valeur par défaut issue du registre intégré est `true` pour DeepSeek ; dans les autres cas, elle n’est pas définie. Définissez `false` pour exclure un fournisseur : une valeur `false` explicite est conservée lors des modifications ultérieures qui omettent ce champ. `PATCH /api/providers?name=` accepte `true`, `false` ou `null` pour effacer le remplacement et revenir au comportement par défaut du registre. | -| `reasoningEffortMap?` | `Record` | Alias ​​de fil à l’échelle du fournisseur pour les étiquettes de raisonnement. | -| `modelReasoningEffortMap?` | `Record>` | Alias ​​de fil par modèle pour les étiquettes de raisonnement. | +| `reasoningEffortMap?` | `Record` | Alias de fil à l'échelle du fournisseur pour les étiquettes de raisonnement. Mappez une étiquette à `"__omit__"` pour supprimer complètement le champ de raisonnement de la requête en amont (par exemple pour les modèles Ollama dont le gabarit de conversation exige l'omission de `reasoning_effort` pour activer le mode de raisonnement approfondi). | +| `modelReasoningEffortMap?` | `Record>` | Alias de fil par modèle pour les étiquettes de raisonnement. Mappez une étiquette à `"__omit__"` pour supprimer complètement le champ de raisonnement de la requête en amont. | | `reasoningWireFormat?` | `"gateway-object"` | Pour les passerelles compatibles avec OpenAI qui acceptent `reasoning: { enabled, effort }` au lieu de `reasoning_effort`. Le préréglage ClinePass définit ce champ automatiquement. | | `noReasoningModels?` | `string[]` | Modèles qui rejettent les paramètres reasoning/thinking. | | `noTemperatureModels?` | `string[]` | Modèles qui rejettent `temperature` spécifié par l’appelant. | diff --git a/docs-site/src/content/docs/ja/reference/configuration/providers.md b/docs-site/src/content/docs/ja/reference/configuration/providers.md index 298c41f0f0..3b54798ce4 100644 --- a/docs-site/src/content/docs/ja/reference/configuration/providers.md +++ b/docs-site/src/content/docs/ja/reference/configuration/providers.md @@ -94,8 +94,8 @@ account を削除しても mapping は保持され、同じ id を再追加す | `xaiResponsesXSearch?` | `boolean` | デフォルトでは無効です。xAI Responses の宛先では、最終的なリクエスト正規化後もライブの `web_search` ツールが残っている場合にのみ、プロバイダーがホストする `x_search` 宣言を追加します。既存の宣言は重複させず、呼び出し元の `tool_choice` / `allowed_tools` セレクターの範囲を拡張することもありません。また、これは `search.xSearch` オプションを持つウェブ検索サイドカーとは別です。 | | `modelPreferHostedTools?` | `Record` | hosted tool namespace を予約する非 forward Responses gateway 向けの完全一致モデル opt-in。現在は `["image_generation"]` のみを受け付けます。一致したモデルは `openai-responses` wire を使い、その hosted tool をサポートする必要があります。競合するクライアント `image_gen` 宣言を除去し、呼び出し元の tool choice を維持するため selector も書き換えます。OpenAI API の仮想 `-pro` モデルでは、まず選択した公開 ID に一致させ、解決後のベース wire-model ID をフォールバックとして使用します。`modelAdapters` は公開 ID、次にベース ID の順に解決し、後者の結果が最終 wire を決めます。未設定のモデルは通常の alias 動作を維持します。 | | `annotateEmptyToolOutputs?` | `boolean` | 存在するものの空であるツール結果を、モデルに届く前に短いマーカーへ置き換え、空白の結果が欠落した結果として解釈されないようにします。空文字列とテキストのみのパーツ配列に適用されます。画像、ファイル、暗号化されたパーツには一切手を加えません。組み込みレジストリでは `DeepSeek` のデフォルトが `true` で、それ以外は未設定です。プロバイダーを対象外にするには `false` を設定します。明示的な `false` は、後続の編集でこのフィールドが省略されても保持されます。`PATCH /api/providers?name=` は `true`、`false`、またはオーバーライドを消去してレジストリのデフォルト動作へ戻すための `null` を受け付けます。 | -| `reasoningEffortMap?` | `Record` |ラベルを推論するためのプロバイダー全体のワイヤ エイリアス。 | -| `modelReasoningEffortMap?` | `Record>` |推論ラベルのモデルごとのワイヤ エイリアス。 | +| `reasoningEffortMap?` | `Record` | ラベルを推論するためのプロバイダー全体のワイヤ エイリアス。ラベルを `"__omit__"` にマッピングすると、アップストリームのリクエストから推論フィールドが完全に省略されます(例: ディープ モードに `reasoning_effort` の省略が必要な Ollama モデル向け)。 | +| `modelReasoningEffortMap?` | `Record>` | 推論ラベルのモデルごとのワイヤ エイリアス。ラベルを `"__omit__"` にマッピングすると、アップストリームのリクエストから推論フィールドが完全に省略されます。 | | `reasoningWireFormat?` | `"gateway-object"` | `reasoning_effort` ではなく `reasoning: { enabled, effort }` を受け取る OpenAI 互換ゲートウェイ用です。ClinePass プリセットが自動設定します。 | | `noReasoningModels?` | `string[]` |推論/思考パラメーターを拒否するモデル。 | | `noTemperatureModels?` | `string[]` |発信者指定の`temperature`を拒否するモデル。 | diff --git a/docs-site/src/content/docs/ko/reference/configuration/providers.md b/docs-site/src/content/docs/ko/reference/configuration/providers.md index 81cd158268..927535c845 100644 --- a/docs-site/src/content/docs/ko/reference/configuration/providers.md +++ b/docs-site/src/content/docs/ko/reference/configuration/providers.md @@ -94,8 +94,8 @@ managed map을 활성화하면 privacy-safe selector를 만들고, 이후 계정 | `xaiResponsesXSearch?` | `boolean` | 기본적으로 비활성화됩니다. xAI Responses 대상에서는 최종 요청 정규화 후에도 실제 `web_search` 도구가 남아 있을 때만 공급자가 호스팅하는 `x_search` 선언을 추가합니다. 기존 선언은 중복하지 않고, 호출자의 `tool_choice`/`allowed_tools` 선택기 범위를 확장하지 않으며, 웹 검색 사이드카의 `search.xSearch` 옵션과는 별개입니다. | | `modelPreferHostedTools?` | `Record` | hosted tool namespace를 예약하는 non-forward Responses gateway용 정확한 모델 ID opt-in입니다. 현재 `["image_generation"]`만 허용하며, 일치하는 모델은 `openai-responses` wire를 사용하고 해당 hosted tool을 지원해야 합니다. 충돌하는 클라이언트 `image_gen` 선언을 제거하고 호출자의 tool choice를 유지하도록 selector도 다시 씁니다. OpenAI API 가상 `-pro` 모델은 선택한 공개 ID를 먼저 일치시키고, 해석된 기본 wire-model ID를 대체값으로 사용합니다. `modelAdapters`는 공개 ID를 먼저, 그 다음 기본 ID를 해석하며, 두 번째 결과가 최종 wire를 결정합니다. 설정하지 않은 모델은 일반 alias 동작을 유지합니다. | | `annotateEmptyToolOutputs?` | `boolean` | 존재하지만 비어 있는 도구 결과가 모델에 도달하기 전에 짧은 표시로 바꿔, 빈 결과를 누락된 결과로 해석하지 않도록 합니다. 빈 문자열과 텍스트 전용 파트 배열에 적용되며, 이미지·파일·암호화된 파트는 절대 변경하지 않습니다. 기본 제공 레지스트리에 따라 DeepSeek의 기본값은 `true`이며, 그 외에는 설정되지 않습니다. 공급자를 이 동작에서 제외하려면 `false`로 설정합니다. 명시적인 `false`는 이후 해당 필드를 생략한 편집에서도 유지됩니다. `PATCH /api/providers?name=`는 `true`, `false`, 또는 `null`을 받아 재정의를 지우고 레지스트리 기본 동작으로 되돌릴 수 있습니다. | -| `reasoningEffortMap?` | `Record` | reasoning 레이블의 공급자 전반 와이어 별칭입니다. | -| `modelReasoningEffortMap?` | `Record>` | reasoning 레이블의 모델별 와이어 별칭입니다. | +| `reasoningEffortMap?` | `Record` | reasoning 레이블의 공급자 전반 와이어 별칭입니다. 레이블을 `"__omit__"`으로 매핑하면 업스트림 요청에서 추론 필드를 완전히 생략합니다(예: 딥 모드를 위해 `reasoning_effort` 생략이 필요한 Ollama 로컬 모델). | +| `modelReasoningEffortMap?` | `Record>` | reasoning 레이블의 모델별 와이어 별칭입니다. 레이블을 `"__omit__"`으로 매핑하면 업스트림 요청에서 추론 필드를 완전히 생략합니다. | | `reasoningWireFormat?` | `"gateway-object"` | `reasoning_effort` 대신 `reasoning: { enabled, effort }`를 받는 OpenAI 호환 게이트웨이용입니다. ClinePass 프리셋이 자동 설정합니다. | | `noReasoningModels?` | `string[]` | reasoning/thinking 매개변수를 거부하는 모델입니다. | | `noTemperatureModels?` | `string[]` | 호출자가 지정한 `temperature`를 거부하는 모델입니다. | diff --git a/docs-site/src/content/docs/reference/configuration/providers.md b/docs-site/src/content/docs/reference/configuration/providers.md index 327cb3416b..242033452c 100644 --- a/docs-site/src/content/docs/reference/configuration/providers.md +++ b/docs-site/src/content/docs/reference/configuration/providers.md @@ -149,8 +149,8 @@ predictions. Explicit provider/model price overrides still take precedence. | `xaiResponsesXSearch?` | `boolean` | Disabled by default. On an xAI Responses destination, append the provider-hosted `x_search` declaration only when a live `web_search` tool survives final request normalization. Existing declarations are not duplicated, caller `tool_choice`/`allowed_tools` selectors are never widened, and this is separate from the web-search sidecar's `search.xSearch` options. | | `modelPreferHostedTools?` | `Record` | Exact-model opt-in for non-forward Responses gateways that reserve a hosted-tool namespace. Currently accepts only `["image_generation"]`; a matching model must use the `openai-responses` wire and support that hosted tool. It removes colliding client `image_gen` declarations and rewrites their selectors to preserve caller tool choice. For OpenAI API virtual `-pro` models, the selected public ID is matched first and the resolved base wire-model ID is a fallback. `modelAdapters` resolves the public ID first, then the base ID; the second resolution determines the final wire. Other models retain normal alias behavior. | | `annotateEmptyToolOutputs?` | `boolean` | Replace a present-but-empty tool result with a short marker before it reaches the model, so a blank result is not read as a missing one. Applies to blank strings and text-only part arrays; image, file, and encrypted parts are never touched. Defaults to `true` for DeepSeek from the built-in registry and is otherwise unset. Set `false` to opt a provider out — an explicit `false` is preserved across later edits that omit the field. `PATCH /api/providers?name=` accepts `true`, `false`, or `null` to clear the override and return to registry-default behavior. | -| `reasoningEffortMap?` | `Record` | Provider-wide wire aliases for reasoning labels. | -| `modelReasoningEffortMap?` | `Record>` | Per-model wire aliases for reasoning labels. | +| `reasoningEffortMap?` | `Record` | Provider-wide wire aliases for reasoning labels. Map a label to `"__omit__"` to drop the reasoning field from the upstream request entirely (e.g. for Ollama models whose templates require omitting `reasoning_effort` for deep mode). | +| `modelReasoningEffortMap?` | `Record>` | Per-model wire aliases for reasoning labels. Map a label to `"__omit__"` to drop the reasoning field from the upstream request entirely. | | `reasoningWireFormat?` | `"gateway-object"` | For OpenAI-compatible gateways that accept `reasoning: { enabled, effort }` instead of `reasoning_effort`. The ClinePass preset sets this automatically. | | `noReasoningModels?` | `string[]` | Models that reject reasoning/thinking parameters. | | `noTemperatureModels?` | `string[]` | Models that reject caller-specified `temperature`. | diff --git a/docs-site/src/content/docs/ru/reference/configuration/providers.md b/docs-site/src/content/docs/ru/reference/configuration/providers.md index b07ea3b8bc..7dddd9f09c 100644 --- a/docs-site/src/content/docs/ru/reference/configuration/providers.md +++ b/docs-site/src/content/docs/ru/reference/configuration/providers.md @@ -107,8 +107,8 @@ cross-route credential fallback не существует. Строки API GPT- | `xaiResponsesXSearch?` | `boolean` | По умолчанию отключено. Для назначения xAI Responses декларация `x_search`, размещённая у провайдера, добавляется только тогда, когда действующий инструмент `web_search` сохраняется после окончательной нормализации запроса. Существующие декларации не дублируются, селекторы вызывающей стороны `tool_choice`/`allowed_tools` никогда не расширяются, и эта настройка не связана с параметрами `search.xSearch` сайдкара веб-поиска. | | `modelPreferHostedTools?` | `Record` | Opt-in для точного model ID в non-forward Responses gateway, который резервирует namespace hosted tool. Сейчас допускается только `["image_generation"]`; совпавшая модель должна использовать wire `openai-responses` и поддерживать этот hosted tool. Прокси удаляет конфликтующие клиентские объявления `image_gen` и переписывает их selectors, сохраняя caller tool choice. Для виртуальных моделей OpenAI API `-pro` сначала сопоставляется выбранный публичный ID, а затем в качестве fallback используется ID базовой wire-модели. `modelAdapters` сначала разрешается по публичному ID, затем по базовому ID; второй результат определяет итоговый wire. Остальные модели сохраняют обычное alias-поведение. | | `annotateEmptyToolOutputs?` | `boolean` | Заменяет присутствующий, но пустой результат вызова инструмента короткой меткой до его передачи модели, чтобы пустой результат не воспринимался как отсутствующий. Применяется к пустым строкам и массивам частей, содержащим только текст; части с изображениями, файлами и зашифрованными данными никогда не изменяются. Во встроенном реестре по умолчанию имеет значение `true` для DeepSeek, а для остальных провайдеров не задано. Укажите `false`, чтобы отключить эту возможность для провайдера: явное значение `false` сохраняется при последующих изменениях без этого поля. `PATCH /api/providers?name=` принимает `true`, `false` или `null`, чтобы удалить переопределение и вернуться к поведению по умолчанию из реестра. | -| `reasoningEffortMap?` | `Record` | Provider-wide wire-alias'ы для reasoning-label'ов. | -| `modelReasoningEffortMap?` | `Record>` | Wire-alias'ы для reasoning-label'ов по отдельным моделям. | +| `reasoningEffortMap?` | `Record` | Provider-wide wire-alias'ы для reasoning-label'ов. Отображение метки на `"__omit__"` полностью удаляет поле reasoning из восходящего запроса (например, для моделей Ollama, чьи шаблоны требуют пропуска `reasoning_effort` для глубокого режима). | +| `modelReasoningEffortMap?` | `Record>` | Wire-alias'ы для reasoning-label'ов по отдельным моделям. Отображение метки на `"__omit__"` полностью удаляет поле reasoning из восходящего запроса. | | `reasoningWireFormat?` | `"gateway-object"` | Для OpenAI-совместимых шлюзов, принимающих `reasoning: { enabled, effort }` вместо `reasoning_effort`. Пресет ClinePass задаёт это автоматически. | | `noReasoningModels?` | `string[]` | Модели, отвергающие параметры reasoning/thinking. | | `noTemperatureModels?` | `string[]` | Модели, отвергающие переданный вызывающей стороной `temperature`. | diff --git a/docs-site/src/content/docs/tr/reference/configuration/providers.md b/docs-site/src/content/docs/tr/reference/configuration/providers.md index c90ffc8dd5..22d5c9056b 100644 --- a/docs-site/src/content/docs/tr/reference/configuration/providers.md +++ b/docs-site/src/content/docs/tr/reference/configuration/providers.md @@ -112,8 +112,8 @@ alanlı seçilmiş kimlikleri yalın kimliklere yeniden yazar. | `xaiResponsesXSearch?` | `boolean` | Varsayılan olarak devre dışıdır. Bir xAI Responses hedefinde, yalnızca canlı bir `web_search` aracı son istek normalleştirmesinden sağ çıktığında sağlayıcı tarafından barındırılan `x_search` bildirimini ekler. Mevcut bildirimler yinelenmez, çağıranın `tool_choice`/`allowed_tools` seçicileri hiçbir zaman genişletilmez ve bu, web araması yardımcı hizmetinin `search.xSearch` seçeneklerinden ayrıdır. | | `modelPreferHostedTools?` | `Record` | Barındırılan bir araç ad alanı ayıran iletme harici Responses ağ geçitleri için tam model dahil etme. Şu anda yalnızca `["image_generation"]` kabul eder; eşleşen bir model `openai-responses` hattını kullanmalı ve bu barındırılan aracı desteklemelidir. Çakışan istemci `image_gen` bildirimlerini kaldırır ve arayan araç seçimini korumak için seçicilerini yeniden yazar. OpenAI API sanal `-pro` modelleri için önce seçilen genel kimlik eşleştirilir ve çözümlenen temel hat model kimliği bir geri dönüştür. `modelAdapters` önce genel kimliği, ardından temel kimliği çözer; ikinci çözümleme son hattı belirler. Diğer modeller normal takma ad davranışını korur. | | `annotateEmptyToolOutputs?` | `boolean` | Mevcut fakat boş bir araç sonucunu modele ulaşmadan önce kısa bir işaretle değiştirir; böylece boş sonuç eksik sonuç olarak yorumlanmaz. Boş dizelere ve yalnızca metin parçalarından oluşan dizilere uygulanır; görsel, dosya ve şifrelenmiş parçalara hiçbir zaman dokunulmaz. Yerleşik kayıt defterindeki DeepSeek için varsayılan değer `true`dur; diğer durumlarda ayarlanmamıştır. Bir sağlayıcıyı kapsam dışında bırakmak için `false` olarak ayarlayın — açık bir `false` değeri, alanı içermeyen sonraki düzenlemelerde korunur. `PATCH /api/providers?name=`, geçersiz kılmayı temizleyip kayıt defteri varsayılanı davranışına dönmek üzere `true`, `false` veya `null` kabul eder. | -| `reasoningEffortMap?` | `Record` | Akıl yürütme etiketleri için sağlayıcı genelinde hat takma adları. | -| `modelReasoningEffortMap?` | `Record>` | Akıl yürütme etiketleri için model başına hat takma adları. | +| `reasoningEffortMap?` | `Record` | Akıl yürütme etiketleri için sağlayıcı genelinde hat takma adları. Bir etiketi `"__omit__"` olarak eşlemek, akıl yürütme alanını yukarı akış isteğinden tamamen çıkarır (örneğin derin mod için `reasoning_effort` alanının atlanmasını gerektiren Ollama modelleri için). | +| `modelReasoningEffortMap?` | `Record>` | Akıl yürütme etiketleri için model başına hat takma adları. Bir etiketi `"__omit__"` olarak eşlemek, akıl yürütme alanını yukarı akış isteğinden tamamen çıkarır. | | `reasoningWireFormat?` | `"gateway-object"` | `reasoning_effort` yerine `reasoning: { enabled, effort }` kabul eden OpenAI uyumlu ağ geçitleri için. ClinePass önayarı bunu otomatik olarak ayarlar. | | `noReasoningModels?` | `string[]` | Akıl yürütme/düşünme parametrelerini reddeden modeller. | | `noTemperatureModels?` | `string[]` | Arayan tarafından belirtilen `temperature` değerini reddeden modeller. | diff --git a/docs-site/src/content/docs/zh-cn/reference/configuration/providers.md b/docs-site/src/content/docs/zh-cn/reference/configuration/providers.md index f3ca5d2ebd..7c4c873ac8 100644 --- a/docs-site/src/content/docs/zh-cn/reference/configuration/providers.md +++ b/docs-site/src/content/docs/zh-cn/reference/configuration/providers.md @@ -94,8 +94,8 @@ selector,而不是分配一个新名称。 | `xaiResponsesXSearch?` | `boolean` | 默认禁用。在 xAI Responses 目标上,仅当有效的 `web_search` 工具在最终请求规范化后仍保留时,才附加由提供方托管的 `x_search` 声明。不会重复已有声明,绝不会扩大调用方的 `tool_choice`/`allowed_tools` 选择范围,并且此项独立于网络搜索辅助服务的 `search.xSearch` 选项。 | | `modelPreferHostedTools?` | `Record` | 非 forward Responses gateway 的精确模型 ID opt-in,用于上游预留 hosted tool namespace 的情况。目前只支持 `["image_generation"]`;匹配模型必须使用 `openai-responses` wire 且支持该 hosted 工具。它会移除冲突的客户端 `image_gen` 声明,并改写其 selector 以保持调用方的 tool choice。对于 OpenAI API 的虚拟 `-pro` 模型,先匹配所选公开 ID,未命中时才使用解析出的基础 wire-model ID 作为回退。`modelAdapters` 会先按公开 ID、再按基础 ID 解析;后一次结果决定最终 wire。未配置模型保持普通 alias 行为。 | | `annotateEmptyToolOutputs?` | `boolean` | 在工具结果到达模型之前,将存在但为空的结果替换为简短标记,以免空白结果被误认为缺失结果。适用于空白字符串和仅包含文本的部件数组;图像、文件和加密部件绝不会被修改。内置注册表中 `DeepSeek` 的默认值为 `true`,其他情况下不设置。设为 `false` 可让提供者退出此行为——后续编辑即使省略该字段,也会保留显式的 `false`。`PATCH /api/providers?name=` 接受 `true`、`false` 或 `null`;传入 `null` 可清除覆盖值并恢复注册表默认行为。 | -| `reasoningEffortMap?` | `Record` | 提供者级、用于推理标签的线协议别名。 | -| `modelReasoningEffortMap?` | `Record>` | 按模型设置的推理标签线协议别名。 | +| `reasoningEffortMap?` | `Record` | 提供者级、用于推理标签的线协议别名。将标签映射为 `"__omit__"` 可在上游请求中完全省略推理字段(例如针对需要省略 `reasoning_effort` 才能触发深度思考模式的 Ollama 本地模型)。 | +| `modelReasoningEffortMap?` | `Record>` | 按模型设置的推理标签线协议别名。将标签映射为 `"__omit__"` 可在上游请求中完全省略推理字段。 | | `reasoningWireFormat?` | `"gateway-object"` | 用于接受 `reasoning: { enabled, effort }` 而非 `reasoning_effort` 的 OpenAI 兼容 gateway。ClinePass preset 会自动设置。 | | `noReasoningModels?` | `string[]` | 会拒绝推理/思考参数的模型。 | | `noTemperatureModels?` | `string[]` | 会拒绝调用方指定 `temperature` 的模型。 | diff --git a/docs-site/src/content/docs/zh-tw/reference/configuration/providers.md b/docs-site/src/content/docs/zh-tw/reference/configuration/providers.md index fba727e667..43001e1ccd 100644 --- a/docs-site/src/content/docs/zh-tw/reference/configuration/providers.md +++ b/docs-site/src/content/docs/zh-tw/reference/configuration/providers.md @@ -73,8 +73,8 @@ description: 供應商項目、認證、端點、模型目錄、配額、context | xAI Responses 選用(儀表板) | 開關 | 僅用於 `xai`,以原子方式設定或清除 `grok-4.5` 與 `grok-4.6` 的 `modelAdapters` 項目。若只有一個項目,會顯示混合狀態,直到下次開關寫入統一兩者。其他覆寫與層級行為不變。 | | `annotateEmptyToolOutputs?` | `boolean` | 在工具結果送達模型前,將已存在但為空的結果替換成簡短標記,使空白結果不會被解讀為遺漏的結果。適用於空白字串及僅含文字部分的陣列;影像、檔案及加密部分絕不會被更動。DeepSeek 透過內建登錄檔預設為 `true`,其他情況則不設定。設為 `false` 可讓供應商停用此功能;後續編輯即使省略此欄位,也會保留明確設定的 `false`。`PATCH /api/providers?name=` 接受 `true`、`false` 或 `null`;`null` 會清除覆寫並恢復使用登錄檔的預設行為。 | | `xaiResponsesXSearch?` | `boolean` | 預設停用。在 xAI Responses 目的地上,僅當即時 `web_search` 工具通過最終請求正規化後仍保留時,才附加由供應商託管的 `x_search` 宣告。既有宣告不會重複,呼叫端的 `tool_choice`/`allowed_tools` 選擇器絕不會擴大,且此設定與網頁搜尋輔助服務的 `search.xSearch` 選項分開。 | -| `reasoningEffortMap?` | `Record` | 供應商範圍的 reasoning 標籤 wire 別名。 | -| `modelReasoningEffortMap?` | `Record>` | Per-model 的 reasoning 標籤 wire 別名。 | +| `reasoningEffortMap?` | `Record` | 供應商範圍的 reasoning 標籤 wire 別名。將標籤對應為 `"__omit__"` 可在上游請求中完全省略推理欄位(例如針對需要省略 `reasoning_effort` 才能觸發深度思考模式的 Ollama 本地模型)。 | +| `modelReasoningEffortMap?` | `Record>` | Per-model 的 reasoning 標籤 wire 別名。將標籤對應為 `"__omit__"` 可在上游請求中完全省略推理欄位。 | | `noReasoningModels?` | `string[]` | 拒絕 reasoning/thinking 參數的模型。 | | `noTemperatureModels?` | `string[]` | 拒絕呼叫者指定 `temperature` 的模型。 | | `noTopPModels?` | `string[]` | 拒絕呼叫者指定 `top_p` 的模型。 | diff --git a/src/types/provider.ts b/src/types/provider.ts index 459634fd16..c827f592a2 100644 --- a/src/types/provider.ts +++ b/src/types/provider.ts @@ -520,9 +520,17 @@ export interface OcxProviderConfig { * SSE/JSON; raw inspection state remains authoritative. */ responsesSnapshotRepair?: boolean; - /** Provider-wide mapping from Codex effort labels to upstream `reasoning_effort` values. */ + /** + * Provider-wide mapping from Codex effort labels to upstream `reasoning_effort` values. + * Map a label to `REASONING_EFFORT_OMIT_SENTINEL` ("__omit__") to omit the reasoning field + * for that effort so the upstream model's own default applies. + */ reasoningEffortMap?: Record; - /** Model-specific mapping from Codex effort labels to upstream `reasoning_effort` values. */ + /** + * Model-specific mapping from Codex effort labels to upstream `reasoning_effort` values. + * Map a label to `REASONING_EFFORT_OMIT_SENTINEL` ("__omit__") to omit the reasoning field + * for that effort so the upstream model's own default applies. + */ modelReasoningEffortMap?: Record>; /** OpenAI-compatible gateway reasoning wire shape. Default sends `reasoning_effort`. */ reasoningWireFormat?: "gateway-object";