env_overrides to Environment.session(...).
Accepted keys
If you are the owner of the environment, you may override any env var on the main container — handy when developing or testing your own environment. Other callers are restricted to the following keys; anything else returns a400:
| Key | Purpose |
|---|---|
OPENAI_BASE_URL | Override the OpenAI-compatible endpoint URL |
OPENAI_API_KEY | Override the OpenAI API key |
ANTHROPIC_BASE_URL | Override the Anthropic endpoint URL |
ANTHROPIC_API_KEY | Override the Anthropic API key |
For API keys you do not need to redirect to a custom endpoint, prefer the
secrets= channel — it never exposes the raw value to your environment code. See Keeping Secrets Secret. Use env_overrides for the API key only when it is paired with a custom *_BASE_URL whose host the secrets egress allowlist would otherwise reject.Pool isolation
Sessions created with overrides run in a separate pod pool from default sessions, keyed by a hash of the overrides map. Two callers passing the sameenv_overrides will share a pool; callers passing different overrides will not.
