Repository navigation
Expand file tree
/
Copy pathconfig.example.toml
More file actions
75 lines (66 loc) · 2.17 KB
/
Copy pathconfig.example.toml
File metadata and controls
75 lines (66 loc) · 2.17 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
# Configuration-shape / unit-test example only. Runtime is initialized by management APIs.
# Enable other deployments after setting their key and model environment variables.
[server]
bind = "127.0.0.1:4000"
max_concurrent = 256
# Whole model request, including Base64 images; upstream limits still apply.
max_body_bytes = 536870912
request_timeout_secs = 120
# Total time to receive the body, separate from the upstream request timeout.
body_timeout_secs = 120
# Optional, separate credential for GET /admin/status and /admin/usage:
# admin_key_env = "TEELLM_ADMIN_KEY"
# Upstream refusal audit is always enabled and requires no separate API key.
# Admins pull /admin/refusals and delete through the last archived ID; request bodies are not saved.
[[users]]
id = "test-user"
max_concurrent = 16
[[keys]]
user_id = "test-user"
name = "local"
key_env = "TEELLM_API_KEY"
models = ["chat/*", "claude/*", "grok/*"] # Pool ACLs; send the real model ID unchanged.
rpm = 120
tpm = 0
max_concurrent = 32
[[models]]
name = "chat"
strategy = "round_robin" # weighted round_robin or weighted least_busy
max_attempts = 3 # total attempts, including the initial request and fallbacks
retry_delay_ms = 100 # exponential delay, bounded by the request deadline
fallbacks = [] # other model aliases, tried after this pool
[[models.deployments]]
id = "openai-primary"
provider = "openai"
model = "env:OPENAI_MODEL"
api_key_env = "OPENAI_API_KEY"
proxy = "http://127.0.0.1:18081" # Required; replace with this account's proxy.
# api_base = "https://api.openai.com/v1"
weight = 1
max_concurrent = 32
rpm = 0
failure_threshold = 2
cooldown_secs = 30
timeout_secs = 90
[[models]]
name = "claude"
provider = "anthropic"
[[models.deployments]]
id = "claude-primary"
provider = "anthropic" # alias: claude
model = "env:ANTHROPIC_MODEL"
api_key_env = "ANTHROPIC_API_KEY"
proxy = "http://127.0.0.1:18082"
enabled = false
# api_base = "https://api.anthropic.com/v1"
[[models]]
name = "grok"
provider = "xai"
[[models.deployments]]
id = "grok-primary"
provider = "xai" # alias: grok
model = "env:XAI_MODEL"
api_key_env = "XAI_API_KEY"
proxy = "http://127.0.0.1:18084"
enabled = false
# api_base = "https://api.x.ai/v1"