fix(model-metadata): refresh stale snapshot and add scheduled upkeep - #4408
Closed
amaldevcm wants to merge 2 commits into
Closed
fix(model-metadata): refresh stale snapshot and add scheduled upkeep#4408amaldevcm wants to merge 2 commits into
amaldevcm wants to merge 2 commits into
Conversation
glm-5.3 (and others) were missing thinking-effort choices because an unrecognized modality value (upstream's new 'video') aborted the entire refresh instead of just that one model, so the committed snapshot never got updated. Filter unknown modality values per-model instead of rejecting the whole refresh, add a sanity floor to catch a degraded upstream response, and schedule a nightly refresh job that opens a PR for review. Addresses the snapshot-staleness root cause in apache#4398; the client-side catalog-authority and runtime-refresh changes remain separate work.
Author
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.
Summary
glm-5.3(andzai-coding-plan/glm-5.3-flash) had no thinking-effort choices because the committed models.dev snapshot was stale —sync-model-metadata.mjsrefused to complete any refresh once upstream introduced a modality value (video) the validator didn't recognize, so no one had been able to refresh successfully.toMetadata()now filters out an unrecognized modality value per-model instead of rejecting the whole model/refresh; the model keeps its other capabilities. Logged as a warning.--accept-upstream-removals, after reviewing the diff — a handful of models/effort options genuinely retired upstream).scripts/check-model-metadata-floor.mjs: a sanity floor (required providers present, total model count above a threshold) so a degraded upstream response can't silently pass through a scheduled refresh..github/workflows/model-metadata-refresh.yml: nightly (+ manual) job that runs the refresh, enforces the floor, and opens a PR when the snapshot changes — closes the gap where nothing kept the snapshot from going stale again.Addresses the snapshot-staleness root cause from #4398. The two larger architectural proposals in that issue (Runtime Host as sole model-catalog authority; runtime refresh over
HostChangeFeed) are separate, larger changes not included here.Test plan
node scripts/check-model-metadata-floor.mjspasses (1905 models / 47 providers)npm run check:model-metadatapassesnode --test scripts/sync-model-metadata.test.mjs— 10/10 passing (updated the modality test to assert filtering instead of rejection)zai/glm-5.3now hasthinkingOptions.efforts: ["low","high","max"]in the refreshed snapshot🤖 Generated with Claude Code