PresetAuth
type PresetAuth = "key" | "bearer" | "oauth";Defined in: core/src/presets.ts:37
How the credential reaches the endpoint.
key: the vendor’s native key header (Anthropic readsx-api-key, Geminix-goog-api-key); the OpenAI shapes have only Bearer, so they never use this.bearer:Authorization: Bearer, the OpenAI shapes’ only mode, and the coding-plan gateways’ mode on the Anthropic wire (measured: Z.ai’s coding endpoint ignoresx-api-keyand reads Bearer).oauth: same wire asbearer, but the token is a short-lived access token from a sign-in flow (see@providerkit/core/auth). The preset may carry the beta headers that switch the endpoint into OAuth mode.