OpenAI RETIRED TRIVIAL

davinci — Retired

Deprecated
Shutdown
2024-01-04
Status
deprecated
Replacement
davinci-002

Quick fix — copy & paste

Choose your language. The "before" block matches the deprecated call; the "after" block is the drop-in replacement.

Breaks on 2024-01-04
# OpenAI: davinci (deprecated)
model = "davinci"
Use this instead
# Replacement
model = "davinci-002"

This migration was generated automatically from the model rename. If your code does more than swap a model id, double-check request/response shapes against the official OpenAI migration guide.

Error messages

Seeing one of these? You're in the right place.

  • model_not_found: davinci
  • The model `davinci` has been deprecated
  • The model `davinci` does not exist or you do not have access to it

Replacement options

Other OpenAI deprecations

What this means for your code

davinci is a specialized model with provider-specific behavior. Verify the replacement supports the same modalities, parameters, and rate limits as the deprecated model. Read the provider's migration notes carefully — these models often have non-obvious behavioral changes.

davinci was retired by OpenAI on 2024-01-04. API calls now return an error and the model is no longer accessible. New code should use davinci-002; legacy code that still references this model id needs to be updated immediately.

Find every call in your codebase

Before you change anything, locate every place the deprecated model id is referenced. Search source files, environment files, feature flags, and config repos. Use these commands from your project root:

Python projects

grep -rn '"davinci"' --include="*.py" .

JavaScript / TypeScript projects

grep -rn '"davinci"' --include="*.{js,ts,tsx,jsx}" .

Anywhere (configs, scripts, infra)

grep -rn "davinci" .

Migration checklist

Steps in order. Skip any that don't apply, but read the whole list — for other models, the non-obvious steps are usually the ones that break in production.

  1. 1. Read the provider's official migration guide for this model
  2. 2. Update the model id and any model-specific parameters
  3. 3. Audit rate limits and request size caps for the replacement
  4. 4. Re-run your full integration test suite against the new model
  5. 5. Plan a rollback path in case the new model behaves differently in production

Will this migration cost more?

Switching from davinci to davinci-002 could change your costs significantly. Calculate the exact difference for your prompts.

Open the cost calculator →