summaryrefslogtreecommitdiff
path: root/config.example.json
blob: 0b4bd1986f620266aa3571e6c1ce7c67ffc55a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  "server": {
    "address_env": "AIGW_SERVER_ADDRESS",
    "max_body_bytes": 16777216,
    "read_header_timeout_seconds": 10,
    "idle_timeout_seconds": 120,
    "shutdown_timeout_seconds": 20
  },
  "auth": {
    "keys_env": "AIGW_API_KEYS",
    "allow_anonymous": false
  },
  "upstream_http": {
    "max_idle_connections": 4096,
    "max_idle_connections_per_host": 1024,
    "idle_connection_timeout_seconds": 90,
    "response_header_timeout_seconds": 60
  },
  "provider_health": {
    "active_probes_enabled_env": "AIGW_PROVIDER_ACTIVE_PROBES_ENABLED",
    "shared_history_enabled_env": "AIGW_PROVIDER_SHARED_HISTORY_ENABLED",
    "shared_history_stream": "aigw:provider-health:events",
    "shared_history_ttl_seconds": 900,
    "shared_history_max_events": 20000,
    "probe_interval_seconds": 30,
    "probe_timeout_seconds": 5
  },
  "observability": {
    "usage_buffer": 8192,
    "expose_metrics": true
  },
  "providers": [
    {
      "id": "openai-primary",
      "slug": "openai-primary",
      "protocol": "openai",
      "wire_api": "chat_completions",
      "base_url_env": "OPENAI_BASE_URL",
      "api_key_env": "OPENAI_API_KEY"
    },
    {
      "id": "anthropic-primary",
      "slug": "anthropic-primary",
      "protocol": "anthropic",
      "wire_api": "messages",
      "base_url_env": "ANTHROPIC_BASE_URL",
      "api_key_env": "ANTHROPIC_API_KEY"
    }
  ],
  "models": [
    {
      "id": "openai/gpt-4.1-mini",
      "owned_by": "openai",
      "routes": [
        {
          "provider": "openai-primary",
          "upstream_model": "gpt-4.1-mini",
          "priority": 0,
          "weight": 100
        }
      ]
    },
    {
      "id": "anthropic/claude-sonnet",
      "owned_by": "anthropic",
      "routes": [
        {
          "provider": "anthropic-primary",
          "upstream_model": "claude-sonnet-4-5",
          "priority": 0,
          "weight": 100
        }
      ]
    }
  ]
}