adk_provider_profile (erlang_adk v0.8.0)

View Source

Validation and secret-free projection for operator-owned model profiles.

A profile binds a public binary identifier to pre-existing adapter modules, an HTTPS endpoint/preset, model aliases, and a credential source. Callers can select only the identifier and an alias: they cannot choose modules, endpoint URLs, headers, environment names, concrete model identifiers, or operator-owned request authority/privacy defaults.

Summary

Functions

Return the operator profile without credential material. A literal source is represented only as #{source => literal}.

Types

endpoint/0

-type endpoint() ::
          gemini | openai | anthropic | local |
          #{scheme := https, host := binary(), port := pos_integer(), base_path := binary()}.

normalized_profile/0

-type normalized_profile() :: map().

profile_id/0

-type profile_id() :: binary().

Functions

live_config(Profile, Alias)

-spec live_config(normalized_profile(), term()) -> {ok, map()} | {error, term()}.

normalize(ProfileId, Profile)

-spec normalize(term(), term()) -> {ok, normalized_profile()} | {error, term()}.

Return the operator profile without credential material. A literal source is represented only as #{source => literal}.

request_config(Profile, Alias)

-spec request_config(normalized_profile(), term()) -> {ok, map()} | {error, term()}.

resolve_model(Profile, Alias)

-spec resolve_model(normalized_profile(), term()) -> {ok, map()} | {error, term()}.

validate(ProfileId, Profile)

-spec validate(term(), term()) -> ok | {error, term()}.