Expand description
Credential values: $VAR and ${VAR} templates, !command output, and the
environment variables each provider reads.
Ports of resolve-config-value.ts and env-api-keys.ts in pi v1.0.0.
Constants§
- AMBIENT_
CREDENTIALS - The key pi reports for providers authenticated by ambient credentials.
- BEARER_
TOKEN_ ENV - The variable Anthropic reads as a bearer token rather than an API key.
Functions§
- api_
key_ env_ vars - The environment variables holding a provider’s API key, in priority order.
Anthropic’s
ANTHROPIC_AUTH_TOKENis a bearer token, not a key (seeBEARER_TOKEN_ENV). - env_
api_ key - The first set environment variable for a provider’s key, with its name. For
providers with ambient credentials (Bedrock, Vertex) the key is
AMBIENT_CREDENTIALS. - env_
var_ names - The environment variables a template value reads.
- is_
command - Whether the value runs a command.
- is_
configured - Whether every variable the value reads is set.
- missing_
env_ vars - The variables the value reads that are not set.
- provider_
env_ value - A provider setting:
env’s value, else the process environment’s. Empty values count as unset. Port ofgetProviderEnvValue. - resolve
- Resolves a value:
!commandruns through the shell (cached whencache), anything else is a template whose variables must all be set. - resolve_
template - Resolves a template value, or returns
Nonefor a!commandor when a variable it reads is not set. - unresolved_
message - pi’s
resolveConfigValueOrThrowmessage for a value that did not resolve, describing it asdescription.
Type Aliases§
- Provider
Env - Extra variables that take priority over the process environment.