Repository navigation
fix(cost-map): take the later azure deprecation date for gpt-4.1-nano, gpt-4o-transcribe and gpt-realtime-2.1 - #42986
Conversation
…, gpt-4o-transcribe and gpt-realtime-2.1 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)".
|
|
bugbot run |
|
|
There was a problem hiding this comment.
✅ 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 01f61cc. Configure here.
|
| }, | ||
| "azure/gpt-4.1-nano": { | ||
| "deprecation_date": "2026-10-14", | ||
| "deprecation_date": "2027-04-14", |
There was a problem hiding this comment.
Retirement dates lack test coverage The existing schema and cost-map guard tests would still pass if these seven Azure dates were changed back to the earlier, valid dates. They check date format and file synchronization, not the later-date decision. An assertion for the affected keys would help prevent a future cost-map update from silently undoing this correction.
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.
These dates are vendor data synced from the Azure Models API and retirement schedule page, so pinning them in tests would break every legitimate sync
There was a problem hiding this comment.
That’s a fair point. These values are vendor-sourced metadata that can legitimately change during future catalog syncs, so exact-date assertions would turn routine upstream updates into test failures rather than catch a defect. The existing schema and synchronization checks are appropriate here; I’m withdrawing the test-coverage suggestion.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…, gpt-4o-transcribe and gpt-realtime-2.1 (#42986) 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_dateon the azure gpt-4.1-nano, gpt-4o-transcribe and gpt-realtime-2.1 keysUser Flow
Before: a developer checking when azure gpt-4.1-nano stops serving sees the earlier of two vendor dates
python -c "import litellm; print(litellm.model_cost['azure/gpt-4.1-nano']['deprecation_date'])"2026-10-14After: the same lookup reports the later vendor date
2027-04-14, the later of the two Azure sourcesEvidence
Models API:
npm run providers -- list azure --rawin litellm-providers on 2026-09-24 (management.azure.com locations/eastus2/models,model.deprecation.inference). Page: https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule fetched raw with a cache buster on 2026-09-24 (ms.date 2026-09-21), cells quoted asModel | Version | Lifecycle | Retirement date | Replacement. Kerry ruled on 2026-09-24 to take the later of the two dates per rowgpt-4.1-nano | 2025-04-14 | Deprecated | 2026-10-14 | —gpt-4o | 2024-05-13 | Deprecated | 2026-12-09 | gpt-5.6-solgpt-4o-transcribe | 2025-03-20 | GA | 2026-10-15 | —gpt-realtime-2.1 | 2026-07-07 | GA | 2027-06-25 | —gpt-image-2.5-flare | 2026-09-09 | GA | 2027-09-09 | —andgpt-image-2.5-sunburst | 2026-09-09 | GA | 2027-09-09 | —The same page also has a "Deployment retirement date" table listing gpt-4.1-nano 2025-04-14 at 2027-10-14 for training retirement extensions. That table was not part of the ruling and is not used here
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/test_model_prices_schema.py tests/test_litellm/test_cost_map_guard.py -vScreenshots / Proof of Fix
The proxy's /model/info does not expose
deprecation_date, so the check reads the cost map the SDK loads. Before reads the published map on main, After reads the branch's local mapBefore (f0e671f)
for m in azure/gpt-4.1-nano azure/gpt-4o-transcribe azure/gpt-realtime-2.1; do uv run --no-sync python -c "import litellm; print('$m', litellm.model_cost['$m'].get('deprecation_date'))"; doneAfter (01f61cc)
LITELLM_LOCAL_MODEL_COST_MAP=TruesetType
🐛 Bug Fix
Caveats (if any)
Low
Link to Devin session: https://app.devin.ai/sessions/390dba1c22de4ef9af7ab0c0d3a94c1a
Open in Devin Desktop: https://app.devin.ai/desktop/session/390dba1c22de4ef9af7ab0c0d3a94c1a?variant=devin
Requested by: @kerry-berri
Note
Low Risk
Data-only metadata updates in the model cost map with no changes to pricing, routing, or runtime inference behavior.
Overview
Updates
deprecation_dateon disputed Azure Foundry model entries inmodel_prices_and_context_window.jsonand its LiteLLM backup copy so the catalog reflects the later of Azure’s Models API vs. retirement schedule page (per #42933 follow-up).gpt-4.1-nano keys (
azure/gpt-4.1-nano, dated variant, andus/euregional aliases) move from 2026-10-14 to 2027-04-14.azure/gpt-4o-transcribemoves 2026-10-15 → 2026-12-31.azure/gpt-realtime-2.1moves 2027-06-25 → 2027-07-31.No token pricing, capability flags, or model keys are added or removed—only retirement metadata for SDK/
litellm.model_costlookups.Reviewed by Cursor Bugbot for commit 01f61cc. Bugbot is set up for automated code reviews on this repo. Configure here.