Learn how to deploy the TensorZero Gateway.
Development
-tier cluster on ClickHouse Cloud.
See the ClickHouse documentation for more details on configuring your ClickHouse deployment.
TENSORZERO_CLICKHOUSE_URL
environment variable with the connection details.
The variable takes a standard format.
[gateway]
in the Configuration Reference for the relevant configuration (e.g. customizing the port).
Disabling Observability (Not Recommended)
tensorzero.toml
file:dryrun: true
parameter to the inference and feedback API endpoints.Disabling Pseudonymous Usage Analytics
howdy.rs
in the GitHub repository to see exactly what usage data is collected and shared with TensorZero.To disable usage analytics, set the following configuration in the tensorzero.toml
file:TENSORZERO_DISABLE_PSEUDONYMOUS_USAGE_ANALYTICS=1
.Running with Docker (Recommended)
tensorzero.toml
file as well as its dependencies (e.g. schemas and templates), as well as the environment variables discussed above.Building from source
Running with Docker (Recommended)
docker-compose.yml
for reference.Running with Kubernetes (k8s) and Helm
Building from source
--config-file
to specify a custom configuration file (e.g. --config-file /path/to/tensorzero.toml
) or --default-config
to use default settings (i.e. no custom functions, metrics, etc.). You can also use --log-format
to set the logging format to either pretty
(default) or json
.
tensorzero.toml
configuration file. Read more about the configuration file here.
TENSORZERO_CLICKHOUSE_URL
environment variable discussed above, the TensorZero Gateway accepts the following environment variables for provider credentials.
Unless you specify an alternative credential location in your configuration file, these environment variables are required for the providers that are used in a variant with positive weight.
If required credentials are missing, the gateway will fail on startup.
Provider | Environment Variable(s) |
---|---|
Anthropic | ANTHROPIC_API_KEY |
AWS Bedrock | AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY , AWS_REGION (optional) |
AWS SageMaker | AWS_ACCESS_KEY_ID , AWS_SECRET_ACCESS_KEY , AWS_REGION (optional) |
Azure OpenAI | AZURE_OPENAI_API_KEY |
Fireworks | FIREWORKS_API_KEY |
GCP Vertex AI Anthropic | GCP_VERTEX_CREDENTIALS_PATH (see below for details) |
GCP Vertex AI Gemini | GCP_VERTEX_CREDENTIALS_PATH (see below for details) |
Google AI Studio Gemini | GOOGLE_AI_STUDIO_GEMINI_API_KEY |
Groq | GROQ_API_KEY |
Hyperbolic | HYPERBOLIC_API_KEY |
Mistral | MISTRAL_API_KEY |
OpenAI | OPENAI_API_KEY |
OpenRouter | OPENROUTER_API_KEY |
Together | TOGETHER_API_KEY |
xAI | XAI_API_KEY |
/app/gcp-credentials.json
using an additional -v
flag..env.example
for a complete example with every supported environment variable.