Add conditional for Python agent tools - #25677
Merged
Eleanor Boyd (eleanorjboyd) merged 5 commits intoJan 14, 2026
Merged
Conversation
Eleanor Boyd (eleanorjboyd)
marked this pull request as ready for review
December 16, 2025 23:03
Eleanor Boyd (eleanorjboyd)
enabled auto-merge (squash)
December 16, 2025 23:03
Don Jayamanne (DonJayamanne)
requested changes
Dec 17, 2025
Don Jayamanne (DonJayamanne)
left a comment
There was a problem hiding this comment.
This solution will break simple prompts such as create a python file to do xyz and verify it works correctly
The problem here is that the model uses this tool to install npm packages.
Thats wrong.
I would try updating the prompts to include text such as Do NOT use this tool to install npm or other non-python packages
| "required": [] | ||
| } | ||
| }, | ||
| "when": "editorLangId == python || resourceLangId == python || notebookType == jupyter-notebook" |
There was a problem hiding this comment.
This would break simple cases like a pomrpt such as create a python/notebook file that does ....
Member
Author
There was a problem hiding this comment.
gotcha- I was going off of Connor's comment about using a "when" statement but this makes sense
Eleanor Boyd (eleanorjboyd)
requested a review
from Don Jayamanne (DonJayamanne)
December 17, 2025 18:17
Whaletrucker Reef (scutuatua-crypto)
approved these changes
Dec 21, 2025
Whaletrucker Reef (scutuatua-crypto)
approved these changes
Dec 21, 2025
Whaletrucker Reef (scutuatua-crypto)
approved these changes
Dec 21, 2025
Don Jayamanne (DonJayamanne)
requested changes
Dec 21, 2025
Don Jayamanne (DonJayamanne)
left a comment
There was a problem hiding this comment.
I'd suggest tweaking to be more descriptive when not to use this
IMPORTANT: This tool should only be used for Python environments and Python Packages - do not use for non-Python packages.
Eleanor Boyd (eleanorjboyd)
requested a review
from Don Jayamanne (DonJayamanne)
January 8, 2026 17:56
Don Jayamanne (DonJayamanne)
approved these changes
Jan 14, 2026
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.
fixes #25644