provider::opencode_go::abort
Cancel the in-flight upstream stream for a request_id (router::abort fan-out), stopping billed generation immediately.
- request_idstringrequired
- abortedbooleanrequired
OpenCode Go Chat Completions provider worker; implements provider::opencode_go::stream and provider::opencode_go::refresh_models behind llm-router.
exact versions are immutable; binary and bundle artifacts are 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} locally with the tiktoken tokenizers; never runs the model and costs nothing.
Wire agent messages, the same shape `provider::opencode_go::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; selects the tokenizer (o200k_base for modern chat families and anything unknown-modern).
System prompt counted as its own wire message when present.
Function invocation schemas; each serialized schema counts toward the total.
Always `tiktoken`: a local tokenizer produced the estimate.
Estimated prompt tokens for the assembled request.
Internal: router::ready subscriber that re-declares this provider and refreshes its catalog.
Refresh the OpenCode Go catalog slice from GET /v1/models and reconcile it through the router; returns the model count written.
Stream an OpenCode Go response: resolve credentials, call the configured Chat Completions endpoint, 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.
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").