pub struct StreamRequest {
pub system_prompt: String,
pub messages: Vec<AgentMessage>,
pub tools: Vec<ToolSchema>,
pub temperature: Option<f32>,
pub max_output_tokens: Option<u32>,
pub reasoning: ReasoningEffort,
pub provider_extras: Value,
pub force_tool_call: bool,
}Expand description
Inputs for one LLM call.
Fields§
§system_prompt: StringSystem prompt prepended by the provider.
messages: Vec<AgentMessage>Conversation transcript. The transport converts to provider-native format before sending.
tools: Vec<ToolSchema>Tool schemas the provider should expose to the model.
temperature: Option<f32>Optional sampling controls. Implementations may ignore.
max_output_tokens: Option<u32>§reasoning: ReasoningEffortReasoning-effort knob shipped to the provider. Typed contract;
each StreamFn impl owns the wire mapping (OpenRouter’s
reasoning: {effort} block, Fireworks’ top-level
reasoning_effort, etc.). Single source of truth — replaces the
stringly-typed provider_config["reasoning_effort"] knob and the
hardcoded per-bridge defaults.
provider_extras: ValueProvider-specific extras (e.g., response format, custom routing
pins). Open-by-design leaf — typed at the leaf is overkill given
provider fragmentation. Reasoning effort is NOT carried here; use
the typed reasoning field above.
force_tool_call: boolWhen true, the wire request sets tool_choice: "required" —
the provider MUST emit a tool call (no plain-text or empty
completion). Coercive narrowing for the framing turn: paired
with OpeningGate’s compact catalog, this forces the model to
pick a message or planning tool instead of emitting
reasoning-only text and skipping the structured turn.
Default false leaves tool choice to the provider for every
other turn.
Trait Implementations§
Source§impl Clone for StreamRequest
impl Clone for StreamRequest
Source§fn clone(&self) -> StreamRequest
fn clone(&self) -> StreamRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more