Configuration example

The configuration file is a YAML file that contains all the settings for the gateway.

---
version: 1
threads: 3
pid_file: /tmp/burgonet.pid
error_log: /tmp/load_balancer_err.log
upgrade_sock: /tmp/load_balancer.sock
db_filepath: database.redb
port: 6191
host: 127.0.0.1
prometheus_host: 127.0.0.1
prometheus_port: 6192
admin_host: 127.0.0.1
admin_port: 6189
chat_host: 127.0.0.1
chat_port: 6190
echo_host: 127.0.0.1
echo_port: 6193

log_config_file: log4rs.yml

trust_header_authentication:
    - Tailscale-User-Login
    - Cf-Access-Authenticated-User-Email
    - X-Forwarded-Email

models:
  - location: "/echo"
    model_name: "echo"
    proxy_pass: "http://127.0.0.1:6193/echo"
    parser: "echo"
    api_key: "$DEEPSEEK_API_KEY"
    pii_protection_url: "http://127.0.0.1:8001/check-pii-base64"

  - location: "/ollama/gemma2/2b/"
    model_name: "gemma2:2b-instruct-q6_K"
    parser: "ollama"
    proxy_pass: "http://127.0.0.1:11434/api/chat"
    api_key: "NA"
    disabled_groups: "mammals, birds"
    blacklist_words: "confidential, mycorp"
    pii_protection_url: "http://127.0.0.1:8001/check-pii-base64"

  - location: "/quotas/test"
    model_name: "gemma2:2b-instruct-q6_K"
    parser: "ollama"
    proxy_pass: "http://127.0.0.1:11434/api/chat"
    api_key: "NA"
    disabled_groups: "mammals, birds"
    blacklist_words: "confidential, mycorp"
    pii_protection_url: "http://127.0.0.1:8001/check-pii-base64"
    quotas:
      - max_tokens:
          minute: 50000
          hour: 60000
          day: 1000000
          week: 10000
      - max_requests:
          second: 1
          minute: 15


  - location: "/llamacpp/"
    provider: "llamacpp"
    model_name: "phi4-GGUF-Q4_K"
    proxy_pass: "http://m1:8081/completion"


  - location: "/api.openai.com/v1/chat/completions"
    model_name: "openai"
    parser: "openai"
    proxy_pass: "https://api.openai.com/v1/chat/completions"
    api_key: "$OPENAI_API_KEY"

  - location: "/api.deepseek.com/chat/completions"
    model_name: "deepseek-chat"
    parser: "deepseek"
    proxy_pass: "https://api.deepseek.com/chat/completions"
    api_key: "$DEEPSEEK_API_KEY"

  - location: "/api.openai.com/v1/chat/completions"
    model_name: "gpt4o"
    proxy_pass: "https://api.openai.com"
    api_key: "YOUR_API_KEY"

  - location: "/openai.azure.com/v1/chat/completions"
    model_name: "azuregpt4"
    proxy_pass: "https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_ID-id/completions?api-version=2024-10-21"
    api_key: "YOUR_API_KEY"

  - location: "/gemini"
    model_name: "gemini-1.5-flash"
    parser: "gemini"
    proxy_pass: "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=$GEMINI_API_KEY"
    api_key: "$GEMINI_API_KEY"