Configuration¶
Alloy reads configuration from, in precedence order:
- Per-call overrides (e.g.,
ask(..., model=...)
) configure(...)
and context scopes- Environment variables (
ALLOY_*
) - Built-in defaults (
model="gpt-5-mini"
,max_tool_turns=None
for unlimited)
Environment variables¶
ALLOY_MODEL
ALLOY_TEMPERATURE
ALLOY_MAX_TOKENS
ALLOY_SYSTEM
orALLOY_DEFAULT_SYSTEM
ALLOY_RETRY
ALLOY_MAX_TOOL_TURNS
ALLOY_EXTRA_JSON
(provider-specific)
Programmatic¶
from alloy import configure
configure(model="gpt-5-mini", temperature=0.2)