Configuration Reference
Configuration Reference
Section titled “Configuration Reference”This page is the single-source configuration reference for the tracked config.example.toml. ProxAI writes this file into the app directory on first run, then loads your local config.toml for actual runtime settings.
What belongs where
Section titled “What belongs where”Configuration guideField-by-field explanations and how the major config sections work together.Defaults and limitsCurated quick lookup for default endpoints, timeouts, limits, and capture defaults.
Section map
Section titled “Section map”| Section | Owns | Task docs |
|---|---|---|
[server] | Local proxy listener, request size, and concurrency limits. | Configuration |
[mcp] | Local MCP control/API listener. MCP is a control surface, not a model path. | Configuration |
[routing.default_provider_names] | Fallback provider names per inbound request protocol. | Routing and Providers |
[[routing.routes]] | Explicit model/protocol routes and optional upstream model rewrite. | Route Matching |
[providers.<name>] | Named upstream provider protocol, base URL, API key, compatibility, and idle timeout. | Provider Setup |
[tool_calls] | Semantic timeout for incomplete streamed tool-call arguments. | Streaming Behavior |
[logging] | Log level, output format, and color behavior. | Observability |
[logging.duration_thresholds] | Human-log duration coloring thresholds. | Observability |
[error_responses] | Client-facing error format: text or JSON. | Error Responses |
[capture] | Local per-phase capture switches. | Capture Phases |
Runtime ownership
Section titled “Runtime ownership”| Artifact | Role |
|---|---|
`config.example.toml` | Tracked example and docs source. Keep concise and secret-free. |
`config.toml` | Local runtime configuration. Intentionally git-ignored. |
`src/config.rs` | Typed schema, parsing, validation, and defaults. |
`site/src/content/docs/*/reference/configuration.mdx` | Reference page that embeds the tracked example and maps its sections. |
config.example.toml
Section titled “config.example.toml”[server]host = "127.0.0.1"port = 18080# Maximum inbound HTTP request body size accepted by the local proxy.max_request_body_bytes = 52428800# Maximum number of concurrently handled local proxy requests.max_concurrent_requests = 64
[mcp]# Local MCP control/API listener. The MCP endpoint is served at /mcp.# Example default URL: http://127.0.0.1:18081/mcphost = "127.0.0.1"port = 18081
[routing.default_provider_names]openai_responses = "openai"# No-conversion default provider for /v1/chat/completions.openai_chat_completions = "minimax_chat"# No-conversion default provider for /v1/messages.anthropic_messages = "anthropic"
# Route matching modes:# - exact: case-insensitive exact match# - glob: * and ? wildcard match# - regex: case-insensitive regex match; upstream_model acts as replacement template# - auto: infer glob when * or ? is present, infer regex for obvious regex syntax,# otherwise exact## request_protocol is optional. The inbound protocol is determined from the# actual request path (/v1/responses, /v1/chat/completions, or /v1/messages).# - omitted: match this model pattern for any inbound protocol# - set: require the inbound protocol to match; if the model pattern matches but# the request path uses a different protocol, proxai returns a config error# If you need different providers for the same model pattern across endpoints,# create separate routes and set request_protocol explicitly on each one.## upstream_model is optional:# - omitted: forward the original request model unchanged# - exact/glob: fixed upstream model mapping# - regex: replacement template using $1 or $name
[[routing.routes]]# Stable route names can be targeted by --route-override name.field=value.name = "openai"# auto => globmodel_pattern = "gpt-*"provider = "openai"
[[routing.routes]]name = "mimo_chat_ant"# Example OpenAI Chat Completions requests routed to an Anthropic-compatible provider.model_pattern = "mimo-*"provider = "anthropic"
[[routing.routes]]name = "minimax_chat"# Example MiniMax M3 route for OpenAI Chat Completions-compatible clients.model_pattern = "MiniMax-*"provider = "minimax_chat"
# Example exact alias route:# [[routing.routes]]# name = "gpt_54_stable_alias"# model_pattern = "gpt-5.4-stable"# provider = "openai"# upstream_model = "gpt-5.4"
# Example regex mapping route:# [[routing.routes]]# name = "gpt_minor_regex"# model_pattern = "^gpt-(?<major>\d+)\.(?<minor>\d+)-mini$"# provider = "openai"# match_kind = "regex"# upstream_model = "gpt-$major.$minor-mini"
[providers.openai]protocol = "openai_responses"base_url = "http://your-openai-upstream.example:8080"# Required. Proxai always sends this key upstream and ignores any# Authorization header Zed provided. This makes dummy Zed keys safe.api_key = "replace-with-your-api-key"read_idle_timeout_secs = 120
[providers.minimax_chat]protocol = "openai_chat_completions"base_url = "https://api.minimaxi.com/v1"api_key = "replace-with-your-minimax-api-key"read_idle_timeout_secs = 120
[providers.anthropic]protocol = "anthropic_messages"base_url = "https://api.anthropic.com"api_key = "replace-with-your-api-key"# strict: do not rewrite successful upstream Anthropic Messages response bodies.# anthropic_compatible: fill conservative compatibility gaps, currently# missing SDK required-nullable response fields, bare message_start events,# measured MiniMax thinking block missing-signature events, and measured# GLM 5.1 partial server_tool_use counters.compatibility = "strict"read_idle_timeout_secs = 120
[tool_calls]# Semantic timeout for incomplete streamed tool arguments. Must be > 0.timeout_secs = 120
[logging]level = "info"output_format = "human"use_color = true
[logging.duration_thresholds]warn_ms = 5000error_ms = 15000
[error_responses]# text: concise text body, best for raw-string clients# json: OpenAI-style JSON error bodyformat = "text"
[capture]# Capture the client request as proxai received it.inbound_request_enabled = false# Capture the request proxai actually forwards upstream after adaptation.provider_request_enabled = false# Capture the upstream response headers and raw response body bytes.upstream_response_enabled = false# Capture the final response proxai sends back to the client.outbound_response_enabled = false