Repository navigation
fix: honor free-route opt-out throughout credit recovery - #1905
Merged
Merged
Conversation
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.
Problem and behavior
Automatic credit recovery could send task context to free routes even when the person had disabled them. Low-balance defaults, remembered and live payment refusals, saved fallback ladders, and already-created helpers now honor the free-routes switch.
With free routes off, a small positive paid balance remains usable. When credit really is unavailable, work is preserved and the user is guided to add credit, connect a provider, or explicitly enable free routes. A current explicit choice of a particular free model remains consent for that model; it does not authorize other automatic free fallbacks.
Helpers recheck current explicit settings rather than treating a cached automatic choice as consent. Malformed current settings fail closed. Subscription and local alternatives remain available, and saved pins and preferences are not rewritten.
Verification
make pr-readypassed, including fresh command, configuration, engine and end-to-end package tests.deepseek/deepseek-v4.1-flash.The final combined binary also passed all eight scripted credential-boundary and free-consent controls after #1904. Fault injection uses loopback endpoints and mock data; live calls are a separate normal-operation control. No personal memories are included.
Closes #1523