Skip to main content

encode_request_with_echo

Function encode_request_with_echo 

Source
pub fn encode_request_with_echo(
    req: &CompletionRequest,
    echo_mode: ThinkingEcho,
) -> CreateChatCompletionRequest
Expand description

Same shape as encode_request, but explicitly accepts a thinking-echo policy.

echo_mode is read by the provider layer from defect_core::llm::Capabilities and passed in: when Required, the MessageContent::Thinking text on the assistant message is written to the non-standard reasoning_content field on the wire; when Forbidden (including unconfigured), it is never written.