Non-reasoning OAI model API calls have an extraneous reasoning_effort parameter
Resolved 💬 2 comments Opened May 6, 2025 by arnaudstiegler Closed Aug 7, 2025
What version of Codex is running?
_No response_
Which model were you using?
gpt-4.1
What platform is your computer?
_No response_
What steps can reproduce the bug?
Running:
{ echo '{ "id": "config-session-1", "op": { "type": "configure_session", "model": "gpt-4.1", "api_key": null, "approval_policy": "never", "sandbox_policy": {"type":"read_only", "permissions": ["disk-full-write-access", "disk-full-read-access"]}, "disable_response_storage": false, "cwd": "/Users/codex/codex-rs" } }'; echo '{ "id": "user-input-1", "op": { "type": "user_input", "items": [{ "id": "item-1", "type": "text", "text": "run a test in the codebase, can be any test, it does not matter. Note that this is a TS/rust repo" }] } }'; } | ./target/release/codex proto
Returns:
2025-05-06T21:32:40.991710Z INFO codex_core::codex: Configuring session model="gpt-4.1"
{"id":"config-session-1","msg":{"type":"session_configured","model":"gpt-4.1"}}
{"id":"user-input-1","msg":{"type":"task_started"}}
2025-05-06T21:32:41.144349Z WARN codex_core::codex: stream disconnected - retrying turn (1/10 in 183ms)...
{"id":"user-input-1","msg":{"type":"background_event","message":"stream error: unexpected status 400 Bad Request: {\n \"error\": {\n \"message\": \"Unsupported parameter: 'reasoning.effort' is not supported with this model.\",\n \"type\": \"invalid_request_error\",\n \"param\": \"reasoning.effort\",\n \"code\": \"unsupported_parameter\"\n }\n}; retrying 1/10 in 183ms…"}}
What is the expected behavior?
Any non-reasoning model (i.e not starting with "o") should not pass a reasoning_effort parameter
What do you see instead?
_No response_
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗