Files
SneakyCode/config/config.yaml
Phillip Tarrant 16d79df421 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>
2026-03-11 23:09:04 -05:00

108 lines
2.0 KiB
YAML

# SneakyCode Configuration
llm:
model: "qwen3.5:latest"
endpoint: "http://localhost:11434"
api_path: "/v1/chat/completions"
temperature: 0.1
max_tokens: 4096
timeout: 120
max_retries: 3
retry_backoff_base: 1.0
retry_backoff_max: 30.0
thinking: false # Disable model thinking/reasoning mode (reduces reasoning-only loops)
# Extra parameters merged into the API request body (model-specific).
# Examples:
# OpenAI: reasoning_effort: "low"
extra_body: {}
agent:
max_iterations: 25
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
- list_dir
- grep_files
- find_files
- finish
prompt_user:
- write_file
- delete_file
- run_command
- str_replace
- patch_apply
- make_dir
deny: []
tools:
shell:
allowed_commands:
- git
- python
- pip
- pytest
- ruff
- ls
- head
- tail
- wc
- diff
- grep
- find
- echo
- which
- jq
- type
- file
denied_commands:
- rm -rf /
- sudo
- curl
- wget
max_output_bytes: 65536
filesystem:
max_file_size_bytes: 1048576 # 1 MB
binary_detection: true
cache:
enabled: true
max_entries: 128
session:
session_dir: ".sneakycode/sessions"
auto_save: true
max_session_age_hours: 72
offer_resume: true
display:
show_tool_calls: true
show_token_usage: true
stream_output: true
debug:
enabled: false
log_dir: ".sneakycode/logs"
max_files: 10
skills:
enabled: true
directories:
- ".sneakycode/skills"