Skip to content

Error "Codex CLI error: Invalid request - The model: code-davinci-002 does not exist" #129

@ChadLevy

Description

@ChadLevy

Edit 3: looks like OpenAI shut down their Codex API (https://news.ycombinator.com/item?id=35242069). Apparently there was an e-mail but I never received one.

Also apparently the API is available through Azure (https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/work-with-code). Perhaps an alternative would be to use Azure?

Original:


I'm getting this error on each attempt to use the codex:

Codex CLI error: Invalid request - The model: `code-davinci-002` does not exist

I haven't dug into the code at all but I noticed all of the OpenAI beta URLs have been removed. In the install instructions most redirect but the engines listing URL returns 404 (https://beta.openai.com/docs/engines/codex-series-private-beta). The new URL is https://platform.openai.com/docs/models/codex. It still shows it's in private beta on the new URL.

Edit:

When I query a list of OpenAI engines available to my account, code-davinci-002 is not listed. So I reran the install script and select a different engine available to me (gpt-3.5-turbo). After restarting PowerShell I'm still seeing the same error. I confirmed that the openaiapirc file was correctly updated with the new engine and verified that all instances of PowerShell had been shut down but am still seeing the same error.

Edit 2:
I also updated the current_context.config file with the updated engine. Now the error I receive is

Codex CLI error: Invalid request - This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions