The AsyncOpenAI client always appends /chat/completions to base_url.
Open WebUI's endpoint is at /api/chat/completions, so for openwebui
host_type the base_url must include the /api prefix — same logic as
_local() in llm_client.py.
Also strip non-standard metadata fields (backend, host, etc.) from
session_messages before passing them to the API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>