High severity beginner · Fix: 2-5 min

OpenAIError

openai.OpenAIError (base model not supported for fine-tuning)

What this error means
This error occurs when attempting to fine-tune an OpenAI base model that does not support fine-tuning.

Stack trace

traceback
openai.OpenAIError: The base model 'gpt-4o' is not supported for fine-tuning. Please select a supported base model such as 'gpt-3.5-turbo' or 'gpt-4o-mini'.
QUICK FIX
Change the base model parameter to a supported fine-tuning model like 'gpt-3.5-turbo' or 'gpt-4o-mini' in your fine-tuning request.

Why it happens

OpenAI restricts fine-tuning to specific base models that are designed to support it. Attempting to fine-tune a base model that is not enabled for fine-tuning triggers this error. This prevents unsupported or incompatible models from being fine-tuned, ensuring stability and performance.

Detection

Check the base model parameter before starting fine-tuning. Validate against OpenAI's list of supported fine-tuning base models to catch unsupported models early.

Causes & fixes

1

Using a base model that is not enabled for fine-tuning, such as 'gpt-4o' or other unsupported variants.

✓ Fix

Switch to a supported fine-tuning base model like 'gpt-3.5-turbo' or 'gpt-4o-mini' as documented by OpenAI.

2

Passing an incorrect or misspelled model name that defaults to an unsupported model.

✓ Fix

Verify the exact model name string matches a supported fine-tuning base model and correct any typos.

3

Using outdated OpenAI SDK or API version that does not recognize newer supported fine-tuning models.

✓ Fix

Upgrade the OpenAI SDK to the latest version to ensure compatibility with current fine-tuning base models.

Code: broken vs fixed

Broken - triggers the error
python
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ['OPENAI_API_KEY'])

response = client.fine_tunes.create(
    training_file='file-abc123',
    model='gpt-4o',  # This model is not supported for fine-tuning
)
print(response)
Fixed - works correctly
python
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ['OPENAI_API_KEY'])

response = client.fine_tunes.create(
    training_file='file-abc123',
    model='gpt-4o-mini',  # Changed to a supported fine-tuning base model
)
print(response)  # This will succeed if the model supports fine-tuning
Changed the base model from 'gpt-4o' to 'gpt-4o-mini' which is supported for fine-tuning, resolving the error.

Workaround

If you cannot switch models immediately, catch the OpenAIError exception and notify users or fallback to a supported model programmatically.

Prevention

Always consult OpenAI's official fine-tuning documentation to use only supported base models and keep your SDK updated to avoid compatibility issues.

Python 3.9+ · openai >=1.0.0 · tested on 1.5.x
Verified 2026-04
Verify ↗

Community Notes

No notes yetBe the first to share a version-specific fix or tip.