Models & interaction
Core · Interfaces & runtime guarantees · Back to layer index
| Symbol | Kind | Purpose |
|---|---|---|
AggregatedToolCall | interface | One completed native tool call in provider index order. |
AsIntent | type | Demand-discovery metadata; it has no identity independent of its tool. |
ChatProvider | class | Streaming model provider. Implementations must stop producing when context.signal aborts and should surface transport failures by rejecting the iteration rather than ending it silently. |
createModelTransport | function | Compose a registered selection transport. The capability source may be a static catalog or a function of the stage id; the resulting definitions are captured when prepare runs and are used both to build the instruction and to reject unknown capability ids at finish time. requireStrictArguments is a registration-time assertion: a transport cannot demand strict arguments from an adapter that does not support them. |
createToolCallCollector | function | Create a collector for one response. |
FunctionCallDelta | interface | One streamed fragment of a function call; fragments with the same index must be joined. |
IntentOptions | interface | Demand-facing hints attached to one Tool; no independent identity is created. |
jsonObjectInteraction | constant | |
ModelAssistantToolMessage | type | Assistant turn that may declare tool calls and may carry an empty text body. |
ModelCallRequest | type | One model call request. The input shape selects prompt mode or message mode. |
ModelCallTrace | interface | Accumulated facts of one model call, reported on success and on failure. |
ModelChildOptions | interface | Request-bound isolated runner settings; provider and ancestor budgets cannot be replaced. |
ModelChildPolicy | interface | Request-wide limits, shared by every descendant. They cannot be enlarged by a child. |
ModelFunction | interface | Provider-neutral function definition. Execution and authorization stay with the host. |
ModelImage | interface | Model message primitives shared by every provider adapter. These shapes are deliberately provider-neutral: they describe text, optional images, streamed parts and the options a call may carry. Provider-specific wire formats stay in support/model. Exports: ModelImage, ModelMessage, ModelToolCall, ModelAssistantToolMessage, ModelToolResultMessage, ModelUsage, ModelFunction, FunctionCallDelta, ModelPart, ModelOptions. |
ModelInputMeasurement | interface | Exact prepared-request accounting; token values exist only with an explicit model counter. |
ModelInteractionAdapter | interface | Pluggable implementations all consume the same business registry. No automatic fallback. |
ModelMessage | interface | One provider-neutral turn; images are user visual input and are not part of the text budget. |
ModelOptions | interface | Per-call provider options; Core passes them through and does not normalize provider ranges. |
ModelOutputEvent | type | Delivery sink, awaited in order. Parts are unvalidated proposals, never execution receipts. |
ModelPart | type | One streamed response part: assistant text or a function-call fragment. |
ModelPrepareRequest | interface | Transport selection for prepare; omitted fields take the runner defaults. |
modelProtocolError | function | Throw a model protocol validation error. |
ModelProviderContext | interface | Per-call facts a provider receives besides the messages themselves. |
ModelResponseCollector | interface | Accumulates streamed parts for one call and resolves them into the transport's result. |
ModelRunner | class | Execute registered model stages under one request's budgets and lifetime. Invariants: at most one call is in flight per runner; callCount and journal are local to the runner while totalCallCount includes descendants; every call is charged to the shared budget before I/O and every failure is annotated with its stage before it propagates. No business prompts, domain stages or provider SDKs are built into this runner. |
modelRunnerDefaults | constant | |
ModelRunnerOptions | type | Full runner construction options: provider, transports, sinks and named limits. |
ModelRunnerPorts | interface | Host ports a model runner needs in addition to its provider and transports. |
ModelRunnerSettings | interface | Named settings keep all model limits together; output token reservation stays per call. |
ModelRuntimeConfig | interface | Per-request model runtime limits. |
ModelSelection | type | A model's chosen capability together with its parsed arguments. |
ModelSessionCall | interface | One completed tool call in a session response. |
ModelSessionResult | interface | Complete result of one session response. |
ModelTokenBudget | interface | Provider-injected token accounting. Core never guesses a character-to-token conversion, so token budgets exist only when a host supplies a real counter. |
ModelTool | interface | Common selectable model interface; resolution proposes a value without business execution. |
ModelToolCall | interface | One tool call the assistant declared, in provider order. |
ModelToolCatalog | type | A compiled entity catalog also supports the minimal stage source contract. |
ModelToolRegistration | type | Registration form: input typing is erased, output typing is preserved. |
ModelToolRegistry | class | A request/stage projection is a sealed registry. Hosts filter availability before projection. |
ModelToolResultMessage | type | Tool result turn; toolCallId is required and images/tool declarations are rejected. |
ModelToolSource | interface | Minimal source a stage needs: enumerate tools and resolve one selection. |
ModelTransportDefinition | interface | One registered transport: a wire format prepared for a stage. |
ModelTransportRegistration | interface | Binds an adapter to the tools one transport serves. |
ModelUsage | interface | Provider-reported token counts for one call; used for accounting, never for admission. |
NativeFunctionCall | interface | Request-local native call buffer; never an execution receipt. |
nativeFunctionInteraction | constant | |
PreparedModelCall | interface | Request-bound, single-use transport snapshot. Repeated measurements do not prepare or spend calls. |
PreparedModelInteraction | interface | Adapter output for one stage, before the caller binds capability resolution. |
PreparedModelTransport | interface | Prepared transport handed to the runner, including sampling defaults. |
RegisteredModelTool | type | Frozen snapshot stored by a registry after schema validation. |
RegisteredTransportOutput | type | Result type of a transport selected by id. core:plain-text yields string, a registered id yields its declared result, and an id the runner does not know yields unknown rather than a guessed type. |
retryMultipleModelCalls | function | Retry once when the failure is a rejected multi-call proposal. Only the MODEL_MULTIPLE_CALLS code is retried; every other failure is rethrown unchanged. The caller owns the fallback prompt and the budget it consumes. |
ToolCallCollector | interface | Aggregation entry point for streamed function-call deltas. |
ToolCallFailure | type | Report a protocol violation and stop; callers decide how the failure is classified. |
ToolCondition | type | Activation is independent of participation in demand discovery. |
ToolContext | type | Read-only host data without changing explicit any/unknown erasure into an object constraint. |
ToolProposal | interface | A model proposal, not an authorization or execution receipt. |