Skip to main content

Module request

Module request 

Source
Expand description

Provider-neutral outbound model-request boundary.

The request DTOs in this module are consumed by the TUI transport today and are intentionally free of terminal, HTTP, or provider-client state. Keeping the logical request in codewhale-core lets a headless session prepare the same serializable value before the existing TUI client applies provider-specific wire shaping.

Structs§

CacheControl
Cache control metadata for tool definitions and blocks.
ImageUrlContent
OpenAI-compatible image URL payload inside a multimodal message.
Message
A chat message with role and content blocks.
MessageRequest
Request payload handed to the model-client preparation seam.
OpaqueReasoningState
Provider-owned reasoning continuity that is safe to replay only on the exact originating API and model. The encrypted payload is deliberately separate from readable ContentBlock::Thinking text.
PrimaryTurnRequest
Inputs that distinguish a primary agent-turn request.
SystemBlock
A structured system prompt block.
Tool
Tool definition exposed to the model.
ToolCaller
Metadata describing who invoked a tool call.

Enums§

ContentBlock
A single content block inside a message.
SystemPrompt
System prompt representation (plain text or structured blocks).

Constants§

INTERRUPTED_ASSISTANT_CONTEXT_PREFIX
Prefix attached to interrupted assistant output when it is replayed as context.
INTERRUPTED_ASSISTANT_ROLE
Internal role used for assistant text that was visible before a turn was interrupted.

Functions§

prepare_primary_turn_request
Prepare the provider-neutral request for a primary agent turn.