[Cursor] Improve Reasoning Tokens Documentation and Implementation#99
Merged
grapeot merged 3 commits intograpeot:multi-agentfrom Feb 27, 2025
Merged
[Cursor] Improve Reasoning Tokens Documentation and Implementation#99grapeot merged 3 commits intograpeot:multi-agentfrom
grapeot merged 3 commits intograpeot:multi-agentfrom
Conversation
- Update plan_exec_llm to use query_llm from llm_api - Remove redundant LLM client creation and token tracking logic - Add support for multiple LLM providers and models via CLI arguments - Simplify token usage tracking by leveraging existing infrastructure - Remove hardcoded OpenAI-specific code to improve provider flexibility
This commit improves the handling and documentation of reasoning tokens across the codebase: - Added comprehensive docstrings explaining reasoning tokens - Enhanced query_llm function documentation for provider-specific behaviors - Fixed token tracking for o1 model and non-o1 models - Improved test coverage and documentation - Added CHANGELOG.md to track changes Key technical details: - Reasoning tokens are o1-specific (OpenAI's most advanced model) - All other models have reasoning_tokens=None - Token tracking behavior varies by provider (OpenAI, Anthropic, Gemini) Testing: - All 21 tests passing - Added specific test cases for reasoning tokens - Improved test documentation and coverage
grapeot
reviewed
Feb 25, 2025
Owner
|
Thank you @BoomMccloud ! I added a comment in the code, and am testing it locally. If you agree with the proposal and make the change, we can then merge it! |
Author
|
updated the code, please let me know if there are any other comments |
Owner
|
Looks good! Merged! Thanks a lot for the PR! |
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.
Overview
This PR improves the handling and documentation of reasoning tokens across the codebase, with a focus on clarifying provider-specific behaviors and ensuring proper test coverage.
Key Changes
Documentation Improvements:
TokenUsageclassquery_llmfunction documentation to clarify provider-specific behaviorsImplementation Updates:
Test Coverage:
Technical Details
reasoning_tokens=NoneTesting
Related Issues
None