[Ubuntu 26.04] Codex CLI 0.149.0 unexpected status 401 Unauthorized: missing api key

Resolved 💬 3 comments Opened Aug 21, 2026 by rrmmxxuu Closed Aug 21, 2026

What version of Codex CLI is running?

0.149.0

What subscription do you have?

API key

Which model were you using?

_No response_

What platform is your computer?

Linux 7.0.0-30-generic x86_64 unknown

What terminal emulator and version are you using (if applicable)?

_No response_

Codex doctor report

What issue are you seeing?

After updating to 0.149.0, did not change anything to auth.json, it showed unexpected status 401 Unauthorized: missing api key, url: http://127.0.0.1:48760/v1/responses. I am using Codex Manager for account managment. Everything worked fine beofore 0.149.0. After I downgraded to 0.148.0, the problem was gone immediately.

What steps can reproduce the bug?

Use openai api key to login in 0.149.0

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

3 Comments

Hero2633 · 7 days ago

在config.toml文件中的[model_providers.ID] 字段下面添加:
requires_openai_auth = true可以解决

Hero2633 · 7 days ago

<img width="1241" height="635" alt="Image" src="https://github.com/user-attachments/assets/66c90109-b84c-4421-a236-113d129463f8" />

rrmmxxuu · 7 days ago
<img alt="Image" width="1241" height="635" src="https://private-user-images.githubusercontent.com/97746140/639279596-66c90109-b84c-4421-a236-113d129463f8.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODcyOTA4MTMsIm5iZiI6MTc4NzI5MDUxMywicGF0aCI6Ii85Nzc0NjE0MC82MzkyNzk1OTYtNjZjOTAxMDktYjg0Yy00NDIxLWEyMzYtMTEzZDEyOTQ2M2Y4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwODIxVDA1MzUxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZkMjIyYTZlOTdhODFlZWMyMTU5NWUzNmZmMzI1NGNjYmQ3NzAzYWI0ZjU1NTgwMDRmZWJlMzQ5MTQ4NDNhNWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.gC1nDWxjO5XyeqkLM1-nQeN24NDbDdD49Cwyud_4lk8">

感谢!!!!