Skip to content

Conversation

LIHUA919
Copy link

Resolves 'messages in request are illegal' 400 Bad Request error by changing the default OpenAI provider configuration to use the stable Chat Completions API instead of the experimental Responses API.

  • Default OpenAI provider now uses WireApi::Chat instead of WireApi::Responses
  • Maintains backward compatibility for explicit Responses API usage
  • All HTTP client and message format tests pass (29/29 tests)

Fixes #4270

External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the dedicated "Contributing" markdown file or your PR may be closed:
https://github.com/openai/codex/blob/main/docs/contributing.md

If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.

Resolves 'messages in request are illegal' 400 Bad Request error by
changing the default OpenAI provider configuration to use the stable
Chat Completions API instead of the experimental Responses API.

- Default OpenAI provider now uses WireApi::Chat instead of WireApi::Responses
- Maintains backward compatibility for explicit Responses API usage
- All HTTP client and message format tests pass (29/29 tests)

Fixes openai#4270
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unexpected status 400 Bad Request
1 participant