Skip to content

Commit 5e0850f

Browse files
clawsweeper[bot]dutifulbobosolmaz
authored
fix(ollama): default unknown capabilities to tools (#84075)
Summary: - The branch makes unknown-capabilities Ollama model definitions explicitly tool-capable, adds regression assertions and changelog text, and guards the issue-labeler job to run only on issue events. - Reproducibility: yes. for the metadata gap: current main builds unknown-capabilities Ollama models without a ... er-fix live provider output with `supportsTools: true`. I did not run local tests in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(ollama): default unknown capabilities to tools Validation: - ClawSweeper review passed for head 2752771. - Required merge gates passed before the squash merge. Prepared head SHA: 2752771 Review: #84075 (comment) Co-authored-by: Bob <dutifulbob@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: osolmaz Co-authored-by: osolmaz <2453968+osolmaz@users.noreply.github.com>
1 parent 1c1c75d commit 5e0850f

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ jobs:
760760
core.info(`Processed ${processed} pull requests.`);
761761
762762
label-issues:
763+
if: github.event_name == 'issues'
763764
permissions:
764765
issues: write
765766
runs-on: ubuntu-24.04

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
1010

1111
### Fixes
1212

13+
- Providers/Ollama: default unknown-capabilities models to tool-capable so discovered native Ollama models can use tools when `/api/show` omits capabilities. (#84055) Thanks @dutifulbob.
1314
- Installer/Windows: launch `install.ps1` onboarding as an attached child process so fresh native Windows installs do not freeze visibly at `Starting setup...` or corrupt the wizard's terminal rendering.
1415
- Memory/search: close local embedding providers when active-memory searches time out so pending local model loads and embedding contexts are aborted and released. (#83858) Thanks @brokemac79.
1516
- Agents: include bounded trajectory queued-writer diagnostics in `pi-trajectory-flush` timeout warnings so flush stalls show pending writes, queued bytes, and append state. Fixes #82961. (#82962) Thanks @galiniliev.

extensions/ollama/src/provider-models.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ describe("ollama provider models", () => {
4141
{ name: "llama3:8b", contextWindow: 65536, capabilities: undefined },
4242
{ name: "deepseek-r1:14b", contextWindow: undefined, capabilities: undefined },
4343
]);
44+
expect(
45+
buildOllamaModelDefinition(
46+
enriched[1].name,
47+
enriched[1].contextWindow,
48+
enriched[1].capabilities,
49+
).compat?.supportsTools,
50+
).toBe(true);
4451
});
4552

4653
it("uses Modelfile num_ctx when it expands the discovered context window", async () => {
@@ -284,6 +291,7 @@ describe("ollama provider models", () => {
284291

285292
const noCapabilities = buildOllamaModelDefinition("unknown-model", 65536);
286293
expect(noCapabilities.input).toEqual(["text"]);
294+
expect(noCapabilities.compat?.supportsTools).toBe(true);
287295
expect(noCapabilities.compat?.supportsUsageInStreaming).toBe(true);
288296
});
289297

extensions/ollama/src/provider-models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export function buildOllamaModelDefinition(
255255
: capabilities.includes("thinking"));
256256
const compat =
257257
capabilities === undefined
258-
? { supportsUsageInStreaming: true }
258+
? { supportsTools: true, supportsUsageInStreaming: true }
259259
: {
260260
supportsTools: capabilities.includes("tools"),
261261
supportsUsageInStreaming: true,

0 commit comments

Comments
 (0)