Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/MonoRelay/llms.txt

Use this file to discover all available pages before exploring further.

Providers are defined under the top-level providers key in config.yml. Each entry is a named block that describes how MonoRelay connects to a specific upstream API — its base URL, authentication keys, timeout, and optional features like retry logic or request cloaking. You can enable or disable any provider at runtime; the configuration is hot-reloaded without a server restart.

Provider configuration tabs

OpenRouter aggregates hundreds of models behind a single OpenAI-compatible endpoint. It is the recommended default provider.
config.yml
providers:
  openrouter:
    enabled: true
    base_url: "https://openrouter.ai/api/v1"
    keys:
      - key: "sk-or-v1-your-openrouter-key"
        label: "main"
        weight: 1
      - key: "sk-or-v1-your-backup-key"
        label: "backup"
        weight: 1
    headers:
      HTTP-Referer: "https://github.com/Excurs1ons/MonoRelay"
      X-Title: "MonoRelay"
    rate_limit_cooldown: 60
    timeout: 120
    models:
      include: []
      exclude: []

Common provider fields

FieldTypeDefaultDescription
enabledbooleantrueWhether this provider is active
base_urlstringUpstream API base URL
keysobject[][]List of API keys; see key fields
headersobject{}Extra HTTP headers sent with every request
rate_limit_cooldowninteger60Seconds a key stays on cooldown after a 429 response
timeoutinteger120Request timeout in seconds
models.includestring[][]Explicit allowlist of models; empty means all models
models.excludestring[][]Models to exclude from this provider

Retry configuration

Retry logic is disabled by default. Enable it per-provider to automatically retry failed requests with exponential backoff.
config.yml
providers:
  openrouter:
    retry:
      enabled: true
      max_retries: 3
      retry_on_status: [429, 500, 502, 503, 504]
      retry_on_errors:
        - "rate_limit_error"
        - "timeout_error"
        - "upstream_error"
        - "service_unavailable"
      backoff_factor: 1.5
      backoff_max: 60
retry.enabled
boolean
default:"false"
Enable automatic request retries.
retry.max_retries
number
default:"3"
Maximum number of retry attempts per request.
retry.retry_on_status
number[]
default:"[429, 500, 502, 503, 504]"
HTTP status codes that trigger a retry.
retry.retry_on_errors
string[]
Error type strings that trigger a retry (e.g., "rate_limit_error", "timeout_error").
retry.backoff_factor
number
default:"1.5"
Multiplier for exponential backoff delay between attempts.
retry.backoff_max
number
default:"60"
Maximum backoff delay in seconds.

Ignore configuration

When certain upstream error types should be silently swallowed rather than surfaced to the client, use the ignore block.
config.yml
providers:
  openrouter:
    ignore:
      enabled: true
      ignore_errors:
        - "content_filter"
        - "content_moderation"
        - "policy_violation"
ignore.enabled
boolean
default:"false"
Enable error ignoring.
ignore.ignore_errors
string[]
Error type strings to suppress. Requests that trigger these errors return an empty successful response.

Request cloaking

Cloaking lets you override HTTP headers so outbound requests appear to originate from a different client. This is most useful with the chatgpt_web provider or when a provider restricts access by User-Agent.
config.yml
providers:
  openrouter:
    cloaking:
      user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36"
      referer: "https://chat.example.com"
      origin: "https://chat.example.com"
      accept: "application/json"
      accept_language: "en-US,en;q=0.9"
cloaking.user_agent
string
Override the User-Agent header sent to the upstream provider.
cloaking.referer
string
Override the Referer header.
cloaking.origin
string
Override the Origin header.
cloaking.accept
string
Override the Accept header.
cloaking.accept_language
string
Override the Accept-Language header.

ChatGPT web reverse-proxy fields

The web_reverse block is only used when provider_type: "web_reverse".
web_reverse.pow_difficulty
string
default:"\"00003a\""
Proof-of-work difficulty string required by the ChatGPT web gateway.
web_reverse.conversation_only
boolean
default:"false"
When true, only the conversation endpoint is used (no streaming backend).
web_reverse.history_disabled
boolean
default:"true"
Prevent conversations from appearing in the ChatGPT history sidebar.
web_reverse.proxy_url
string
default:"\"\""
Optional HTTP/SOCKS proxy URL for outbound ChatGPT web requests.
web_reverse.chatgpt_base_url
string
default:"\"https://chatgpt.com\""
Base URL for the ChatGPT web interface.
web_reverse.model_mapping
object
Maps OpenAI model names in the request to internal ChatGPT web model identifiers. For example, "gpt-3.5-turbo" maps to "text-davinci-002-render-sha".

Build docs developers (and LLMs) love