feat: Claude Sonnet 4 1M context; Cursor rules budget 10% (cap 100k)#22
Merged
Conversation
Contributor
PR Reviewer Guide 🔍(Review updated until commit d4454ca)Here are some key observations to aid the review process:
🔍 Manual review required Reason: Manual review required: Complex Logic |
6d6632c to
e8f43bc
Compare
e8f43bc to
d4454ca
Compare
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.
PR Type
Enhancement
Description
• Enable 1M context model support with updated cursor rules budgeting
• Increase cursor rules token limit from 20k to 100k tokens
• Reduce context ratio from 25% to 10% with hard cap
• Add OpenAI/LiteLLM compatibility shim for type mismatches
Changes walkthrough 📝
litellm_ai_handler.py
Add OpenAI/LiteLLM compatibility shim for type handlingpr_agent/algo/ai_handlers/litellm_ai_handler.py
• Add compatibility shim for OpenAI/LiteLLM type mismatches
• Handle
ResponseTextConfigtoResponseFormatTextConfigrenaming• Wrap
aliasing in try/except for best effort compatibility
requirements.txt
Pin dependency versions for compatibilityrequirements.txt
• Pin LiteLLM to version 1.75.8 and OpenAI to 1.100.1
• Update comment
about version compatibility requirements
utils.py
Update cursor rules token budgeting parameterspr_agent/git_providers/utils.py
• Increase
max_cursor_rules_tokensfrom 20k to 100k• Reduce
cursor_rules_context_ratiofrom 0.25 to 0.10configuration.toml
Update default cursor rules configuration valuespr_agent/settings/configuration.toml
• Update default
max_cursor_rules_tokensto 100000• Update default
cursor_rules_context_ratioto 0.10README.md
Document updated cursor rules budgeting behaviorREADME.md
• Document new cursor rules budgeting (10% of context, 100k cap)
•
Explain 1M-context model support for up to 100k rule tokens