Skip to main content

Module handler

Module handler 

Source
Expand description

The SSE-streaming chat handler (chat_handler).

Why: the OpenRouter/Ollama tool-calling loop is by far the largest single concern in the chat HTTP surface; isolating it keeps the other handlers readable (split out of the former monolithic chat.rs, issue #607). What: the chat_handler axum handler, moved verbatim. Tool-loop building blocks (all_tools, execute_tool, MAX_TOOL_ROUNDS, ChatBody) are pulled in from the sibling tools submodule. Test: behaviour exercised end-to-end via the chat SSE integration paths.