Files
aircontext/templates/config.yaml
2026-05-18 11:45:08 +08:00

45 lines
2.0 KiB
YAML

# AirContext compaction config.
#
# YOU MUST FILL these two fields (privacy-sensitive, never auto-populated):
# - backend.endpoint your LLM endpoint URL
# - backend.api_key either a literal value, or the ${env:VAR} placeholder
# pointing at an env var that holds the secret
#
# Everything else is auto-configured by `aircontext` on first run
# (model_context_window inferred from your Claude model setting, etc.) and
# you generally don't need to touch it. Edit freely if you want to override.
# `${env:VAR}` placeholders are resolved at runtime against environment
# variables (including those declared in ~/.claude/settings.json `env` block).
backend:
type: anthropic_native # or openai_compat (auto-set by aircontext when possible)
# >>> REQUIRED — fill before re-running aircontext <<<
endpoint: "" # e.g. https://api.anthropic.com | https://wolfai.top | http://localhost:11434/v1
# >>> REQUIRED — fill or set the env var <<<
api_key: ${env:ANTHROPIC_AUTH_TOKEN} # change to ${env:OPENAI_API_KEY} or paste a literal value
model: claude-haiku-4-5-20251001 # cheap+fast for compression; raise to claude-sonnet-4-6 if quality insufficient
max_output_tokens: 4000
timeout_seconds: 60
anthropic_version: "2023-06-01" # only used when type = anthropic_native
trigger:
strategy: token_ratio
threshold: 0.6 # compact when active chain reaches 60% of model_context_window
cooldown_seconds: 300
estimate_method: char_div_3_5
model_context_window: 200000 # auto-overridden on first aircontext run based on your claude model
compaction:
preserve_tail_messages: 10
drop_tool_results_over_lines: 1000
rules_file: rules.md
continuation_prompt: "基于上面的压缩摘要继续之前的工作;如果没有进行中的任务则等待我的下一条指令。"
safety:
backup: true
max_snapshots: 50
dry_run: false