feat: add STRIX_REASONING_EFFORT env var to control thinking effort
- Add configurable reasoning effort via environment variable - Default to "high", but use "medium" for quick scan mode - Document in README and interface error panel Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,9 @@ _LLM_API_BASE = (
|
||||
or os.getenv("LITELLM_BASE_URL")
|
||||
or os.getenv("OLLAMA_API_BASE")
|
||||
)
|
||||
_STRIX_REASONING_EFFORT = os.getenv(
|
||||
"STRIX_REASONING_EFFORT"
|
||||
) # "none", "minimal", "medium", "high", or "xhigh"
|
||||
|
||||
|
||||
class LLMRequestFailedError(Exception):
|
||||
@@ -110,6 +113,13 @@ class LLM:
|
||||
self._total_stats = RequestStats()
|
||||
self._last_request_stats = RequestStats()
|
||||
|
||||
if _STRIX_REASONING_EFFORT:
|
||||
self._reasoning_effort = _STRIX_REASONING_EFFORT
|
||||
elif self.config.scan_mode == "quick":
|
||||
self._reasoning_effort = "medium"
|
||||
else:
|
||||
self._reasoning_effort = "high"
|
||||
|
||||
self.memory_compressor = MemoryCompressor(
|
||||
model_name=self.config.model_name,
|
||||
timeout=self.config.timeout,
|
||||
@@ -467,7 +477,7 @@ class LLM:
|
||||
completion_args["stop"] = ["</function>"]
|
||||
|
||||
if self._should_include_reasoning_effort():
|
||||
completion_args["reasoning_effort"] = "high"
|
||||
completion_args["reasoning_effort"] = self._reasoning_effort
|
||||
|
||||
queue = get_global_queue()
|
||||
self._total_stats.requests += 1
|
||||
|
||||
Reference in New Issue
Block a user