Part of #166 (track B); RFC-0033 §8.6 level 1; extends RFC-0032 §3.3.
The registry can only express one kind of auth: env_var → read an API key → Authorization: Bearer. Everything else is hand-written per provider with no shared function: azure sends api-key, google x-goog-api-key, lmnt / exa_ai / parallel_ai / you_com / tinyfish x-api-key, bedrock-family providers each call bedrock/sigv4.rs, vertex takes an externally minted access token, and the 33 local-service wrappers send a PLACEHOLDER_API_KEY. Twelve header-building sites, zero reuse.
Work
- Row schema: replace
env_var with
"auth": { "kind": "api_key", "env": "AZURE_API_KEY", "header": "api-key" }
kind ∈ api_key (header defaults to Bearer; may be x-api-key, api-key, x-goog-api-key), none (local services; retire every PLACEHOLDER_API_KEY), sigv4 (params.region), bearer_token (externally supplied token, vertex). Legacy env_var keeps loading as api_key + Bearer during the transition.
aimux_provider_utils::apply_auth(headers: &mut HeaderMap, spec: &AuthSpec, credential: &Credential) — the single place that turns a credential into headers (SigV4 signing stays in bedrock/sigv4.rs but is invoked from here). Replace the twelve hand-written sites.
- Registry validation test: every row's
auth is well-formed; none rows never send an Authorization header (unit test on apply_auth).
Lands with or right after B1 (protocol column). Net deletion expected.
Part of #166 (track B); RFC-0033 §8.6 level 1; extends RFC-0032 §3.3.
The registry can only express one kind of auth:
env_var→ read an API key →Authorization: Bearer. Everything else is hand-written per provider with no shared function: azure sendsapi-key, googlex-goog-api-key, lmnt / exa_ai / parallel_ai / you_com / tinyfishx-api-key, bedrock-family providers each callbedrock/sigv4.rs, vertex takes an externally minted access token, and the 33 local-service wrappers send aPLACEHOLDER_API_KEY. Twelve header-building sites, zero reuse.Work
env_varwithkind∈api_key(headerdefaults to Bearer; may bex-api-key,api-key,x-goog-api-key),none(local services; retire everyPLACEHOLDER_API_KEY),sigv4(params.region),bearer_token(externally supplied token, vertex). Legacyenv_varkeeps loading asapi_key+ Bearer during the transition.aimux_provider_utils::apply_auth(headers: &mut HeaderMap, spec: &AuthSpec, credential: &Credential)— the single place that turns a credential into headers (SigV4 signing stays inbedrock/sigv4.rsbut is invoked from here). Replace the twelve hand-written sites.authis well-formed;nonerows never send an Authorization header (unit test onapply_auth).Lands with or right after B1 (protocol column). Net deletion expected.