Strix (STRIX) — config

docs / modules / config

← all docs

Strix (STRIX) — config

flowchart LR IN["IN: env vars,\n~/.strix/cli-config.json"] --> ACT["ACT: resolve one Settings\nobject (memoized)"] ACT --> VAL["VAL: env vars always win\nover the JSON cache"] VAL --> OUT["OUT: Settings + StrixProvider\n(model routing for the whole scan)"]

What this is

strix/config answers two questions once per scan: "what LLM model/provider should every agent use," and "what are all the other tunable knobs" (budget defaults, context caps, telemetry on/off, viewer URL). It has no testing logic of its own — it's pure settings resolution and model-provider glue.

What flows through it

flowchart TD Loader["loader.py\nload_settings() (memoized)"] --> JSON["~/.strix/cli-config.json\n(persisted cache of\nresolved env values)"] Loader --> Env["os.environ\n(STRIX_LLM, LLM_API_KEY, ...)"] Loader --> Settings["settings.py\nSettings (pydantic-settings)"] Settings --> Models["models.py\nStrixProvider (LiteLLM-backed)"] Models --> LLM[("LLM provider")]

Technical details

flowchart LR IN["IN: env vars,\n~/.strix/cli-config.json"] --> ACT["ACT: resolve one Settings\nobject (memoized)"] ACT --> VAL["VAL: env vars always win\nover the JSON cache"] VAL --> OUT["OUT: Settings + StrixProvider\n(model routing for the whole scan)"]

Package: strix/config/ Depends on: nothing else in strix/ (this is a leaf/foundation package). Depended on by: almost everything — strix.core.runner (model resolution), strix.agents.factory (tool-schema style per model), strix.runtime (backend selection, resource limits), strix.report (dedup model settings).

Files at a glance

File Role
loader.py load_settings() (memoized), _read_json_overrides(), apply_config_override(), persist_current() — precedence: env vars > ~/.strix/cli-config.json > field defaults.
settings.py The nested Settings model: LlmSettings, DedupeSettings, ContextSettings, RuntimeSettings, TelemetrySettings, IntegrationSettings, ViewerSettings.
models.py StrixProvider(MultiProvider) — LiteLLM-backed model routing; provider-quirk predicates and custom Model wrapper classes.
codex.py ChatGPT-subscription auth mode support (strix auth login chatgpt).
tool_call_ids.py / tool_call_limits.py Per-turn tool-call bookkeeping and limits.

Files & functions, explained

loader.py — ~/.strix/cli-config.json is not a hand-authored config file; it's written by persist_current() after a scan resolves its env-derived settings, so subsequent runs don't need the same env vars repeated. _read_json_overrides() only fills in fields whose env-var alias isn't already set — env vars always win.

settings.py — the env vars documented in the project README map directly to fields here: STRIX_LLM → LlmSettings.model; LLM_API_KEY/OPENAI_API_KEY → LlmSettings.api_key; STRIX_REASONING_EFFORT; PERPLEXITY_API_KEY → IntegrationSettings (used by tools/web_search); STRIX_DEDUPE_MODEL → DedupeSettings (used by report/dedupe.py); STRIX_IMAGE/STRIX_RUNTIME_BACKEND → RuntimeSettings (used by runtime/session_manager.py).

models.py — StrixProvider rides on the OpenAI Agents SDK's LiteLLM-backed MultiProvider, so STRIX_LLM accepts any LiteLLM-style model id (openai/gpt-5.4, anthropic/claude-sonnet-4-6, bedrock/..., vertex_ai/..., openrouter/..., or a local/self-hosted endpoint via LLM_API_BASE). configure_sdk_model_defaults(settings) wires provider API keys into both the SDK's model registry and LiteLLM's own env, and registers a global litellm_cost_callback. Helper predicates (is_claude_model, is_bedrock_route, model_supports_reasoning, uses_chat_completions_tool_schema) drive per-provider behavior differences — see ../design/LLD.md for the three custom Model wrapper classes.

Related: STRIX — Backends, STRIX — Architecture (HLD), ../design/HLD.md.