Server Settings
Settings holds instance-wide configuration: logging, features, resilience, and security policy. Changes are saved and applied immediately without a restart.
With Redis enabled (REDIS_ENABLED=true, on by default in the shipped Compose setup), changes hot-reload across every worker process within about a second, including web search, circuit-breaker thresholds, MCP server processes, personal tracing, API keys, and team roles. Without Redis, a multi-worker deployment only hot-reloads the worker that handled the change. The provider/model lookup cache is a separate optional switch (REDIS_CACHE_ENABLED).
The screen has two tabs, General and Advanced, and is admin-only. Theme, language, and personal tracing live in Account → Preferences. The Sections menu beside the tabs jumps to a section and shows the one you are currently reading.
General tab
Log Management
Controls are grouped into Capture, Retention, and Audit:
| Field | Default | Effect |
|---|---|---|
| Log Input/Output | off | Master switch for storing request/response bodies. When off, log rows still record status, tokens, cost, routing, and headers, while content payloads (request/response bodies, upstream error bodies, MCP/web-search arguments and results) are stored as {"_bodies_disabled": true}. Overrides x-log-full: true |
| Log Raw Stream | off | Store raw SSE text for streaming responses. When off, streamed responses are reassembled into non-streaming JSON (smaller, masked, and searchable); generic image streams keep raw frames. Turn on (or send x-log-full: true) to inspect exact wire frames |
| Log Retention Period | 30 | Days to keep logs and usage records (0 keeps them forever). The sweep runs at startup and daily, and a changed window is swept immediately. Keep at ≥ 31 days while monthly or lifetime budgets are in use, since budget checks sum usage records across the budget window |
| Audit Retention Days | inherits | Separate retention period for audit rows |
| Batch Retention Period | 30 | Days to keep proxy copies of batch files and job rows (0 keeps them forever). Upstream copies are unaffected |
| Body Sampling Rate | 1.0 | Fraction of requests whose bodies are stored when Log Input/Output is on. Sampled-out bodies are stored as {"_sampled_out": true} while metadata is still recorded. Clients can force capture for one request with x-log-full: true |
| Max Logged Body Bytes | 1048576 (1 MiB) | Maximum stored body size (0 = unlimited). Larger bodies are stored as {"_truncated": true, "size": N}. Also applies to x-log-full: true |
| Audit Sampling Rate | inherits | Sampling rate for audit rows |
| Mask Sensitive Data | on | Masks credentials in headers and bodies before storage |
| Extra Sensitive Keys | empty | Extra comma-separated field names to mask in addition to the built-in list (authorization, api_key, password, token, access_token, refresh_token, jwt_secret, etc.) |
| Manual Cleanup | — | Cleanup Logs permanently deletes request logs and usage records older than the chosen age. Delete all history ignores the age and wipes both tables, including today's rows; budget spend history is erased with them |
Usage records share the Log Retention Period window (set to 0 to keep both forever). Batch files and job rows follow Batch Retention Period.
Web Search
| Field | Notes |
|---|---|
| Enabled | Off by default. When on, the proxy intercepts web_search tool calls for providers without native search |
| Provider | searxng or ollama |
| SearXNG | url (required), optional api_key or basic-auth username/password, engines list, timeout (default 30 s), max_results (default 10, max 10) |
| Ollama | api_key (required), base_url (default https://ollama.com), timeout, max_results (max 10) |
Search credentials are write-only: they are encrypted at rest when ENCRYPTION_KEY is set and displayed as ****. Leaving the mask or a blank field keeps the stored secret; to rotate it, clear the field and enter the new secret. To remove it, clear the whole provider block.
Details and client-visible behavior: Tools, Reasoning & Web Search.
MCP Security
Deny-by-default policy for MCP servers: allowed/blocked commands, env filtering, and URL/IP blocks. Full reference: MCP Servers.
About
Shows the running version and checks GitHub tags for updates (cached 6 hours). Disable the outbound check with UPDATE_CHECK__ENABLED=false.
Advanced tab (admin only)
Request Policy
Controls how the proxy handles unrecognized top-level request fields and unsupported content blocks. Provider default lets each provider decide (currently passthrough for chat requests so provider extensions such as Qwen enable_thinking, Ollama think, or vLLM/SGLang options survive, and ignore for non-chat endpoints). Selecting a concrete value overrides every provider's default.
| Field | Options | Default |
|---|---|---|
| Unknown fields policy | provider default · ignore · passthrough · error | Provider default (passthrough for chat; ignore for non-chat) |
| Unsupported block policy | provider default · drop · degrade · error | Provider default (drop) |
Requests using native passthrough (Anthropic and Responses clients on supporting providers) bypass the unknown-fields policy and are forwarded verbatim.
For content blocks, lossless conversion runs first. Residual blocks that the provider cannot represent follow the policy: drop removes them, degrade replaces them with a text placeholder ([Image: …] or [<TypeName> block]), and error rejects the request.
Smart Routing
| Field | Default | Effect |
|---|---|---|
| Enabled | off | Enables the virtual models auto, fast, best |
| Mode weights | fast 0.35, auto 0.65, best 1.0 | Quality-vs-cost bias per virtual model |
| Routing Judge | off | Consults a System One model on ambiguous first turns; see Routing Judge |
| Routing Diagnostics | off | Adds full routing decision details to smart-routing log metadata |
| Graceful Degradation | off | Serves a degraded candidate instead of refusing when a preference cannot be met; see Virtual Models & Routing |
The optional routing judge is the only part of smart routing that makes an extra upstream call. Each judge call is logged in Logs → Judge Calls, attributed to the request that triggered it, and counted toward spend and budgets. You can submit per-request feedback from the log detail view.
Provider Selection
How providers of the same priority are ordered when several can serve a model:
| Strategy | Behavior |
|---|---|
session_sticky (default) | Keeps a conversation on one provider so its prompt cache stays warm. Uses Redis when configured, otherwise deterministic hashing over the conversation key. Falls back to random when no conversation key is present |
random | Random pick within the priority group; spreads load evenly across providers |
cost_optimized | Cheapest usable provider first (differs from random when same-priority mappings have different prices) |
balanced | Balances cost against observed latency while keeping a small exploration share |
Higher-priority groups are always tried before lower ones, regardless of strategy.
Each provider mapping also has a weight (default 1) that splits traffic within its priority group: 2 receives twice the requests of 1, and 0 keeps the provider as a last-resort fallback. See Models & Pricing → Provider priority.
The sticky key prefers the client's session header (x-opencode-session, x-claude-code-session-id, Codex's x-codex-turn-metadata, Pi's x-session-affinity, etc.), then an explicit session ID in the request body, then x-session-id from a trusted proxy, and finally a hash of the first user message. Redis holds the pin for 30 minutes and extends it when a conversation is served by a fallback provider.
Retry & Fallback
| Field | Default | Effect |
|---|---|---|
| Max retries | 3 | Retries against the same provider (can be overridden per model) |
| Max fallback attempts | 10 | Maximum provider hops for one request |
Circuit Breaker
| Field | Default | Effect |
|---|---|---|
| Enabled | on | Skip providers that are failing |
| Failure threshold | 5 | Consecutive failures before a provider is tripped |
| Cooldown | 60 s | Time before the provider is retried |
This section shows live breaker state per provider with Reset all and per-provider reset buttons. Counters are per process and reset on restart.
Instance Sign-in
| Field | Default | Effect |
|---|---|---|
| Public base URL | empty | External URL (https://proxy.example.com). Required for passkeys and OIDC. Must be HTTPS (or http://localhost for development). Changing it invalidates registered passkeys |
| Require admins to use 2FA | off | Redirects admins without TOTP to Account → Sign-in & security until they enroll |
| Ask for a code after a passkey sign-in | off | Also require TOTP after a passkey sign-in |
| SMTP enabled | off | Send invitation, email-verification, and password-reset emails |
| SMTP host / port / username / password / from address | empty / 587 / empty / empty / empty | Standard SMTP delivery; password is encrypted at rest and masked |
| STARTTLS / TLS (SMTPS) | on / off | Transport security for SMTP |
| Resend enabled | off | Send emails through Resend's HTTPS API. When enabled, Resend is used instead of SMTP (no automatic fallback) |
| Resend API key / from address | empty / empty | Resend sending key and sender address; key is encrypted at rest and masked |
| OIDC providers | empty | Named OpenID Connect providers (id, display name, issuer, client ID/secret, scopes). Enabled providers appear on the sign-in page |
Both SMTP and Resend configurations are saved independently so switching between them preserves credentials, though only one is active at a time. Send test email sends a test message using the saved configuration (save edits first). Discard changes restores the last saved snapshot.
The SMTP password, Resend API key, and OIDC client secrets are write-only and displayed as ****. Leaving the mask or a blank value keeps the stored secret; to rotate a secret, clear the field and enter the full new value.
An OIDC provider's id is permanent once saved. Each issuer must be an HTTPS URL (or http://localhost for development). Removing a provider deletes its configuration and secret; existing linked identities remain on user accounts but cannot sign in until a provider with the same id is added back.
Security & Rate Limiting
| Field | Default | Effect |
|---|---|---|
| Login lockout enabled | off | Lock an account after repeated failed logins (per username) |
| API-key IP lockout enabled | off | Lock a client IP after repeated failed API key authentications. Enable for instances exposed to untrusted networks; leave off behind shared NAT or local testing |
| Max failed login attempts / lockout duration | 5 / 900 s | Used when login lockout is enabled |
| Max failed API-key attempts / lockout duration | 10 / 300 s | Used when API-key IP lockout is enabled |
| Auth failure delay | 100 ms | Artificial delay on failed auth (±10% jitter) |
| Rate limiting disabled | off | Disables rate-limit buckets, per-key RPM, both failure lockouts, and auth failure delay. Budget caps and body-size limits stay active |
| Redis fail-closed | on | With Redis rate limiting, reject requests when Redis errors |
| HSTS enabled / max-age | on / 31536000 | Strict-Transport-Security header. Disable only for local HTTP development |
| Max request body size | 67108864 (64 MiB) | 0 disables. Checked via Content-Length or measured while streaming |
Lockout counters reset on restart. Rate-limit windows are in-memory unless Redis-backed rate limiting is enabled.
Response Keepalive
| Field | Runtime default | Effect |
|---|---|---|
| Enabled | on | Start heartbeat mode for slow non-streaming responses |
| Grace period | 60 s | How long a response may take before heartbeats begin |
| Interval | 15 s | Heartbeat interval (also used for SSE : keep-alive comments) |
Read the caveats before changing anything here: Reverse Proxy & TLS.
Rate Limits
Per-bucket overrides for built-in IP limits, in N/period form (5/minute, 100/hour). Counts must be positive. Per-API-key limits (rate_limit_rpm) are set on each key.
| Bucket | Default |
|---|---|
auth.login | 5/minute |
auth.setup | 5/minute |
auth.setup_status | 10/minute |
auth.capabilities | 20/minute |
auth.mfa | 10/minute |
auth.step_up | 10/minute |
auth.invite_accept | 10/minute |
auth.invite_status | 20/minute |
auth.passkey | 20/minute |
auth.oauth | 20/minute |
auth.email_verify | 20/minute |
auth.password_reset | 5/minute |
auth.password_reset_confirm | 10/minute |
account.sensitive | 10/minute |
config.test_email | 5/minute |
CORS Origins
List of origins allowed to call the API from a browser. Empty (default) disables CORS, which is right for same-origin deployments. See Reverse Proxy & TLS for how CORS interacts with auth failures.
Related
- Logs, Usage & Tracing
- Environment Variables: startup-only settings