feat: add extra_body config for model-specific API parameters
Allows passing arbitrary parameters (e.g., enable_thinking, reasoning_effort) to the LLM API request body via config.yaml, solving reasoning-only response loops with models like Qwen 3.x without requiring code changes per model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -151,6 +151,10 @@ class LLMClient:
|
||||
if tools:
|
||||
payload["tools"] = tools
|
||||
|
||||
# Merge model-specific extra parameters (e.g., enable_thinking, reasoning_effort)
|
||||
if self._config.extra_body:
|
||||
payload.update(self._config.extra_body)
|
||||
|
||||
try:
|
||||
async with self._client.stream(
|
||||
"POST", self._config.api_path, json=payload
|
||||
|
||||
Reference in New Issue
Block a user