2bfe9fabbc
The chatgpt.com/backend-api/codex backend 400s on every tool_choice shape for the hosted image_generation tool — it looks up tool_choice as a function name and never recognizes hosted-tool entries. Removing the field from _build_responses_payload() lets the host model decide; the instructions field nudges it toward the tool. Salvaged from PR #19979 (originally targeted the old client.responses.stream call, which no longer exists on upstream/main; the live request now flows through _build_responses_payload + httpx in _collect_image_b64).