Skip to main content

Module request

Module request 

Source
Expand description

Completion options, chat rendering, tokenization and context policy.

StructsΒ§

PreparedRequest πŸ”’
Tokenization and policy checks finish before the response starts.
Request πŸ”’
SessionInput πŸ”’
Resolved session input; the original HTTP JSON remains unchanged.

FunctionsΒ§

context_tokens πŸ”’
legacy_function_call πŸ”’
parse_legacy_function_controls πŸ”’
Tolerate legacy OpenAI function controls the Qwen4 frontend ignores.
parse_parallel_tool_calls πŸ”’
parse_request πŸ”’
parse_tool_choice πŸ”’
Resolve tool_choice; false suppresses the tools block entirely.
parse_tools πŸ”’
Shape a request’s tools for the checkpoint template; reject types the Qwen4 frontend cannot honor.
render_prompt πŸ”’