Add configurable LLM gateway with ordered failover and durable retries
This commit is contained in:
1 parent
50b9d6e021
commit
b2b77c7723
22 files changed
+1413
-2
No files matched your search
@@ -0,0 +1,39 @@
|
||||
# Copy to an untracked config/llm.local.toml. Array order is failover order.
|
||||
[llm]
|
||||
max_attempts = 10 # Full rounds, not individual HTTP calls
|
||||
retry_delay_seconds = 60
|
||||
blocked_retry_seconds = 3600 # Earliest explicit restart after exhaustion
|
||||
max_request_bytes = 1048576
|
||||
max_response_bytes = 1048576
|
||||
privacy_profile = "local_only" # local_only / self_hosted / cloud_allowed
|
||||
|
||||
[[llm.providers]]
|
||||
id = "local"
|
||||
adapter = "openai_compatible"
|
||||
privacy = "local"
|
||||
base_url = "http://127.0.0.1:8000/v1"
|
||||
model = "your-local-model"
|
||||
timeout_seconds = 30
|
||||
response_format = "json_object"
|
||||
token_parameter = "max_tokens"
|
||||
max_output_tokens = 4096
|
||||
|
||||
[[llm.providers]]
|
||||
id = "own-server"
|
||||
adapter = "openai_compatible"
|
||||
privacy = "self_hosted"
|
||||
base_url = "https://your-server.example/v1"
|
||||
model = "your-server-model"
|
||||
api_key_env = "VBA_OWN_SERVER_KEY"
|
||||
enabled = false
|
||||
response_format = "json_object"
|
||||
|
||||
[[llm.providers]]
|
||||
id = "cloud"
|
||||
adapter = "openai_compatible"
|
||||
privacy = "cloud"
|
||||
base_url = "https://api.openai.com/v1"
|
||||
model = "your-cloud-model"
|
||||
api_key_env = "OPENAI_API_KEY"
|
||||
enabled = false
|
||||
response_format = "json_schema"
|
||||
Reference in new issue
Block a user