Repository navigation
fix(cost-map): update azure gpt-4.1-nano and gpt-4o-2024-05-13 retirement dates - #42947
Conversation
…ment dates Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
| }, | ||
| "azure/gpt-4.1-nano": { | ||
| "deprecation_date": "2027-04-14", | ||
| "deprecation_date": "2026-10-14", |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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", |
There was a problem hiding this comment.
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)
Reviewed by Cursor Bugbot for commit 438261f. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ment dates (#42947) Co-authored-by: kerry <kerry@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>


TLDR
Problem this solves:
How it solves it:
deprecation_datefrom the raw Model retirement schedule page on 8 azure rowsRows 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/andus/rows carry the same date as the base rowazure/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-solThe alias row
azure/gpt-4okeeps 2027-04-14, matching the 2024-08-06 and 2024-11-20 rows on the same page.azure/gpt-realtime-mini-2025-10-06was 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.versionids (for exampleOpenAI.gpt-4o.2024-11-20), so unversioned alias keys such asazure/gpt-4oorazure/gpt-5.4show 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 delistings34 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
python3 -m pytest tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py -q(85 passed)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
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_datemetadata inmodel_prices_and_context_window.jsonand the backup copy so Azure Foundry retirement dates match Microsoft’s published schedule.For gpt-4.1-nano (base, dated
2025-04-14, andeu//us/variants), the date moves from 2027-04-14 to 2026-10-14. For gpt-4o-2024-05-13 (base pluseu/andus/), 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.