This project can't work now? #1501
|
Codex error:unexpected status 401 Unauthorized: Incorrect API key provided: sk-clb-N**************************************d5lQ. You can find your API key at https://platform.openai.com/account/api-keys., url: https://api.openai.com/v1/responses, cf-ray: a21a2ed60c25758f-PDX, auth error: 401, auth error code: invalid_api_key |
Replies: 1 comment
|
Your key's fine, it's just going to the wrong place. Look at the URL in the error: Set the provider in model_provider = "codex-lb"
[model_providers.codex-lb]
name = "openai"
base_url = "http://127.0.0.1:2455/backend-api/codex"
wire_api = "responses"
requires_openai_auth = trueIf you already had that, run |
Your key's fine, it's just going to the wrong place. Look at the URL in the error:
https://api.openai.com/v1/responses. That's OpenAI directly, not codex-lb, and OpenAI has no idea what ansk-clb-key is.Set the provider in
~/.codex/config.toml:If you already had that, run
echo $OPENAI_BASE_URLbefore anything else. The env var beats the config file, and that's usually why this keeps happening after a setup that looks correct.