Skip to content
Discussion options

You must be logged in to vote

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 an sk-clb- key is.

Set the provider in ~/.codex/config.toml:

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 = true

If you already had that, run echo $OPENAI_BASE_URL before anything else. The env var beats the config file, and that's usually why this keeps happening after a setup that looks correct.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Soju06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants