fix: execute tool calls in @ollama streaming pass + utility model guidance - #150
Merged
Conversation
… raw JSON - Replace JSON-dump of tool_calls in streaming pass with real vscode.lm.invokeTool execution when toolInvocationToken is available - Preserve JSON fallback when no toolInvocationToken is present - Append tool results to conversation context for subsequent chunks - Detect 'No utility model configured for copilot-utility-small' error and surface actionable guidance for BYOK utility model setup Closes #149, #148
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 14 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #150 +/- ##
==========================================
- Coverage 63.68% 63.39% -0.30%
==========================================
Files 24 24
Lines 3673 3693 +20
Branches 939 944 +5
==========================================
+ Hits 2339 2341 +2
- Misses 694 709 +15
- Partials 640 643 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



Changes
#149: Tool calls print as raw JSON instead of executing
Root cause: The streaming pass in
handleChatRequest(which runs after the tool loop or when notoolInvocationTokenis available) dumped tool calls as JSON markdown instead of executing them.Fix: When
request.toolInvocationTokenis available, the streaming pass now executes tool calls viavscode.lm.invokeTooland appends results to the conversation context. The JSON fallback is preserved for when no token is available.#148: No utility model configured for copilot-utility-small with BYOK
Root cause: VS Code Copilot requires a separate utility model when using a BYOK model as the main agent. Opilot doesn't register a model under
copilot-utility-small, so VS Code can't find one.Fix: Detect the "No utility model" error and surface actionable guidance directing the user to configure
github.copilot.chat.utilityModelin settings.Test Plan
tsc --noEmitpassesultracite checkpasses with no errors