# Meerkat default configuration template.
# This file is used to bootstrap ~/.rkat/config.toml when missing.

[agent]
# No model is pinned here: when `agent.model` is empty, surfaces resolve the
# default through the injected model catalog (meerkat-models) — per-provider
# `[models]` overrides first, then the catalog's global default.
max_tokens_per_turn = 16384
budget_warning_threshold = 0.8

# Model defaults are sourced from the meerkat-models catalog (core stays
# provider-free). Per-provider overrides can still be set in user config.
max_tokens = 8192

[shell]
program = "nu"
timeout_secs = 30
security_mode = "unrestricted"
security_patterns = []

[rest]
host = "127.0.0.1"
port = 8080

[store]
# database_dir = "/path/to/db"  # session database directory (server surfaces)

[limits]
# Live/staged session admission capacity. Persisted history does not count.
max_sessions = 100000

[compaction]
# Omit auto_compact_threshold to use the model-aware default. Set this
# explicitly to pin a fixed threshold, including the conservative 100000 value.
# auto_compact_threshold = 100000
recent_turn_budget = 4
max_summary_tokens = 4096
min_turns_between_compactions = 3

[hooks]
default_timeout_ms = 5000
payload_max_bytes = 131072
background_max_concurrency = 32

# Provider-native tool defaults. Controls whether provider web search tools
# are injected by default for models that support them. Set to false to disable.
# CLI opt-out: rkat run --no-web-search ...
# Per-request opt-out: send provider_params: {"web_search": null} for
# Anthropic/OpenAI or {"google_search": null} for Gemini.
[provider_tools.anthropic]
web_search = true

[provider_tools.openai]
web_search = true

[provider_tools.gemini]
google_search = true

[model_fallback]
# When enabled, factory-built agents try an ordered backup model after typed
# recoverable LLM failures such as rate limits, missing models, provider
# overload, auth failures, and context overflow. Omit `chain` to use the
# catalog-owned provider default chain.
enabled = true
# Set `use_catalog_default_chain = true` in a higher-precedence config layer to
# restore the built-in catalog chain over an inherited disabled/custom policy.
# [[model_fallback.chain]]
# model = "claude-opus-4-8"
# provider = "anthropic"
# auth_binding = { realm = "anthropic", binding = "default" }

[presentation.html]
# Used by `rkat run --html` / `--browser` unless overridden per run.
default_template = "polished"
