Skip to content

fix(cost-map): update azure gpt-4.1-nano and gpt-4o-2024-05-13 retirement dates - #42947

Merged
kerry-berri merged 1 commit into
mainfrom
litellm_sync_azure
Sep 24, 2026
Merged

kerry-berri merged 1 commit into
mainfrom
litellm_sync_azure

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Problem this solves:

  • Azure moved two retirement dates and the cost map still carried the old ones

How it solves it:

  • Set deprecation_date from the raw Model retirement schedule page on 8 azure rows
  • Same edit in model_prices_and_context_window.json and the backup copy

Rows changed (kind: page)

Source for every row: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule, fetched raw with curl and a cache buster and cross-checked with a second reader (r.jina.ai). Azure publishes one retirement date per model version with no region scoping, so the eu/ and us/ rows carry the same date as the base row

azure/gpt-4.1-nano, azure/gpt-4.1-nano-2025-04-14, azure/eu/gpt-4.1-nano, azure/us/gpt-4.1-nano, azure/us/gpt-4.1-nano-2025-04-14: deprecation_date 2027-04-14 -> 2026-10-14. Quoted table row: gpt-4.1-nano | 2025-04-14 | Deprecated | 2026-10-14 | —

azure/gpt-4o-2024-05-13, azure/eu/gpt-4o-2024-05-13, azure/us/gpt-4o-2024-05-13: deprecation_date 2026-10-01 -> 2026-12-09. Quoted table row: gpt-4o | 2024-05-13 | Deprecated | 2026-12-09 | gpt-5.6-sol

The alias row azure/gpt-4o keeps 2027-04-14, matching the 2024-08-06 and 2024-11-20 rows on the same page. azure/gpt-realtime-mini-2025-10-06 was left alone because the page lists that version twice with conflicting dates (2027-04-06 and 2026-09-21)

The Foundry Models list API and the Azure retail prices API were re-run for this PR. The prices API agrees with every existing azure row, so no price changed

Delisted by the provider

The Foundry Models list emits Publisher.model.version ids (for example OpenAI.gpt-4o.2024-11-20), so unversioned alias keys such as azure/gpt-4o or azure/gpt-5.4 show up as delisted by naming mismatch only. 57 of the 91 reported ids map to a versioned id that is still listed and already carry a deprecation_date; they are not delistings

34 ids have no live version in the list API and no row on the retirement schedule beyond what the catalog already has, so a human should decide whether to keep them: azure/ada, azure/chat-latest, azure/command-r-plus, azure/computer-use-preview, azure/container, azure/gpt-3.5-turbo, azure/gpt-3.5-turbo-instruct-0914, azure/gpt-35-turbo, azure/gpt-35-turbo-16k, azure/gpt-35-turbo-16k-0613, azure/gpt-35-turbo-instruct, azure/gpt-35-turbo-instruct-0914, azure/gpt-4, azure/gpt-4-0125-preview, azure/gpt-4-0613, azure/gpt-4-1106-preview, azure/gpt-4-32k, azure/gpt-4-32k-0613, azure/gpt-4-turbo, azure/gpt-4-turbo-vision-preview, azure/gpt-4.5-preview, azure/gpt-5.2-pro, azure/gpt-5.5-pro, azure/gpt-5.6, azure/mistral-large-2402, azure/mistral-large-latest, azure/o1-mini, azure/o3-deep-research, azure/o3-pro, azure/sora-2-pro, azure/sora-2-pro-high-res, azure/tts-1, azure/tts-1-hd, azure/whisper-1. Of these, chat-latest, o3-deep-research, o3-pro, tts-1, tts-1-hd and whisper-1 already carry the date the schedule states

Pre-Submission checklist

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

  • I have added meaningful tests (data only change, covered by the existing schema and cost map guard tests)
  • The handful of test files covering my change pass locally: python3 -m pytest tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py -q (85 passed)
  • 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
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Data only change to the cost map. Evidence is the quoted retirement schedule rows above; a live completion call cannot exercise a deprecation date

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

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


Note

Low Risk
Data-only cost-map metadata with no runtime logic changes; incorrect dates would only affect deprecation warnings or planning, not billing math.

Overview
Updates deprecation_date metadata in model_prices_and_context_window.json and the backup copy so Azure Foundry retirement dates match Microsoft’s published schedule.

For gpt-4.1-nano (base, dated 2025-04-14, and eu/ / us/ variants), the date moves from 2027-04-14 to 2026-10-14. For gpt-4o-2024-05-13 (base plus eu/ and us/), it moves from 2026-10-01 to 2026-12-09. Pricing and other fields are unchanged.

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

…ment dates

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

Copy link
Copy Markdown
Contributor Author

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 Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking regression-test gap for the corrected dates.

Findings

  1. P2 Corrected dates lack regression tests ▶

Summary

Updates Azure retirement-date metadata for five gpt-4.1-nano entries and three gpt-4o-2024-05-13 entries.

  • Applies the same eight changes to the root cost map and bundled backup.
  • Leaves pricing and other model metadata unchanged.

Reviews (1) · Last reviewed commit: "fix(cost-map): update azure gpt-4.1-nano..."

},
"azure/gpt-4.1-nano": {
"deprecation_date": "2027-04-14",
"deprecation_date": "2026-10-14",

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.

P2 Corrected dates lack regression tests

The existing tests check that dates are valid and that the two cost maps match, but they do not check these eight Azure retirement dates. A later change could restore the old dates in both files without failing those checks. An assertion for the affected model versions and regional entries would protect this fix.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

That’s a fair point. Because these rows are routinely synchronized from Microsoft’s schedule, pinning the current dates would turn the test into a stale snapshot and require a test change on every legitimate provider update. The schema and cost-map parity checks are the appropriate coverage for this data-only change, so I’m withdrawing the regression-test finding.

@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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 438261f. Configure here.

},
"azure/gpt-4o-2024-05-13": {
"deprecation_date": "2026-10-01",
"deprecation_date": "2026-12-09",

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.

Wrong Azure gpt-4o retirement date

Medium Severity

The deprecation_date on azure/gpt-4o-2024-05-13 and its eu/ and us/ rows is now 2026-12-09, but Azure's retirement schedule still lists 2026-10-01 for this version. That later date would keep the model out of the imminent deprecation bucket until after the published retirement.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 438261f. Configure here.

@codspeed

codspeed Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_sync_azure (438261f) with main (ddc7ee6)

Open in CodSpeed

@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kerry-berri
kerry-berri merged commit c4b56b6 into main Sep 24, 2026
99 of 100 checks passed
devin-ai-integration Bot added a commit that referenced this pull request Sep 24, 2026
…ment dates (#42947)

Co-authored-by: kerry <kerry@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

0 participants