-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
95 lines (92 loc) · 2.32 KB
/
config.yaml
File metadata and controls
95 lines (92 loc) · 2.32 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# ReliAPI Configuration Example
# All targets (upstreams) are defined here
targets:
# Example: OpenAI LLM provider
openai:
base_url: "https://api.openai.com/v1"
timeout_ms: 20000
circuit:
error_threshold: 5
cooldown_s: 60
llm:
provider: "openai" # Explicit provider (optional, auto-detected from base_url if not specified)
default_model: "gpt-4o-mini"
max_tokens: 1024
temperature: 0.7
# Budget control: predictable costs
soft_cost_cap_usd: 0.01 # Warn and throttle if exceeded
hard_cost_cap_usd: 0.05 # Reject if exceeded
cache:
ttl_s: 60
enabled: true
auth:
type: bearer_env
env_var: OPENAI_API_KEY
# fallback_targets: ["anthropic", "mistral"] # Planned: simple fallback chain for LLM proxy
retry_matrix:
"429":
attempts: 3
backoff: "exp-jitter"
base_s: 1.0
max_s: 60.0
"5xx":
attempts: 2
backoff: "exp-jitter"
base_s: 1.0
"net":
attempts: 2
backoff: "exp-jitter"
base_s: 1.0
# Example: Anthropic LLM provider
anthropic:
base_url: "https://api.anthropic.com/v1"
timeout_ms: 25000
circuit:
error_threshold: 5
cooldown_s: 60
llm:
provider: "anthropic" # Explicit provider (optional, auto-detected from base_url if not specified)
default_model: "claude-3-haiku-20240307"
max_tokens: 2048
temperature: 0.2
# Budget control
soft_cost_cap_usd: 0.005
hard_cost_cap_usd: 0.02
cache:
ttl_s: 300
enabled: true
auth:
type: bearer_env
env_var: ANTHROPIC_API_KEY
retry_matrix:
"429":
attempts: 3
backoff: "exp-jitter"
base_s: 2.0
"5xx":
attempts: 2
backoff: "exp-jitter"
base_s: 1.0
# Example: Generic HTTP API (not LLM)
payments_api:
base_url: "https://api.payments.example.com"
timeout_ms: 12000
circuit:
error_threshold: 3
cooldown_s: 30
cache:
ttl_s: 300
enabled: true
auth:
type: api_key
header: "X-API-Key"
env_var: PAYMENTS_API_KEY
retry_matrix:
"429":
attempts: 3
backoff: "exp-jitter"
base_s: 1.0
"5xx":
attempts: 2
backoff: "exp-jitter"
base_s: 1.0