site/docs/providers/envoy.md
Envoy AI Gateway is an open-source AI gateway that provides a unified proxy layer for accessing various AI model providers. It offers OpenAI-compatible endpoints.
The Envoy provider uses this format:
envoy:<model_name> - Connects to your gateway using the specified model name# yaml-language-server: $schema=https://promptfoo.dev/config-schema.json
providers:
- id: envoy:my-model
config:
apiBaseUrl: 'https://your-envoy-gateway.com/v1'
Set your gateway URL as an environment variable:
export ENVOY_API_BASE_URL="https://your-envoy-gateway.com"
Then use the provider without specifying the URL:
providers:
- id: envoy:my-model
Envoy authentication is usually done with an x-api-key header. Here's an example of how to configure that:
providers:
- id: envoy:my-model
config:
apiBaseUrl: 'https://your-envoy-gateway.com/v1'
headers:
x-api-key: 'foobar'