ZodError- code 400
Open 💬 9 comments Opened Dec 8, 2025 by aohan237
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.65.0
What subscription do you have?
none
Which model were you using?
_No response_
What platform is your computer?
_No response_
What issue are you seeing?
{"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_2tzAauPJwyaDXmN7U69brwMHmBo"}
this should be addressed, for you ,maybe fast is not the best option, but quality does
What steps can reproduce the bug?
just use openrouter as your provider.
What is the expected behavior?
_No response_
Additional information
_No response_
9 Comments
Can you provide more details about your config settings?
Are you using the "chat" wire_api? We recommend using the newer "responses" wire_api. You can specify this through
wire_api = "responses".We have fixed a few recent regressions with the "chat" wire_api in the most recent prerelease (
0.66.0-alpha.10) if you want to try that out.yes,using the "chat" wire_api
openrouter only support the chat completion api.
for now, i use version 0.59.0
i will try it out
0.66.0-alpha.10 is fine.
@etraut-openai after a upgrade codex cli
use OpenAI Codex (v0.73.0)
openrouter wire response api
openrouter wire chat api
@etraut-openai no one cares about this? it should be a common issue?
for now , i can use google' antigravity
@aohan237, we've announced that we're discontinuing support for the old "chat" wire API at the end of this month. Please update to the "responses" API.
Just read my new error log pls
Wire response api
Still report Zod error
I've also encountered the same issue. Currently using version 0.89.0, with openrouter as a proxy, this error occurs regardless of which wire_api is used, which is strange. Has anyone else encountered this issue? Or is there a related solution?
my config.toml:
model_provider = "openrouter"
model = "gpt-5.2-codex"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.openrouter]
name = "openrouter"
base_url = "https://openrouter.ai/api/v1"
wire_api = "responses"
requires_openai_auth = true
Do not use GPT-5.2-related models,it works fine for me on GPT-5. @aohan237 @smile7up @etraut-openai
GPT-5:
GPT-5.2:
GPT-5.2-codex:
<img width="1832" height="1182" alt="Image" src="https://github.com/user-attachments/assets/9318336b-2ecb-4f13-9e79-3776fe7dfd48" />