Skip to content

fix: execute tool calls in @ollama streaming pass + utility model guidance - #150

Merged
selfagency merged 1 commit into
mainfrom
fix/gh-issue-remediations
Jul 16, 2026
Merged

fix: execute tool calls in @ollama streaming pass + utility model guidance#150
selfagency merged 1 commit into
mainfrom
fix/gh-issue-remediations

Conversation

@selfagency

Copy link
Copy Markdown
Owner

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 no toolInvocationToken is available) dumped tool calls as JSON markdown instead of executing them.

Fix: When request.toolInvocationToken is available, the streaming pass now executes tool calls via vscode.lm.invokeTool and 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.utilityModel in settings.

Test Plan

  • tsc --noEmit passes
  • All 24 test files pass (vitest)
  • ultracite check passes with no errors

… 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
@semanticdiff-com

semanticdiff-com Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  src/extension.ts  13% smaller
  .opencode/opencode.json  0% smaller

@sonarqubecloud

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 14 complexity · 0 duplication

Metric Results
Complexity 14
Duplication 0

View in Codacy

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.

@selfagency
selfagency merged commit 2096f89 into main Jul 16, 2026
14 checks passed
@selfagency
selfagency deleted the fix/gh-issue-remediations branch July 16, 2026 03:14
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.73913% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.39%. Comparing base (c5ba153) to head (234fdd9).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/extension.ts 21.73% 15 Missing and 3 partials ⚠️
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     
Flag Coverage Δ
unittests 63.39% <21.73%> (-0.30%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant