Codex + Tencent LKEAP 401: It Was Not the Key
Dev.to AI
•
Generative AI
I ran into a failure that looked like an authentication problem at first: unexpected status 401 Unauthorized The setup was Codex against Tencent Cloud LKEAP Token Plan, using an OpenAI-compatible Chat Completions endpoint. The important clue was not the 401. It was the final URL: That URL shape is already wrong. The config that caused it The provider entry looked roughly like this: [model_providers.custom] name = "custom" wire_api = "responses" requires_openai_auth = true base_url = " The mistake is subtle.