OpenAICodexProvider._request_codex called consume_sse without an
on_provider_event hook and built LLMResponse without usage, so Codex turns
were counted as 0 tokens/cost. Collect the terminal usage event and attach it
to the response, as the openai_compat Responses path already does.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
v1.6.5 already flattens a named Chat Completions tool choice for the
Responses wire (`convert_tool_choice`), but nothing asserted it at the
Codex provider boundary: the existing coverage stops at the converter and
at the openai-compatible/azure bodies.
Harvested from #1251, which re-fixed the same bug against an older base.
The tests are the part worth keeping — they drive `chat` and `chat_stream`
and check the outgoing body, so a future provider rewrite cannot silently
send the nested shape again.
Co-authored-by: ZJPex <3258236335@qq.com>