Error occurred when connecting to the OpenRouter model
What version of Codex is running?
codex-cli 0.65.0
What subscription do you have?
openrouter api key
Which model were you using?
openai/gpt-5.1-codex-max
What platform is your computer?
_No response_
What issue are you seeing?
my ~/.codex/config.toml is bellow:
model_provider="openrouter"
model="openai/gpt-5.1-codex-max"
[model_providers.openrouter]
name="openrouter"
base_url="https://openrouter.ai/api/v1"
env_key="OPENROUTER_API_KEY"
What does the following error message mean?
{"error":{"message":"Provider returned error","code":400,"metadata":
{"raw":"{\n \"error\": {\n \"message\": \"Invalid 'input[4].name':
empty string. Expected a string with minimum length 1, but got an
empty string instead.\",\n \"type\": \"invalid_request_error\",
\n \"param\": \"input[4].name\",\n \"code\":
\"empty_string\"\n }\n}","provider_name":"OpenAI"}},"user_id":"user_35x92YP6MlA
GxK4s537Io3nKbei"}
What steps can reproduce the bug?
Add the following lines to ~/.codex/config.toml:
model_provider = "openrouter"
model = "openai/gpt-5.1-codex-max"
[model_providers.openrouter]
name="openrouter"
base_url="https://openrouter.ai/api/v1"
env_key="OPENROUTER_API_KEY"
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗