Skip to main content

Module credential

Module credential 

Source
Expand description

Multi-source credential resolution.

Reads API keys from multiple sources with clear priority:

  1. config.toml[engine].api_key (explicit override)
  2. ~/.oxi/auth.json (shared with oxi CLI if installed)
  3. oxi-ai env var fallback (CI/CD, containers)

Handles legacy oxi-cli auth.json entries ({"type":"api_key","key":"..."}) by auto-migrating them to the TokenBundle format on first write.

Structs§

CredentialStore
Multi-source credential resolver.

Enums§

CredentialSource
Where a credential was found.