Expand description
API-key credentials of the providers whose setup is more than one key in one environment variable: Amazon Bedrock, Google Vertex AI, the two Cloudflare providers, llama.cpp, and Anthropic’s workload identity federation.
Ports of the ApiKeyAuth objects in providers/amazon-bedrock.ts,
google-vertex.ts, cloudflare-auth.ts and anthropic.ts in pi-ai, and
of extensions/llama/provider.ts in pi-coding-agent, v1.0.0.
Structs§
- Ambient
- What resolution reads besides the stored credential.
- Resolved
- Request credentials from a stored credential or the environment.
Functions§
- anthropic_
federation - Anthropic’s last resort when no key or token is set: workload identity federation, whose ids pass to the request as provider settings.
- cloudflare_
base_ url - Replaces Cloudflare’s
{CLOUDFLARE_ACCOUNT_ID}and{CLOUDFLARE_GATEWAY_ID}placeholders in a base URL with the request’s provider settings. Port ofresolveCloudflareModel. - is_
custom - Whether
provider’s key auth is resolved here rather than from its key variables. - login
- pi’s
loginfor a custom provider: the questions that build its stored credential.Nonewhen the provider is not custom. - resolve
- pi’s
resolvefor a custom provider: fromcredential, whose key is already resolved, else the environment.Nonewhen the provider is not configured or is not custom.