-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat: #5917 - model tool use capability should be auto detected #6222
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
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.
Caution
Changes requested ❌
Reviewed everything up to 0dc0a9a in 4 minutes and 7 seconds. Click for details.
- Reviewed
804lines of code in11files - Skipped
0files when reviewing. - Skipped posting
6draft 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. core/src/browser/extensions/engines/AIEngine.ts:275
- Draft comment:
Good addition of an abstract isToolSupported method to enforce tool capability detection in all engines. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. extensions/llamacpp-extension/src/index.ts:1625
- Draft comment:
Consider explicitly converting the result of the GGUF metadata check to a boolean. Using 'return Boolean((await readGgufMetadata(modelPath)).metadata?.["tokenizer.chat_template"]?.includes("tools"))' ensures that undefined is coerced to false. - 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% While the suggestion would make the code slightly more explicit, the current code is already type-safe due to TypeScript's type system and optional chaining. The function is declared to return Promise so TypeScript will ensure the return type is correct. The current code is idiomatic TypeScript and the suggested change would add verbosity without meaningful benefit. The comment points out a valid way to make the code more explicit, but I may be underestimating the value of being extra clear about boolean coercion. The current code already handles undefined correctly through optional chaining and the TypeScript return type ensures type safety. Making it more explicit would just add noise. Delete the comment since the current code is already type-safe and idiomatic TypeScript. The suggested change would add unnecessary verbosity.
3. extensions/llamacpp-extension/src/index.ts:1099
- Draft comment:
Typographical error: The comment uses "prepand" but it should be "prepend" to correctly indicate adding a prefix. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. web-app/src/services/models.ts:318
- Draft comment:
Typo in documentation: "Check if model support tool use capability" should likely be "Check if model supports tool use capability." - 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% While the comment is technically correct about the grammar, it's a very minor documentation issue. Documentation comments are for developers, and the meaning is perfectly clear despite the minor grammatical error. This kind of nitpicky comment about documentation doesn't require a code change and doesn't impact functionality. The comment is factually accurate - there is indeed a grammatical error. And clear documentation is important for code maintainability. However, per the rules, we should not make purely informative comments that don't require clear code changes. Minor documentation grammar fixes fall into this category. This comment should be removed as it's too minor and doesn't highlight an actual code issue that needs fixing.
5. web-app/src/services/models.ts:319
- Draft comment:
Typo in documentation: "Returned by backend engine" might be clearer as "Returned by the backend engine." - 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% Documentation comments are important, but this is an extremely minor grammatical suggestion that doesn't affect understanding. The original "Returned by backend engine" is perfectly clear. This kind of nitpicky grammar suggestion creates noise without adding value. We should focus on substantive issues. Documentation clarity is important for maintainability. Maybe improving grammar helps non-native English speakers? While documentation clarity matters, this change is so minor it doesn't meaningfully improve understanding. The original is already clear enough. Delete this comment as it suggests an extremely minor grammatical change that doesn't meaningfully improve the documentation's clarity.
6. web-app/src/types/models.ts:16
- Draft comment:
There appears to be no newline at the end of the file. Please add a newline at the end to adhere to common style guidelines. - 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% While having a newline at the end of file is a common convention, this is something that should be handled by editor settings or linting rules, not PR comments. It's a minor stylistic issue that doesn't affect functionality. Additionally, this isn't related to the actual changes being made in the PR (removing an enum). The missing newline could cause issues with some tools or make git diffs less clean. It is a real issue that should be fixed according to most style guides. While it's a valid style issue, this is exactly the kind of thing that should be caught by automated tooling rather than manual review comments. It's too minor for a PR comment and not related to the actual changes. Delete this comment. It's a minor style issue that should be handled by linting rules, and it's not related to the actual changes in the PR.
Workflow ID: wflow_S5r5P0TR6UAwFICm
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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 d7cf258 in 1 minute and 18 seconds. Click for details.
- Reviewed
58lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft 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. web-app/src/routes/hub/index.tsx:658
- Draft comment:
The UI now conditionally renders an IconTool whenmodel.toolsis truthy. Make sure that the auto-detection logic (which reads the GGUF chat template) correctly sets thetoolsproperty on CatalogModel instances and that the translation key 'hub:tools' is defined. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. web-app/src/services/models.ts:32
- Draft comment:
The CatalogModel interface now includes an optionaltoolsproperty and the helper functionisToolSupportedis added. Ensure that the underlying engine’sisToolSupported(which presumably parses the GGUF chat template) is integrated so that auto-detection populates this field during model fetch or conversion. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_40bhu0jEae4AjbuK
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Describe Your Changes
This PR adds model tool use capability detection, eliminating the need for manual model capabilities edits.
How it works:
It also addresses an issue where the model download race condition occurs, resulting in successful download but not display in the list.
CleanShot.2025-08-19.at.10.03.21.mp4
Tool indicator in hub

Fixes Issues
Self Checklist
Important
This PR adds automatic detection of model tool use capabilities from GGUF metadata and fixes a model download race condition.
isToolSupported()toAIEngineandllamacpp_extensionto auto-detect tool support from GGUF metadata.AppEvent.onModelImportedinllamacpp_extensionafter model import.EditModel.tsx.onModelImportedtoAppEventinindex.ts.onModelImportedevent inDataProvider.tsxto refresh providers.DialogEditModelfrom$providerName.tsx.hub/index.tsxif model supports tools.DownloadManagement.tsxby removing redundant provider refresh.providers.test.tsto mockisToolSupported().DefaultToolUseSupportedModelsenum frommodels.ts.This description was created by
for d7cf258. You can customize this summary. It will automatically update as commits are pushed.