router::abort
Abort an in-flight router::chat/complete by request_id; reports whether a live request was cancelled.
- request_idstringrequired
- abortedbooleanrequired
One front door + provider protocol in front of every LLM provider.
exact versions are immutable; binary and bundle artifacts are digest-pinned.
Abort an in-flight router::chat/complete by request_id; reports whether a live request was cancelled.
Stream a chat completion: route {model, provider?} to a provider, relay assistant frames to writer_ref, and return the terminal response.
The caller's write channel (direction "write"); frames are relayed here.
Non-streaming convenience over router::chat: run the turn on an internal channel and return the final assistant message + usage.
Batch text embeddings through a provider's provider::<id>::embed surface. Names a provider or discovers the first embed-capable one from the live registry; one vector per input, order preserved.
Texts to embed, one vector returned per input, order preserved.
Embedding model id; the provider's default when omitted.
Provider id (e.g. `openai`); the first embed-capable provider in the live registry when omitted.
One embedding per input, in input order.
Resolve the effective model output budget using the same precedence as router::chat.
Model id to budget.
Optional caller-requested output budget. When absent, the same provider and router defaults used by `router::chat` apply.
Provider id that owns the model. Empty resolves an unambiguous model id.
The capability record (README § Model descriptor).
Read one catalog model by {provider, id}; null when the model is not registered.
Model id to look up.
Provider id that owns the model.
The capability record (README § Model descriptor).
List catalog models, optionally filtered by provider and/or a capability flag.
Keep only models that support this capability flag (optional).
Filter to a single provider id (optional).
Replace a provider's catalog slice — the only catalog write path (token-gated).
The full replacement set of models for this provider.
Provider whose catalog slice is being replaced.
Registration token gating the write (optional).
Check whether a model supports a capability flag (fails open for unknown models).
Capability flag to check (e.g. `structured_output`, `vision`).
Model id to check.
Provider id that owns the model.
Internal: reactively reload the in-memory configuration snapshot and fan out provider model discovery after configuration changes.
Configuration id that changed (advisory).
List registered providers with their configured/available status.
Provider self-declaration at attach time (token-gated upsert); composes the configuration entry schema and reconciles static models.
Registration token proving ownership on re-register (omit on first declare).
Resolve a provider's effective credential + api_url + max_tokens (token-gated).
Provider id to resolve credentials/config for.
Registration token gating the resolve (optional).
OAuth write-back: store a provider credential in the configuration entry under the entry write lock (token-gated).
The credential object to store (provider-specific shape).
Provider id whose credential slice is being written.
Registration token gating the write (optional).
Read-only routing preview: resolve {model, provider?} to the chosen provider + ordered candidates without streaming.
Model id to route.
Pin an explicit provider, bypassing heuristics (optional).
Effective identity prompt for {provider?} (default_provider when omitted): operator override when set, else provider-declared; null when absent.
A provider reconciled its catalog slice. Payload: { provider, count }.
The provider registry changed (declare / availability flip). Payload: { provider, op }.
The router finished booting; providers bind here and re-declare after a restart.