TURBINEDOCUMENTATION

CONFIGURATION

Complete reference for the turbine.config.json configuration file.

§ CONFIG FILE

Turbine reads configuration from turbine.config.json in your project root.

{
  "providers": {
    "claude": {
      "priority": 1,
      "rateLimit": 1000,
      "costPerToken": 0.00001
    },
    "codex": {
      "priority": 2,
      "rateLimit": 500,
      "costPerToken": 0.00002
    },
    "gemini": {
      "priority": 3,
      "rateLimit": 2000,
      "costPerToken": 0.000005
    }
  },
  "routing": {
    "strategy": "priority",
    "failover": true
  },
  "alerts": {
    "costDaily": 100,
    "costWeekly": 500,
    "rateLimitThreshold": 0.8
  }
}

§ PROVIDERS

Configure AI provider settings:

  • priority — Provider preference order (1 = highest)
  • rateLimit — Requests per minute limit
  • costPerToken — Cost per token for billing
  • apiKey — API key (or use environment variable)
  • endpoint — Custom API endpoint URL

§ ROUTING

Configure request routing behavior:

  • strategy — Routing strategy: "priority", "roundRobin", "leastCost"
  • failover — Enable automatic failover (true/false)
  • retries — Number of retry attempts
  • timeout — Request timeout in milliseconds

§ ALERTS

Configure alert thresholds:

  • costDaily — Daily cost alert threshold (USD)
  • costWeekly — Weekly cost alert threshold (USD)
  • rateLimitThreshold — Alert when rate limit exceeds (0-1)
  • webhook — Webhook URL for notifications

§ ENVIRONMENT VARIABLES

Configuration can also be set via environment variables:

TURBINE_CLAUDE_API_KEY=sk-...
TURBINE_CODEX_API_KEY=sk-...
TURBINE_GEMINI_API_KEY=...
TURBINE_LOG_LEVEL=debug
TURBINE_DATA_DIR=~/.turbine

Environment variables take precedence over config file values.