Skip to content
✨ agentgateway has joined the Agentic AI Foundation (AAIF) — Learn more

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Page as Markdown

Passthrough

Forward requests to the upstream provider without transformation.

The passthrough route type forwards requests to the upstream LLM provider as-is, without translating between API formats.

About

By default, agentgateway interprets known endpoints (such as /v1/chat/completions, /v1/messages, and /v1/responses) and translates between provider API formats. The passthrough route type instead forwards the request to the backend provider unmodified.

Use passthrough for endpoints that agentgateway does not natively translate, or when you want the provider to receive the request exactly as the client sent it. Because the request is not interpreted as LLM traffic, LLM policies such as prompt guards, prompt enrichment, and request-body rate limiting do not apply.

In the simplified llm configuration, any path that does not match a known endpoint falls back to the passthrough route type automatically.

Route type configuration

To pass all traffic through without interpretation, set passthrough: opaque on the model in the simplified llm configuration.

# yaml-language-server: $schema=https://agentgateway.dev/schema/config
llm:
  models:
  - name: "*"
    provider: openAI
    params:
      apiKey: "$OPENAI_API_KEY"
    passthrough: opaque

To configure passthrough as a fallback for unmatched paths in the binds/listeners/routes format, map the * wildcard path to the passthrough route type.

# yaml-language-server: $schema=https://agentgateway.dev/schema/config
binds:
- port: 4000
  listeners:
  - routes:
    - backends:
      - ai:
          name: openai
          provider:
            openAI: {}
      policies:
        ai:
          routes:
            "/v1/chat/completions": "completions"
            "*": "passthrough"
        backendAuth:
          key: "$OPENAI_API_KEY"

Extract telemetry from passthrough traffic

To pass requests through while still extracting token usage and rate-limit data when possible, set passthrough: detect. This inspects the request and response to record telemetry, but does not apply guardrails.

# yaml-language-server: $schema=https://agentgateway.dev/schema/config
llm:
  models:
  - name: "*"
    provider: openAI
    params:
      apiKey: "$OPENAI_API_KEY"
    passthrough: detect

For more information about LLM metrics and observability, see Observe traffic.

Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.