adk_model_http_transport behaviour (erlang_adk v0.8.0)
View SourceInjected bounded HTTP transport contract for model providers.
Provider adapters pass credentials only in the private request value. A transport must neither log nor retain them, must enforce the supplied scheme/host policy after DNS resolution, must not follow redirects, and must stop reading once max_response_bytes is reached.
Summary
Types
-type handle() :: term().
-type request() :: #{method := binary(), url := binary(), headers := [{binary(), binary()}], body := binary(), timeout_ms := pos_integer(), max_response_bytes := pos_integer(), follow_redirects := false, allowed_schemes := [binary()], allowed_hosts := [binary()], allow_private_hosts := boolean()}.