Normandy.Behaviours.CredentialProvider behaviour (normandy v1.3.0)

View Source

Contract for resolving an LLM provider token.

Defined and defaulted in Phase 2; its consumption at the Model.converse boundary is deferred (the token still flows through config.client today). The default impl FromClient extracts the api_key already carried on the client struct, matching any client that exposes a binary :api_key so it stays decoupled from Normandy.LLM.

Summary

Callbacks

get_token(provider, opts)

@callback get_token(provider :: term(), opts :: keyword()) ::
  {:ok, String.t()} | {:error, term()}