Skip to content
Packages Examples Agents Blog Get started

The config section key is ai_llm. Environment prefix: ORI_AI_LLM__.

KeyTypeDefaultEnv VarDescription
enabledboolTrueORI_AI_LLM__ENABLEDEnable the LLM subsystem
providerModelProvider (str enum)"openai"ORI_AI_LLM__PROVIDERLLM provider name
modelstr"gpt-4-turbo"ORI_AI_LLM__MODELModel name or identifier
api_keySecretStr | NoneNoneORI_AI_LLM__API_KEYAPI key for the provider
api_basestr | NoneNoneORI_AI_LLM__API_BASECustom API base URL
temperaturefloat0.7ORI_AI_LLM__TEMPERATURESampling temperature (0.0–2.0)
max_tokensint | NoneNoneORI_AI_LLM__MAX_TOKENSMax tokens in response
timeoutfloat60.0ORI_AI_LLM__TIMEOUTRequest timeout in seconds
enable_cacheboolFalseORI_AI_LLM__ENABLE_CACHEEnable response caching
cache_ttlint3600ORI_AI_LLM__CACHE_TTLCache TTL in seconds
thinkingThinkingConfig | NoneNoneORI_AI_LLM__THINKING__*Thinking/reasoning config
extradict[str, Any]{}ORI_AI_LLM__EXTRA__*Provider-specific extra params

When thinking is set, the ThinkingConfig object supports:

KeyTypeDefaultDescription
suppressboolFalseActively suppress thinking tokens
budget_tokensint10000Max tokens for reasoning
levelstr | NoneNoneGemini 3 thinking level (minimal, low, medium, high)
effortstr | NoneNoneOpenAI reasoning effort (low, medium, high)
application.yaml
ai_llm:
provider: openai
model: gpt-4o
temperature: 0.3
max_tokens: 2000
timeout: 30
enable_cache: true
cache_ttl: 7200
thinking:
budget_tokens: 5000
Terminal window
export ORI_AI_LLM__PROVIDER=anthropic
export ORI_AI_LLM__MODEL=claude-sonnet-4-20250514
export ORI_AI_LLM__API_KEY=sk-ant-...
export ORI_AI_LLM__TEMPERATURE=0.0
export ORI_AI_LLM__ENABLE_CACHE=true

Install the provider-specific client library:

Terminal window
uv add "oridecon-ai-llm[openai]" # openai, tiktoken
uv add "oridecon-ai-llm[anthropic]" # anthropic
uv add "oridecon-ai-llm[ollama]" # ollama
uv add "oridecon-ai-llm[groq]" # groq
uv add "oridecon-ai-llm[cohere]" # cohere
uv add "oridecon-ai-llm[mistral]" # mistralai