Repository navigation
Conversation
Muguett-DBY
approved these changes
Oct 29, 2026
Muguett-DBY
left a comment
There was a problem hiding this comment.
I checked the base and this commit with an offline recording model. The model now receives the conversation's tool on both the first and second turns, and an explicit nonempty tools argument still takes precedence. An empty list inherits the conversation tools, matching the existing synchronous behavior. A model that doesn't support tools now rejects the inherited tool instead of silently losing it.
This exercised the exact models.py and message types with Codex assistance; the HTTP client and unused utility helpers were stubbed. I didn't run the full suite or a real provider.
This branch has not been deployed
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
Closes #1790
Fixes an issue where
AsyncConversation.prompt()ignores the tools attached to the conversation instance when called without explicittoolspassed into.prompt().Cause
In
llm/models.py:Conversation.prompt()usestools=tools or self.toolsConversation.chain()usestools=tools or self.toolsAsyncConversation.chain()usestools=tools or self.toolsHowever,
AsyncConversation.prompt()was mistakenly passingtools=toolsdirectly toPrompt(...), droppingself.tools.Changes
llm/models.py: Changedtools=toolstotools=tools or self.toolsinAsyncConversation.prompt().tests/test_tools.py: Added unit testtest_async_conversation_prompt_inherits_toolsverifying that tools set on anAsyncConversationare properly passed through to the generatedPrompt.