fix: empty response handling, /no_think model gating, per-model profiles
- Detect empty LLM responses (no content, no tool calls) instead of silently treating them as task completion. Retries once without tools before warning the user. - Gate /no_think system message and chat_template_kwargs to Qwen/QwQ models only — sending /no_think to llama3.x caused empty responses. - Add model_profiles config section for per-model overrides (token budget, thinking, temperature, max_tokens) matched by name prefix. Applied at startup and on /model switch. - Update SessionManager on /model switch so session files record the correct model. - Add NDJSON fallback in SSE stream parser for Ollama compatibility. - Improve read_file error to suggest find_files on FileNotFoundError. - Add diagnostic logging for empty streams and empty results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,11 +18,24 @@ llm:
|
||||
|
||||
agent:
|
||||
max_iterations: 25
|
||||
max_conversation_tokens: 32000
|
||||
max_conversation_tokens: 32000 # Default token budget (overridden by model_profiles)
|
||||
workspace_root: "."
|
||||
truncation_keep_recent: 10
|
||||
truncation_threshold: 0.85
|
||||
|
||||
# Per-model overrides — matched by longest model name prefix.
|
||||
# Unset fields fall through to the defaults above.
|
||||
model_profiles:
|
||||
llama3:
|
||||
max_conversation_tokens: 120000
|
||||
thinking: false
|
||||
qwen:
|
||||
max_conversation_tokens: 32000
|
||||
thinking: false
|
||||
qwq:
|
||||
max_conversation_tokens: 32000
|
||||
thinking: true
|
||||
|
||||
permissions:
|
||||
auto_approve:
|
||||
- read_file
|
||||
|
||||
Reference in New Issue
Block a user