Repository navigation
Description
Problem
A client can own the user's bring-your-own-key (BYOK) model configuration: endpoints, wire formats, curated model lists, and API keys. AHP has no way to hand that to an agent host:
- No way to register a source. Models and models: add model sources to agent catalogs #543's model sources are host-declared. A client can't add one.
- No credential path.
authenticateonly accepts tokens for resources the host advertised, so the client can't give the host a source's key. - No status. Nothing reports whether a source loaded, needs a key, or failed.
For example, a client such as VS Code lets users configure their own OpenAI, Anthropic, Azure, Gemini, OpenRouter, or custom endpoints. When the agent host runs elsewhere (SSH, WSL, a tunnel, or a long-lived remote service), those models can't be offered. The host may also run work no client is watching, such as long-running sessions and automations, so sources need to outlive one client's connection.
Proposed direction
A host-wide model source registry, kept thin. The agent behind the host reads definitions, discovers models, and runs inference. AHP carries only:
- Registration:
RootState.modelSourceRegistrations, added and removed with client-dispatchable root actions. An agent advertises the definition formats it reads. - Status: the host reports
starting,ready,authRequired, orerrorfor each registration. - Credential:
authenticatewith amodelSourcetarget. The key is held in memory only. - Selection: ready sources join the agent's catalog from models: add model sources to agent catalogs #543, and their models are selected by
idin any session or automation.
Like MCP servers, registrations aren't owned by a client: any connected client can use, change, or remove one. The contributing client chooses only whether a source stays after it disconnects, which defaults to no.
The full proposal is in #622. An earlier revision used session-scoped plugin customizations. It moved to a registry because BYOK configuration belongs to the user rather than a session, and automations need sources that outlive one.
Related
- models: add model sources to agent catalogs #543: model sources and the agent catalog this builds on.
- docs: host-owned authentication proposal #404: host-owned authentication, needed for keys that survive a host restart.
- auth: add client account identity and revocation notification #459: account identity and revocation.
Activity
[-]Proposal: Let clients contribute BYOK model sources and credentials to a session[/-][+]Proposal: Model provider customizations, so clients can contribute BYOK providers to a session[/+]docs: align the proposal on model sources
[-]Proposal: Model provider customizations, so clients can contribute BYOK providers to a session[/-][+]Proposal: Model source customizations, so clients can contribute BYOK model sources to a session[/+]docs: reserve model IDs a model source has published
docs: handle several clients and clients that leave
docs: model source registry proposal
[-]Proposal: Model source customizations, so clients can contribute BYOK model sources to a session[/-][+]Proposal: Model source registry, so clients can register BYOK model sources with an agent host[/+]models: add model source registry
docs: fix registry removal checks and stale credentials
docs: tighten registry status, revocation, and model ID rules
models: add credentialNonce and tighten registry rules
docs: follow MCP for registry ownership and status
docs: remove a repeated sentence in the registry proposal
models: follow MCP for registry ownership and status
docs: keep registered models listed across re-auth
models: keep registered models listed across re-auth
docs: fence stale agent results and keep the credential resource
models: move the credential resource onto the registration
models: name the registration's display field displayName
docs: contributors, credential identity, and turn rules for the registry
docs: compare registry definition numbers by value
models: contributors, credential identity, and turn rules for the reg…
docs: address registry review on naming, client IDs, and definitions
models: rename to ModelSource and keep definitions out of state