Skip to content

fix(model_prices): give the bare gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini aliases their 2027-01-14 shutdown date - #46732

Closed
mateo-berri wants to merge 1 commit into
mainfrom
litellm_openai_gpt4_alias_deprecation_dates
Closed

mateo-berri wants to merge 1 commit into
mainfrom
litellm_openai_gpt4_alias_deprecation_dates

Conversation

@mateo-berri

@mateo-berri mateo-berri commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Bare gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini had no shutdown date
  • So /model/deprecations and the Slack deprecation alert skipped those deployments

How it solves it:

User Flow

Before: a proxy admin serving openai/gpt-4o sees no warning that it shuts down on 2027-01-14

  1. The admin configures model: openai/gpt-4o (or gpt-4o-mini, gpt-4.1, gpt-4.1-mini)
  2. They call GET https://litellm-domain/model/deprecations
  3. The response comes back with empty deprecated, imminent and upcoming lists

After: the same deployments show up with their shutdown date

  1. The admin configures model: openai/gpt-4o (or gpt-4o-mini, gpt-4.1, gpt-4.1-mini)
  2. They call GET https://litellm-domain/model/deprecations
  3. All four come back under upcoming with "deprecation_date":"2027-01-14", moving to imminent 30 days out, which is when the Slack alert fires

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Shared setup is a live proxy with a real OpenAI key, the local cost map, and these four deployments

model_list:
  - model_name: gpt-4o
    litellm_params: {model: openai/gpt-4o}
  - model_name: gpt-4o-mini
    litellm_params: {model: openai/gpt-4o-mini}
  - model_name: gpt-4.1
    litellm_params: {model: openai/gpt-4.1}
  - model_name: gpt-4.1-mini
    litellm_params: {model: openai/gpt-4.1-mini}

Before (e344dbd)

  1. curl -s localhost:32791/model/deprecations -H "Authorization: Bearer sk-1234" returns {"deprecated":[],"imminent":[],"upcoming":[],"warn_within_days":30,...}
  2. curl -s "localhost:32791/model/deprecations?warn_within_days=100" -H "Authorization: Bearer sk-1234" returns the same three empty lists

After (ecc311d)

  1. curl -s localhost:58915/model/deprecations -H "Authorization: Bearer sk-1234" returns all four under upcoming, e.g. {"model_name":"gpt-4o","litellm_model":"gpt-4o","deprecation_date":"2027-01-14","days_until_deprecation":91,"status":"upcoming","litellm_provider":"openai"}
  2. curl -s "localhost:58915/model/deprecations?warn_within_days=100" -H "Authorization: Bearer sk-1234" returns the same four under imminent
  3. curl -s localhost:58915/v1/chat/completions -H "Authorization: Bearer sk-1234" -H "Content-Type: application/json" -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Reply with OK."}],"max_tokens":5}' returns HTTP 200 with "content":"OK.", so the model still serves

Link to Devin session: https://app.devin.ai/sessions/1650174c3a6246749647e47d1e1baeb2
Open in Devin Desktop: https://app.devin.ai/desktop/session/1650174c3a6246749647e47d1e1baeb2?variant=devin
Requested by: @mateo-berri


Note

Low Risk
Metadata-only updates to the model catalog JSON; no runtime logic or API behavior beyond deprecation reporting.

Overview
Adds deprecation_date": "2027-01-14" to the bare OpenAI aliases gpt-4o, gpt-4o-mini, gpt-4.1, and gpt-4.1-mini in both model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json.

Dated variants in the same maps already carried shutdown metadata; these unpinned names did not, so /model/deprecations and Slack deprecation alerts ignored deployments configured with the short model ids. The new dates align with OpenAI’s published deprecation schedule for those snapshots.

Reviewed by Cursor Bugbot for commit ecc311d. Bugbot is set up for automated code reviews on this repo. Configure here.

…-4.1-mini aliases their 2027-01-14 shutdown date

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@greptile-apps

greptile-apps Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository.

@mateo-berri

Copy link
Copy Markdown
Contributor Author

@litereview code-review

@mateo-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ecc311d. Configure here.

@litereview

litereview Bot commented Oct 15, 2026

Copy link
Copy Markdown

✅ code-review

5/5 · Ready for human review

Scope: full · Full PR review.

Completed · Some checks not run.

No correctness findings.

Checks and execution details
  • Passed · Real testing evidence (required): Not applicable: no LLM translation changes in the scoped paths. The PR edits only model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json. Neither file sits under litellm/llms/** or litellm/litellm_core_utils/prompt_templates/**.
  • Passed · Cost map schema tests (optional): Ran uv run pytest -q tests/unit/test_model_prices_schema.py: 92 passed. The suite covers the main and backup maps, including ISO deprecation_date validation.
  • Passed · Main and backup maps stay identical (optional): cmp model_prices_and_context_window.json litellm/model_prices_and_context_window_backup.json reported no differences.
  • Passed · Deprecation resolver picks up the new dates (optional): Ran _resolve_deployment_deprecation with LITELLM_LOCAL_MODEL_COST_MAP=True on openai/gpt-4o, openai/gpt-4o-mini, openai/gpt-4.1 and openai/gpt-4.1-mini. Each one resolved to 2027-01-14 with provider openai. azure/gpt-4o still resolved to its own date, 2027-04-14, so the change does not affect Azure rows. The new dates match the dated snapshots already in the map: gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini-2024-07-18, gpt-4.1-2025-04-14 and gpt-4.1-mini-2025-04-14, all 2027-01-14.
  • Passed · Other consumers of deprecation_date (optional): A grep of litellm/ found Python reads of deprecation_date only in litellm/proxy/common_utils/model_deprecation.py. No other runtime behavior, such as routing or model filtering, keys off the field.
  • Not run · Proxy deprecation unit tests (optional): Did not run tests/unit/proxy/common_utils/test_model_deprecation.py. Its proxy conftest imports prisma and websockets, and those packages were missing from the local env. I installed prisma, but the import still failed on websockets. The resolver check above exercised the same code path directly.

View review · Reviewed ecc311d92fb6

@codspeed

codspeed Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ 1 benchmark spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 31 untouched benchmarks


Comparing litellm_openai_gpt4_alias_deprecation_dates (ecc311d) with main (1f041a3)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (67d7552) during the generation of this report, so 1f041a3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by #46886, which carries these four GPT-4o and GPT-4.1 alias deprecation dates on a fresh main base

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant