Repository navigation
Closed as not planned
Labels
bugSomething isn't workingcustom-modelIssues related to custom model providers (including local models)
Description
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:
■ {"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.
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingcustom-modelIssues related to custom model providers (including local models)
Activity
etraut-openai commentedon Apr 16, 2026
Please report the problem to the openrouter maintainers.