■ {"error":{"code":"invalid_prompt","message":"Invalid Responses API request"},"metadata":{"raw":"[\n {\n \"code\": \"invalid_union\",\n \"errors\":[\n [\n {\n \"code\": \"invalid_union\",\n \"errors\": [],\n \"note\": \"No matching discriminator\",\n\"discriminator\": \"type\",\n \"path\": [\n \"type\"\n ],\n \"message\": \"Invalid input\"\n }\n ],\n[\n {\n \"code\": \"invalid_value\",\n \"values\": [\n \"openrouter:datetime\"\n ],\n \"path\": [\n\"type\"\n ],\n \"message\": \"Invalid input: expected \\\"openrouter:datetime\\\"\"\n }\n ],\n [\n {\n\"code\": \"invalid_value\",\n \"values\": [\n \"openrouter:image_generation\"\n ],\n \"path\": [\n\"type\"\n ],\n \"message\": \"Invalid input: expected \\\"openrouter:image_generation\\\"\"\n }\n ],\n [\n {\n\"code\": \"invalid_value\",\n \"values\": [\n \"openrouter:experimental__search_models\"\n ],\n \"path\": [\n\"type\"\n ],\n \"message\": \"Invalid input: expected \\\"openrouter:experimental__search_models\\\"\"\n }\n ],\n [\n{\n \"code\": \"invalid_value\",\n \"values\": [\n \"openrouter:web_search\"\n ],\n \"path\": [\n\"type\"\n ],\n \"message\": \"Invalid input: expected \\\"openrouter:web_search\\\"\"\n }\n ]\n ],\n \"path\": [\n\"tools\",\n 15\n ],\n \"message\": \"Invalid input\"\n }\n]"}}
When I downgrade back to 0.120.0 it works as expected.
It should respond to the message without hitting any errors.
What version of Codex CLI is running?
0.121.0
What subscription do you have?
pro
Which model were you using?
gpt-5.3-codex
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
ghostty
What issue are you seeing?
I did the official suggestions: https://openrouter.ai/docs/guides/coding-agents/codex-cli
I can start and when I issue any message at the cli I get:
When I downgrade back to 0.120.0 it works as expected.
What steps can reproduce the bug?
Install 0.121.0, set up a ~/.codex/config.toml matching: https://openrouter.ai/docs/guides/coding-agents/codex-cli and then start with your openrouter API key.
What is the expected behavior?
It should respond to the message without hitting any errors.
Additional information
No response