Commit Graph

28 Commits

Author SHA1 Message Date
Vincent Koc 04c8d418e6 refactor(ollama): share resident model discovery 2026-08-03 12:23:52 +08:00
Peter Steinberger 865a7286c8 fix(ollama): honor model requests and pull completion contracts (#117171)
Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-07-31 20:19:57 -07:00
zw-xysk d2b869eda7 fix(ollama): models advertise tools when /api/show fails (#109971)
* fix(ollama): do not advertise tools when /api/show fails

Failed show responses left capabilities undefined, which
buildOllamaModelDefinition treats as optimistic supportsTools.
Match setup inspect: return empty capabilities instead.

* test(ollama): cover show-fail tools gate including L3 live HTTP

Unit paths for HTTP error/throw plus real 127.0.0.1 server proving
buildOllamaProvider keeps supportsTools false when /api/show 500s.

* fix(ollama): keep reasoning heuristics when /api/show fails

Distinguish failed inspection from authoritative empty capabilities
so tools stay conservative without suppressing model-name reasoning.

* test(ollama): cover three capability states for tools and reasoning

Failed show keeps reasoning heuristics; authoritative [] disables both.

* fix(ollama): propagate showInspectionFailed through setup configs

Setup inspection failures now use the three-state marker instead of
authoritative empty capabilities, keeping tools off and reasoning heuristics.

* test(ollama): setup show-fail keeps tools off and reasoning heuristics

Cover interactive setup when /api/show returns 500 for deepseek-r1.

* fix(ollama): propagate showInspectionFailed through dynamic model resolve

/models add dynamic path now builds failed-show definitions with tools
off while preserving reasoning name heuristics.

* test(ollama): dynamic resolve covers failed /api/show three-state behavior

Mock builder matches production tools/reasoning contract for inspection failure.

* fix(ollama): keep catalog-missing dynamic resolve fail-closed on show failure

Failed /api/show is an existence probe for unresolved models; return undefined so typos/404s stay rejected. Tag-discovered and setup paths keep showInspectionFailed tools-off behavior.

* chore(changelog): remove release-owned entry

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-07-31 17:37:48 +08:00
Peter Steinberger 8e1ea3048c refactor(ollama): unify model inspection and setup (#115879) 2026-07-29 08:27:41 -04:00
Peter Steinberger a92f85e642 fix(node): cancel remote commands and stabilize local inference (#114935) 2026-07-28 01:03:25 -04:00
RileyJJY 6de4b47203 fix(ollama): release failed discovery bodies (#109967)
* fix(ollama): release failed discovery bodies

* test(ollama): prove failed discovery sockets close

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-27 22:20:15 -04:00
Peter Steinberger 2a5ad61ce9 feat(system-agent): constrain planner JSON output at generation time (#113482)
* feat(system-agent): constrain planner JSON output

* fix(ai): align response format request typing

* fix(ai): preserve response format backend contracts
2026-07-24 21:00:28 -07:00
WhatsSkiLL feb529fd2b fix(ollama): preserve cloud model context windows (#112430)
* fix(ollama): preserve cloud model context windows

* fix(ollama): recognize cloud model source forms

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>

---------

Co-authored-by: IWhatsskill <284122573+IWhatsskill@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-21 22:45:03 -07:00
Peter Steinberger 784ede0af1 feat(system-agent): local-model viability — context cap, thinking off, route-aware timeout (#109445)
* feat: improve system agent local model viability

* fix: forward Ollama effective context cap

* fix(system-agent): keep flat 120s agent-turn budget

* fix(system-agent): keep manifests timeout helper module-local
2026-07-16 18:11:22 -07:00
Peter Steinberger 42591653de refactor(extensions): trim provider and channel internals (#107817)
* refactor(ollama): privatize internal plugin surfaces

* refactor(openshell): privatize internal plugin surfaces

* refactor(lmstudio): privatize internal plugin surfaces

* refactor(signal): privatize internal plugin surfaces

* refactor(whatsapp): privatize internal plugin surfaces

* chore(deadcode): shrink extension export baseline
2026-07-14 15:38:39 -07:00
Peter Steinberger f8fb478e4c refactor(ollama): trim internal exports (#107296) 2026-07-14 01:32:48 -07:00
Peter Steinberger 81941f2d68 test: enable noUncheckedIndexedAccess for extension tests (#105343) 2026-07-12 12:48:22 +01:00
Alix-007 d1c2934d0d fix(ollama): bound model-discovery JSON response reads (#96027)
* fix(ollama): bound model-discovery JSON response reads

The /api/tags and /api/show discovery reads in extensions/ollama/src/provider-models.ts
parsed their HTTP responses with an unbounded await response.json(). Ollama base URLs
are user-supplied and can point at remote/cloud endpoints, so a hostile or buggy server
(or one reachable via SSRF) could stream an unbounded or never-ending JSON body and drive
model discovery into OOM.

Route both reads through the shared @openclaw/media-core byte-bounded reader
(readResponseWithLimit, re-exported via openclaw/plugin-sdk/response-limit-runtime) under
a single 16 MiB cap before JSON.parse, cancelling the stream on overflow. Overflow throws a
bounded error that the existing fail-soft handlers swallow, so a capped endpoint degrades
gracefully: /api/tags returns { reachable: false, models: [] } and /api/show returns {}.

Symmetric counterpart to the #95103/#95108 response-limit campaign.

AI-assisted.

* fix(ollama): reuse shared bounded JSON reader for model discovery

Replace the local readOllamaDiscoveryJson helper with the shared
readProviderJsonResponse (from openclaw/plugin-sdk/provider-http), which
already enforces the 16 MiB cap, cancels the stream on overflow, and wraps
malformed JSON with the caller label. The /api/tags and /api/show discovery
reads now go through it directly while keeping the existing fail-soft
handlers ({ reachable: false, models: [] } and {}).

Add a focused regression test: when a discovery stream exceeds the JSON byte
cap, fetchOllamaModels returns { reachable: false, models: [] },
queryOllamaModelShowInfo returns {}, and the bounded reader cancels the body
mid-flight so less than the full advertised stream is read.
2026-06-24 10:58:13 -04:00
Peter Steinberger 11484f8a14 fix(ollama): support GLM-5.2 cloud discovery 2026-06-21 19:00:15 -04:00
Peter Steinberger 96e5812426 docs: document medium extension sources 2026-06-04 21:33:54 -04:00
clawsweeper[bot] 5e0850fc54 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 27527716c0.
- Required merge gates passed before the squash merge.

Prepared head SHA: 27527716c0
Review: https://github.com/openclaw/openclaw/pull/84075#issuecomment-4486492661

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>
2026-05-19 09:51:24 +00:00
Peter Steinberger a1b89317a8 fix(ollama): keep DeepSeek cloud thinking enabled 2026-05-10 01:49:43 +01:00
Peter Steinberger f34b41f198 refactor: split plugin sdk test helpers 2026-04-28 01:14:19 +01:00
Peter Steinberger 74e62c32c3 test: route extension tests through sdk subpaths 2026-04-27 21:58:48 +01:00
Peter Steinberger 930b443c9e fix(ollama): preserve streaming usage compat 2026-04-27 20:54:22 +01:00
Peter Steinberger 69daef8246 fix: honor Ollama Modelfile num_ctx discovery 2026-04-27 02:32:30 +01:00
Peter Steinberger 7a4574376a fix(ollama): honor native model capabilities 2026-04-26 21:40:22 +01:00
Luke 3da58226bf Ollama: cache model show metadata (#64753)
Merged via squash.

Prepared head SHA: de56dfb916
Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com>
Co-authored-by: ImLukeF <92253590+ImLukeF@users.noreply.github.com>
Reviewed-by: @ImLukeF
2026-04-11 22:30:24 +10:00
Bruce MacDonald 86f35a9bc0 chore(ollama): update suggested onboarding models (#62626)
Merged via squash.

Prepared head SHA: 48c083b88a
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Reviewed-by: @BruceMacD
2026-04-07 11:42:29 -07:00
Bruce MacDonald ac3f55504c feat(ollama): detect vision capability from /api/show and set image i… (#62193)
Merged via squash.

Prepared head SHA: 85f85d1036
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Co-authored-by: BruceMacD <5853428+BruceMacD@users.noreply.github.com>
Reviewed-by: @BruceMacD
2026-04-06 17:29:40 -07:00
Vincent Koc 2a04d5c16f test(extensions): narrow utility test helper imports 2026-04-03 21:23:47 +09:00
Peter Steinberger 8861cdbb6f refactor(plugin-sdk): untangle extension test seams 2026-03-29 23:43:53 +01:00
Peter Steinberger 8ddeada97d test: move extension-owned coverage into plugins 2026-03-27 15:11:33 +00:00