Repository navigation
loopguard, trace: expand source extensions and dynamically resolve Antigravity model pricing - #309
Open
Xinghan Pan (PStarH) wants to merge 1 commit into
Conversation
…ve Antigravity model pricing
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
This PR improves shell edit detection in loopguard and enhances the Antigravity session trace importer:
Loopguard Shell Edit Detection:
_SOURCE_FILEregex intokeneconomizer/loopguard/shell_edits.pynow recognizes.cu,.cuh(CUDA),.zig,.dart,.sol(Solidity),.proto(Protobuf),.graphql/.gql,.astro, and.cmake.sed -i,cat > ...) on these file types were not recognized as source edits, which could falsely trigger loopguard stuck turn detection during polyglot/systems development.Antigravity Trace & Dynamic Pricing:
antigravity_session_usage()now inspectsPLANNER_RESPONSErows to detect the active model (e.g.,gemini-2.5-pro,gemini-3.8-flash) rather than hardcoding"antigravity".tokeneconomizer/pricing.py,weights_for()strips thinking-budget and variant suffixes (e.g.-high,-medium,-low,-thinking,-latest) when doing dictionary lookups so variants likegemini-3.8-flash-highcorrectly resolve to their base weights instead of raisingValueError.path,file_path,filePath,pattern,directory) andsearch_webmapping toantigravity.pytool definitions.antigravity_toolintokeneconomizer.trace.__all__.Verification
tests/test_live_core.pycovering all newly recognized extensions.tests/test_antigravity.pyverifying usage model resolution and lowercase argument parsing.