Skip to content

refactor: remove OpenAI deprecated models#4879

Open
ddanielcruzz wants to merge 1 commit intomainfrom
daniel/remove-deprecated-openai-models
Open

refactor: remove OpenAI deprecated models#4879
ddanielcruzz wants to merge 1 commit intomainfrom
daniel/remove-deprecated-openai-models

Conversation

@ddanielcruzz
Copy link
Copy Markdown
Contributor

@ddanielcruzz ddanielcruzz commented Mar 27, 2026

Deprecated list

Doesn't exist

  • gpt-5.1-mini

Pre-Review Checklist

  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • No breaking changes in accordance with the version policy.
  • Linting and type checking pass per make format and make typecheck.
  • PR title is fit for the release changelog.

Pre-Merge Checklist

  • New tests for any fix or new behavior, maintaining 100% coverage.
  • Updated documentation for new features and behaviors, including docstrings for API docs.

@github-actions github-actions bot added size: S Small PR (≤100 weighted lines) chore labels Mar 27, 2026
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Existing tests and profile code still reference removed o1-mini model

Multiple test files (tests/models/test_openai.py:858-882, tests/profiles/test_openai.py:34, tests/models/test_model.py:278) and profile code (pydantic_ai_slim/pydantic_ai/profiles/openai.py:167-169) still reference o1-mini. This is not a bug because KnownModelName is a type-level hint for autocomplete/IDE support — users can still pass arbitrary model name strings to OpenAIChatModel. The profile special-casing for o1-mini's system prompt role remains useful for anyone passing the string directly. However, the test at tests/profiles/test_openai.py:34 and tests/models/test_model.py:278 might warrant review to determine if they should be updated or removed for consistency with the deprecation intent.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

'gateway/openai:gpt-5',
'gateway/openai:o1-2024-12-17',
'gateway/openai:o1-mini-2024-09-12',
'gateway/openai:o1-mini',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Inconsistent removal: gateway/openai:o1-mini kept while openai:o1-mini removed

openai:o1-mini was removed as a deprecated model, but its gateway/openai:o1-mini counterpart at line 338 was not. Every other model removed in this PR was consistently removed from both the openai: and gateway/openai: sections (e.g., o1-preview, o1-mini-2024-09-12, o1-preview-2024-09-12, chatgpt-4o-latest, etc.), making this an incomplete transformation.

Suggested change
'gateway/openai:o1-mini',
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions
Copy link
Copy Markdown
Contributor

Docs Preview

commit: 0487b12
Preview URL: https://29150ec0-pydantic-ai-previews.pydantic.workers.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore size: S Small PR (≤100 weighted lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant