feat(config): add when_thinking_disabled support for model configs (#1970)
* feat(config): add when_thinking_disabled support for model configs Allow users to explicitly configure what parameters are sent to the model when thinking is disabled, via a new `when_thinking_disabled` field in model config. This mirrors the existing `when_thinking_enabled` pattern and takes full precedence over the hardcoded disable behavior when set. Backwards compatible — existing configs work unchanged. Closes #1675 * fix(config): address copilot review — gate when_thinking_disabled independently - Switch truthiness check to `is not None` so empty dict overrides work - Restructure disable path so when_thinking_disabled is gated independently of has_thinking_settings, allowing it to work without when_thinking_enabled - Update test to reflect new behavior
This commit is contained in:
+24
-1
@@ -12,7 +12,7 @@
|
||||
# ============================================================================
|
||||
# Bump this number when the config schema changes.
|
||||
# Run `make config-upgrade` to merge new fields into your local config.yaml.
|
||||
config_version: 5
|
||||
config_version: 6
|
||||
|
||||
# ============================================================================
|
||||
# Logging
|
||||
@@ -50,6 +50,10 @@ models:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: OpenAI model
|
||||
# - name: gpt-4
|
||||
@@ -88,6 +92,9 @@ models:
|
||||
# when_thinking_enabled:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: Google Gemini model (native SDK, no thinking support)
|
||||
# - name: gemini-2.5-pro
|
||||
@@ -120,6 +127,10 @@ models:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: DeepSeek model (with thinking support)
|
||||
# - name: deepseek-v3
|
||||
@@ -136,6 +147,10 @@ models:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: Kimi K2.5 model
|
||||
# - name: kimi-k2.5
|
||||
@@ -153,6 +168,10 @@ models:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: Novita AI (OpenAI-compatible)
|
||||
# Novita provides an OpenAI-compatible API with competitive pricing
|
||||
@@ -173,6 +192,10 @@ models:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: enabled
|
||||
# when_thinking_disabled:
|
||||
# extra_body:
|
||||
# thinking:
|
||||
# type: disabled
|
||||
|
||||
# Example: MiniMax (OpenAI-compatible) - International Edition
|
||||
# MiniMax provides high-performance models with 204K context window
|
||||
|
||||
Reference in New Issue
Block a user