Repository navigation
feat(price-sync): drop friendliai entries the catalog no longer returns - #41001
Lee-Si-Yoon wants to merge 3 commits into
Conversation
sync_local_data_with_remote only updated and added keys, so a model Friendli delists from /serverless/v1/models stayed in the registry forever (e.g. the stale llama-3.1 and K-EXAONE rows). Absence from the live catalog is now a delete signal, scoped to the friendliai/ prefix and gated on a non-empty transform result so a failed or empty fetch can never wipe entries; legacy pre-sync rows without a source field are cleaned up too. OpenRouter and Vercel entries are exempt — their catalogs can delist rows users still route to.
Greptile SummaryThis PR adds automatic removal of Friendli registry entries absent from the provider catalog
Confidence Score: 4/5This PR is not safe to merge because a transient Friendli fetch failure can remove every Friendli registry entry The production path passes a merged provider map, so successful OpenRouter or Vercel data defeats the intended empty Friendli guard and enables destructive cleanup Files Needing Attention: .github/scripts/auto_update_price_and_context_window_file.py, tests/test_litellm/test_auto_update_price_and_context_window_file.py
|
| Filename | Overview |
|---|---|
| .github/scripts/auto_update_price_and_context_window_file.py | Adds Friendli cleanup, but the empty-catalog guard checks the merged provider map and can wipe all Friendli entries after a failed fetch |
| tests/test_litellm/test_auto_update_price_and_context_window_file.py | Adds focused cleanup tests, but the failed-fetch case bypasses the merged catalog shape used by the production caller |
Reviews (1): Last reviewed commit: "feat(price-sync): drop friendliai entrie..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Deletion keyed off the merged remote map, so a Friendli fetch failure alongside a successful OpenRouter/Vercel fetch left the map non-empty and wiped every local friendliai entry. The sync now tracks whether the Friendli catalog itself came back and only computes drops from it; sync takes the precomputed dropped keys instead of deriving them internally. Also: precise types (dict[str, dict[str, object]]) on the sync signature, drop-by-pop instead of mutating iteration, and tests cover the failed-fetch with successful-other-catalogs case
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
|
Fixed in 4d2314d: deletion now uses raw Friendli catalog ids and skips cleanup for empty fetches |
TLDR
Follow-up to #35918 (merged). The weekly Friendli metadata sync only updates and adds registry keys — it has no deletion path, so a model Friendli delists from
https://api.friendli.ai/serverless/v1/modelsstays inmodel_prices_and_context_window.jsonforever.