Skip to main content

Configuration

provider.json

The primary model configuration file. Defines available providers and models:

Structure

  • Top level = provider ID → array of model configs
  • Lookup = providers[provider_id][model_name]
  • Multiple keys = load-balanced across keys in api_keys

Fields

Loading

Or for Responses API:

Best Practices

  • Keep one provider.json per project (version control it minus the keys)
  • Put multiple keys in api_keys for hot models (automatic rotation)
  • Use api_params for stable per-model defaults such as reasoning_effort; pass call-time kwargs when you need a one-off override
  • Tune rate_limit_capacity and rate_limit_refill_rate per model based on your tier
  • Use max_retries=2 for local models (fast failure), max_retries=5 for cloud (transient errors)

Environment Variables (.env)

The framework reads .env for logging and observability:

Precedence

Runtime environment → .env file → framework defaults
  • LOG_LEVEL=WARNING — reduces framework noise during normal use
  • LOG_DIR=logs — keeps logs out of your project root
  • Langfuse disabled by default — enable only when you need trace collection

Direct Construction (No Files)

For scripts and one-offs, skip provider.json entirely:
This is ideal for shell scripts, demos, and quick experiments.