Repository navigation
fix(registry): let reviewed retirements lower the shrink high-water - #71
Merged
Merged
Conversation
Upstream BerriAI/litellm#42435 removed models past their deprecation dates, taking xai from 78 to 58 entries, and the per-provider high-water guard rejected every daily refresh since. Entries that our trusted committed data already marks with a past deprecation_date and that upstream drops are now subtracted from the high-water baseline before the 75% floor check, and the written baseline uses that lowered value. Any other disappearance still counts as unexplained loss. Fixes #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #70
The daily refresh can merge upstream data again. BerriAI/litellm#42435 removed models whose deprecation dates had passed, so xai went from 78 to 58 entries. That is below the 75% high-water floor, so every run failed.
Change (
scripts/update-model-registry.sh): an entry counts as a reviewed retirement when our trusted committed file gives it adeprecation_date(YYYY-MM-DD) earlier than today (UTC) and upstream removes it. We subtract reviewed retirements from the high-water baseline (total and per core provider) before the floor check. The new baseline ismax(new, baseline - retired). Other removed entries, with no date, a future date or a malformed date, still count as unexplained loss. Gradual-shrink protection does not change.Data: includes the refresh from current upstream (4,503 entries). The new high-water is xai 58, openai 209, anthropic 22, gemini 84. Non-deprecated removals (azure o1-preview, palm, about 12 openrouter) stay inside the existing tolerance.
Remaining risk: upstream can add a past
deprecation_dateto some entries, wait for that data to merge, and then remove those entries. This design accepts that risk. A retirement counts as reviewed when its deprecation is in data that we already trust.Testing:
tests/registry_refresh.rsruns the script on synthetic data with xai going 78 to 58. The run passes when the removed entries have past deprecation dates and fails withxai 58 vs high-water 78when they have no dates. The test fails onmain.cargo fmt --check,cargo clippy --all-targets -D warnings,cargo testandcargo docwith-D warningspass locally.🤖 Generated with Claude Code