Proxy #
The proxy extension exposes a Chat Completions interface over saved provider profiles. It projects the conversation in each request to the selected upstream. See authentication for accounts and models for catalog lookup.
Endpoint #
The proxy extension
admits GET /extensions/proxy/v1/models and
POST /extensions/proxy/v1/chat/completions. The default admission requires the
daemon token. If ALBEDO_PROXY_ALLOW_ANONYMOUS is exactly 1, these routes use
local access instead, as defined by
allow_anonymous.
The models response names entries as <profile>/<model>. A profile with a
custom endpoint lists its saved model. Other profiles use the provider catalog
when available and otherwise list the saved model. The response can include a
nonstandard errors field for unusable profiles.
Translation #
chat.from_fields splits
the requested model at the first slash. With no model suffix, the proxy uses the
profile's saved model. The parser accepts the fields listed by request_fields,
logs unknown fields at debug level, and validates options, tool count, and token
limit. It rejects invalid input with a 400 response.
The extension resolves the profile and upstream, projects the supplied history,
and calls the upstream stream interface. Non-streaming upstream errors
return 502. Streaming replies use server-sent events and finish with [DONE].
An upstream error is emitted as an error event. The client supplies the
conversation on each request.
State #
chat.carry carries
provider-specific turn state for replay. The extension replays carried turns
verbatim only to the profile that produced them.
albedo_proxy packs
state into URL-safe compressed text and bounds decompression to 4 MiB. Invalid
or altered packed state takes the portable replay path.