provider::claude-code::abort
Cancel the in-flight upstream stream for a request_id (router::abort fan-out), stopping billed generation immediately.
- request_idstringrequired
- abortedbooleanrequired
Claude Code (Pro/Max subscription) Messages API provider worker; implements provider::claude-code::stream and provider::claude-code::refresh_models behind llm-router, using OAuth credentials from the auth-credentials vault or ~/.claude/.credentials.json.
iii trigger compose::add worker=provider-claude-code@0.1.18Run in your project with the iii engine running. Exact versions are immutable and digest-pinned.
Cancel the in-flight upstream stream for a request_id (router::abort fan-out), stopping billed generation immediately.
Count prompt tokens for {model, system_prompt?, tools?, messages} via the upstream count_tokens metering endpoint with the Claude Code subscription OAuth token; never runs the model and costs nothing.
Wire agent messages, the same shape `provider::claude-code::stream` accepts. Must be non-empty.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Single-variant role tags: exact-match on deserialize, correct wire string on serialize, and they let `AgentMessage` be an untagged union.
Model id the prompt targets (required by the upstream endpoint); a namespaced router id (`claude-code/<id>`) is mapped to the upstream id.
System prompt counted as the second wire `system` block when present (the first is always the Claude Code identity line).
Function invocation schemas; mapped to the wire `tools` array.
Always `provider`: the count came from the upstream metering API.
Upstream model id the count was computed for.
Prompt tokens the upstream endpoint counted for the assembled request.
Internal: router::ready subscriber that re-declares this provider and refreshes its catalog.
Refresh the Claude Code catalog slice from the upstream models endpoint and reconcile it through the router; returns the model count written.
Stream a Claude Code (subscription) chat completion: resolve credentials, call the upstream Messages API, and relay AssistantMessageEvent frames to writer_ref.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Optional link to the stored original in the session-manager attachment store. Transcript bookkeeping for lazy readers only: the harness clears it before `router::chat`, and no provider mapping reads it. Tolerated here so a block that still carries it deserializes instead of failing the request; omitted on the wire when absent.
Single-variant role tags: exact-match on deserialize, correct wire string on serialize, and they let `AgentMessage` be an untagged union.
Set on speech models only; see [`SpeechModel`].
BCP-47 tags of the languages the model handles; empty when the provider does not say.
What a speech model does. Chat models carry no `speech` block.
Realtime input (stt) or streamed audio output (tts) is available.
Whether `thinking_level: off` can switch the model's reasoning off. `Some(true)`: a native off switch exists. `Some(false)`: the model always reasons, or the provider has no switch. `None`: the provider does not know; consoles show the choice disabled.
Stable conversation identity for provider cache affinity.
Ordered sections behind `system_prompt` (always forwarded alongside the flat string, which equals the sections joined with "\n\n").
Find workers, kits and executables, or jump to a page.