fix(provider): stop restoring cleared custom options - #10218
Closed
mimen wants to merge 1 commit into
Closed
Conversation
Custom model capabilities come from settings and should remain authoritative when a refresh removes their option descriptors. Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The change narrowly fixes provider snapshot merging so explicitly cleared custom model options are not resurrected, while preserving capability fallback for built-in models. It adds a targeted regression test and does not affect schemas, product defaults, or deployment configuration. You can add or adjust custom eligibility rules. Learn more. |
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.
Custom model option descriptors are settings-owned. After a user cleared every descriptor,
mergeProviderModelstreated the empty list as incomplete provider discovery and restored the previous capabilities. Web and mobile kept showing stale controls until the server restarted.Custom rows now bypass capability backfill. Built-in rows still retain discovered capabilities across incomplete refreshes.
Verification
vp test run apps/server/src/provider/Layers/ProviderRegistry.test.tspasses all 48 tests.vp run --filter=t3 typecheckpasses with existing Effect suggestions only.git diff --checkpass.This is a focused follow-up to #9807. #8964 is closed because #9807 superseded its broader custom-model profile design.
Risk and rollback
The change affects only custom rows during provider snapshot merging. Revert
af66745a9to restore the previous behavior.Review tier: standard.
Implemented with GPT-5.6 Sol via Claude Code.
Note
Fix
mergeProviderModelsrestoring cleared custom optionsCustom models in a refreshed provider snapshot now return directly from that snapshot before the existing capability-retention logic runs. Non-custom models still keep previous capabilities when the refreshed model lacks them. Adds a test confirming cleared custom model capabilities stay cleared.
Macroscope summarized af66745.