Issue with first request after authenticating
Resolved 💬 6 comments Opened Jan 6, 2026 by anton-kalshi Closed Jan 6, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.78.0
What subscription do you have?
Pro
Which model were you using?
Default after installation
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
I login via Google oauth then immediately see when submitting first request
■ unexpected status 422 Unprocessable Entity: Failed to deserialize the JSON body into the target type: tools[5].type: unknown variant custom, expected one of function, web_search,x_search, file_search, code_interpreter, mcp at line 1 column 18941, request id: 9b9dcd147a0fb15f-BOS
What steps can reproduce the bug?
I think probably most helpful is tracking the error server side based on my request id.
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
Are you using any non-default configuration options? For example, are you using a custom model provider? If you have any custom configuration options in your
config.toml, please share.This happened both with or without custom models. My ~/.codex/config.toml is just
When I launch codex it says
If this is something you can repro, please use the
/feedbackcommand to upload your logs and session data, then post the thread ID here.019b94ea-8c8d-73b0-93ce-22129c21ba93- thank youYour requests seem to be hitting
https://api.x.ai/, do you have OPENAI_BASE_URL set by any chance?Yep, thank you. Thats my bad. Let me chase down why that's getting set. Sorry for taking up your time.
echo $OPENAI_BASE_URLhttps://api.x.ai/v1