-
Notifications
You must be signed in to change notification settings - Fork 607
Context for rag tool and extended thinking with non-claude models #2210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context for rag tool and extended thinking with non-claude models #2210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 91787bc in 1 minute and 51 seconds. Click for details.
- Reviewed
27lines of code in2files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. py/core/agent/research.py:118
- Draft comment:
Ensure 'context=self' is supported by the Tool implementation. Verify that passing the agent instance as context won’t cause circular reference issues. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. py/core/base/agent/agent.py:230
- Draft comment:
Extended thinking now activates only for Anthropic models. Consider normalizing the model string (e.g., using lower()) to ensure robust matching. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% The suggestion to use .lower() is a reasonable defensive programming practice that could prevent bugs if model names ever come in with different casing. However, model names in this context likely come from a controlled source (the config) and probably have consistent casing. The change is minor and not clearly necessary based on the evidence available. I don't have evidence that inconsistent casing is actually a problem that needs solving. The current code may be perfectly sufficient for the known model name formats. While case-insensitive comparison could add robustness, we should avoid suggesting changes without clear evidence of need. The current code appears to work as intended. Delete the comment as it suggests a defensive programming change without clear evidence that it solves a real problem.
3. py/core/base/agent/agent.py:229
- Draft comment:
Typo: Consider capitalizing 'claude' to 'Claude' for consistency with the debug message on line 230. - Reason this comment was not posted:
Comment was on unchanged code.
4. py/core/base/agent/agent.py:230
- Draft comment:
Typo: There's an extra space before the colon in 'Model in use :'. Consider changing it to 'Model in use:' for consistency. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This is an extremely minor formatting issue in a debug log message that developers will rarely see. It doesn't affect functionality at all. The comment, while technically correct, is focusing on something too trivial. Debug messages don't need to follow strict formatting rules. The comment is technically accurate and does point out an inconsistency. Some teams might have strict formatting standards that apply even to debug messages. While formatting consistency is good, this is far too minor an issue to warrant a PR comment, especially for a debug message. This falls under the "Do NOT make comments that are obvious or unimportant" rule. Delete this comment as it focuses on an extremely minor formatting issue in a debug message that doesn't meaningfully impact code quality or readability.
Workflow ID: wflow_VLE5uUEysAX2i4KX
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
|
@NolanTrem tagging you as latest most active user in merging PRs for your feedback/approval/merge |
|
Awesome catch! Mind running the pre-commit hooks? Otherwise, this looks great! |
…ip extended thinking message in Agent class for non Anthropic models
91787bc to
7272f95
Compare
|
Sorry, my bad, enabled and pushed (after it passed) |
|
No worries, it looks like it didn't run automatically for you anyways. Merging now—I seriously appreciate it! |
🛠️ Fixes & Improvements
This pull request addresses two key issues:
1. RAG Tool Context Injection in Research Agent
2. Extended Thinking Flow with Non-Anthropic Models
Important
Fixes context injection for RAG tool in
research.pyand handles "Continue" messages for non-Anthropic models inagent.py.context=selftorag_tool()inresearch.pyto fix context injection issue.handle_function_or_tool_call()inagent.pyto conditionally add "Continue..." message.This description was created by
for 91787bc. You can customize this summary. It will automatically update as commits are pushed.