Repository navigation
fix: keep Ollama embedding models out of onboarding chat choices - #168075
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR excludes embedding-only Ollama models from saved onboarding chat choices and adds useful recovery guidance for chat and embedding failures. Example: Onboard against Ollama with llama3.2:latest and bge-m3:latest installed.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a remaining onboarding catalog bug on current main. The scoped changes and native CLI evidence support merging; no actionable patch defects were found, and the remaining CI failures match independently verified failures on unrelated work. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Ollama plugin translates discovered model capabilities into onboarding configuration; shared assistant error handling translates provider rejections into live and saved reply text. flowchart TD
A[Ollama model inventory] --> B[Plugin capability inspection]
B --> C[Onboarding catalog producer]
C --> D[Saved chat choices]
E[Ollama request rejection] --> F[Shared error parser]
F --> G[Live and saved recovery text]
Technical reviewBest possible solution: Land the existing producer-side filtering and recovery-copy repair while preserving stored configuration and discovered model metadata. Do we have a high-confidence way to reproduce the issue? Current-main source exposes the unfiltered saved-row producer, and supplied native before/after traces demonstrate the failure; this read-only review ran no target code. Is this the best way to solve the issue? The repair uses the established capability predicate at the configuration producer and existing shared error owners, without changing selection policy or adding downloads. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fdcabd28eed7. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +19, Tests +61, Docs +13. Total +93 across 10 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (10 earlier review cycles; latest 8 shown)
Reviewed October 10, 2026, 6:19 AM ET / 10:19 UTC (Revision 11). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in openclaw#168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance.
…s 401 or 403 (#168500) * fix: malformed tool calls report auth failures when argument length is 401 or 403 * test(tui): expect normalized billing diagnostics Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in #168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance. --------- Co-authored-by: TYY-2005 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…nclaw#168075) * fix: keep Ollama embedding models out of onboarding chat choices * test: align Ollama catalog expectations with embedding filtering * chore: prune stale doctor test line baseline
…s 401 or 403 (openclaw#168500) * fix: malformed tool calls report auth failures when argument length is 401 or 403 * test(tui): expect normalized billing diagnostics Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in openclaw#168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance. --------- Co-authored-by: TYY-2005 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
…s 401 or 403 (#168500) * fix: malformed tool calls report auth failures when argument length is 401 or 403 * test(tui): expect normalized billing diagnostics Preserve the complete billing explanation after the shared error parser began recognizing string-only error bodies in #168075. The raw-envelope expectation failed with both the original and repaired auth matchers. Keep the local TUI regression against misleading auth refresh guidance. --------- Co-authored-by: TYY-2005 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> (cherry picked from commit 3050cdc)
What Problem This Solves
Ollama onboarding saves installed embedding-only models as available chat choices alongside a valid default. Selecting a previously saved embedding model then gives misleading advice to start a new conversation.
User Impact
Both onboarding flows now omit embedding-only chat rows while retaining models that support both chat and embeddings. Existing config is preserved: an Ollama chat rejection now identifies the embedding model and directs users to
/modelor removal frommodels.providers.ollama.models.Missing embedding models now name the manual
ollama pull <model>command. Docs correctly say embeddings are not auto-pulled and explain the preference for an eligible installed setup model. Re-onboarding rebuilds the provider catalog; preserve custom rows first.Why This Change Was Made
The saved-row producer now uses the same embedding-only predicate as discovery and default selection. The canonical error parser accepts Ollama's string-valued error response, and the existing formatter recognizes its specific chat-capability rejection. No additional capability request, selection policy, config migration, or model download is introduced.
Evidence
ceba718446453f55fe989a2ecf1f6d285d7a7217, the Ollama CI job passed (113 s total job wall). That merge-ref aggregate failed; see the CI follow-up and merged-candidate validation below.models listcontains no embedding rows; default remains llama3.2:latest.openclaw agent --local --model ollama/bge-m3:latestusing the old config now reports “is an embedding model and cannot chat; pick a chat model with /model (or remove it from models.providers.ollama.models).” Missing all-minilm throughmemory indexreportsollama pull all-minilm.isTelegramReadOnlyControlLaneText(Telegram),buildDirectChatContext, andresolveContextTokens(reply helpers). This patch removes no imports or exports that could cause those findings. They remain follow-ups. Gateway-only preparation initially omitted QA Lab development dependencies; installing the existing frozen workspace dependencies resolved the extension typecheck failure.Production against the current merged base: +30/-11 (net +19); tests: +70/-9; docs: +15/-2. Added lines provide filtering, native error parsing, and actionable recovery; no unrelated deletion was used to offset them. No prompt/tool definitions changed (token delta 0).
Inspectable native CLI evidence (synthetic isolated state)
The following are selected command-output excerpts from the isolated runs. Catalog output is projected to its count and model keys; generated credentials and unrelated diagnostics are omitted. No agent conversation transcript is included.
pnpm openclaw --profile ollama-onboard onboard --non-interactive --accept-risk --auth-choice ollama --custom-base-url http://127.0.0.1:11434was run with isolated state/workspace and service/channel/UI setup skipped.models list --provider ollama --jsonthen reported:Before (base commit d810d75):
{ "count": 8, "modelKeys": [ "ollama/llama3.2:latest", "ollama/bge-m3:latest", "ollama/embeddinggemma:latest", "ollama/nomic-embed-text:latest", "ollama/qwen2.5:7b", "ollama/qwen3:4b", "ollama/qwen3:8b", "ollama/qwen3.5:4b" ] }After (af4ad29):
{ "count": 5, "modelKeys": [ "ollama/llama3.2:latest", "ollama/qwen2.5:7b", "ollama/qwen3:4b", "ollama/qwen3:8b", "ollama/qwen3.5:4b" ] }Classic interactive QuickStart → Ollama → Local only on the same server also saved no embedding rows. It retained the existing suggested gemma4 row plus the five installed chat models. Its real setup completion check reported:
The old config still contains bge-m3. A native request through
pnpm openclaw --profile ollama-onboard agent --local --model ollama/bge-m3:latest --message 'Reply exactly: EMBED_CHAT_OK' --thinking off --timeout 60 --jsonreturned:{ "ok": false, "error": { "type": "cli_error", "message": "bge\\-m3\\:latest is an embedding model and cannot chat; pick a chat model with /model (or remove it from models.providers.ollama.models)." } }With memory.search.provider=ollama and the absent model all-minilm,
pnpm openclaw --profile ollama-onboard memory index --agent main --force --verbosereturned:These prove native Ollama onboarding, the embedded agent failure path, and memory indexing. No Telegram transport behavior changed or Telegram Test Server proof is claimed.
CI follow-up
Run 38017041527 initially failed four OAuth-recovery cases in
src/agents/model-fallback.reply-entry.e2e.test.tswithAgent database execution generation was replaced. The lead requested a direct PR/main comparison and authorized one retry of only the failed job if the failure did not reproduce on the PR.The exact nine-case file passed twice on both revisions:
ceba7184464522bca7d84ddcceba7184464522bca7d84ddcCommand:
TMPDIR=<isolated lane tmp> node scripts/run-vitest.mjs src/agents/model-fallback.reply-entry.e2e.test.ts --maxWorkers=1. Each checkout was first built usingOPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 pnpm build; the test used the supportedOPENCLAW_E2E_USE_PREBUILT_DIST=1path to reuse those runtime artifacts, with a separate filesystem module cache per checkout. Node 26.10.0; serial test runs; host load averages at run start ranged from about 52 to 65. The first PR run included cold compiled-worker preparation. No tests or source were modified.The diff does touch the error-formatting path. However, these fixtures supply plain OAuth strings: they return before the changed JSON-envelope branch and cannot match the new Ollama chat-rejection regex. The fixture and implicated generation-check/read/result-payload modules are unchanged. The four clean local file runs do not reproduce a PR-only regression and met the lead's condition for one CI retry. Because that retry reproduced the same four failures, the result remains CI-specific and unresolved; neither a harmless flake nor an inherited failure is established.
Only failed job
114109719167was requested for one rerun, under explicit lead authorization. Attempt 2 failed again in job 114125707456: the same OpenAI, minimax-portal, access, and choice OAuth cases hit the generation fence (4 failed, 5 passed). Aggregate gate 114126573728 failed, and the run concluded cancelled. No second retry was requested. No source change or push was made during that investigation. That head wasceba718446453f55fe989a2ecf1f6d285d7a7217; its exact-head ClawSweeper review had no findings or Before merge items.Merged-candidate validation
The CI retry reused the original merge ref. At the maintainer’s request, main was merged locally and the exact ordered eight-file
checks-node-changed-4runner was replayed. The OAuth recovery target passed 9/9 with no generation-fence error (612.51 s invocation); the full replay finished all eight files in 2636.22 s. The shard was not wholly green: one ACP consent case hit its existing 60 s timeout and worker teardown timed out. That distinct host-load failure is retained as a limitation, not presented as a passing shard. The replay used Node 24.21.0 on macOS/arm64; CI used Linux/x64 and a different revision of the same Bun canary version.After #168247 merged, the branch incorporated main
f55b31f50edbb9b7c2fb2c87504c9b3095bb9160without conflicts, preserving connection-failure terminal guidance and the Ollama messages. The only additional authored change removes one stale max-lines baseline entry for the unchanged 877-line Doctor test; the ratchet now passes. Production, test, and docs LOC above are unchanged; baseline maintenance is +0/-1.Candidate:
f1072ee9db907440b90839594b5345eb523631de. All five focused suites passed, 201 tests in 950.16 s including cold fixture compilation. This includes #168247’s terminal-reply connection/DNS/HTTP regressions. Format, core lint, and all seven requested ratchet/docs/inventory checks passed. Runtime-only private-QA build passed in 975.54 s. Fresh independent Codex autoreview is scoped-clean at P2 and above. Extension lint passed in 979.40 s after its SDK declaration preparation used the owner-supportedOPENCLAW_PLUGIN_SDK_BOUNDARY_ROOT_SHIMS_TIMEOUT_MS=900000budget; two prior attempts stopped at the default 300000 ms preparation limit before linting. No lint rule or test timeout changed. The fresh-runtime OAuth recovery file passed all 9 cases in 515.17 s, with no generation-fence errors. It usedOPENCLAW_E2E_USE_PREBUILT_DIST=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 node scripts/run-vitest.mjs src/agents/model-fallback.reply-entry.e2e.test.ts --maxWorkers=1with isolated test temp state and Node 24.21.0. The single authorized push published this head. At that checkpoint GitHub reported a merge conflict because #168166 (b0539fd9aee7642cbc6beeb1703bf59d2016abe4) landed while validation ran. Read-onlygit merge-treeagainst main072215c388c00b1d7195af764d46b2606266b14didentifies onlyextensions/ollama/src/setup-model-selection.ts: retain the embedding-only filter and pass the full discovered metadata intobuildOllamaModelDefinition, preserving model-specific thinking metadata. No new CI run was created for that head;openclaw/ci-gateremained pending. Security and dependency reviews passed. That checkpoint held the second merge/push under the original one-push limit; the maintainer subsequently authorized the conflict repair below. The subsequent ClawSweeper review of that head had no code findings and requested the conflict resolution below.Second authorized merge: thinking metadata preserved
Head
eba298b80eac32d6f3d1d3eea9dc168e47f827b0merges main72eafadc01a01781cd4ac114f9397c02af9b367f. The only conflict wasbuildOllamaModelsConfig: embedding-only models remain filtered, and retained rows pass the full discovered descriptor intobuildOllamaModelDefinition, preserving #168166’s thinking metadata. Other PR implementation files are byte-identical to the previous validated head. No new policy, capability call, migration, or tests were introduced by the resolution.All 236 tests in eight focused files passed (461.31 s wall): embedding-provider, setup-model-selection, setup, thinking-discovery, stream-runtime.thinking-floor, provider-policy-api, assistant-request-failure-copy, and assistant-error-format. Command:
node scripts/run-vitest.mjs <these eight files> --maxWorkers=1, using isolated test temp state and Node 24.21.0. Targeted extension lint passed (456.47 s, with the existing supported SDK declaration-preparation budget), all ten PR files passed format (0.57 s), and all seven required ratchet/config-doc/inventory checks passed. Fresh independent Codex autoreview of the staged candidate before commit was scoped-clean at P2 and above.The earlier max-lines cleanup now exists on main, so it is absent from this PR’s current diff. Current LOC: production +30/-11, tests +70/-9, docs +15/-2; prompt/tool token delta remains 0. A read-only merge check against current main passed immediately before publication.
The second authorized push reached exact-head CI, which has failed as recorded below. The new ClawSweeper verdict is still pending. The maintainer owns the separate Linux/CI generation-fence repair, which also affects an unrelated PR; any new CI failure will be reported without another push or rerun. The prior head’s ClawSweeper review had no findings and requested the conflict repair now completed.
Exact-head CI stop report
CI run 38038436489 is bound to
eba298b80eac32d6f3d1d3eea9dc168e47f827b0. Job 114173858508, check-guards-architecture failed atscripts/check-kysely-guardrails.mts, reporting 14 violations in two files outside this PR’s diff:The remaining diagnostics identify raw identifier helpers at lines 209, 212, 214–218, and 224, plus typed raw SQL at 353, 364, and 408 of the same witness file. Import-cycle checks passed before this failure. Neither those two source files nor the Kysely guard script differs between the merged main parent and this PR head. No new attribution claim or repair was attempted: the maintainer explicitly directed a stop on any failure other than the separately owned OAuth generation-fence issue. The aggregate
openclaw/ci-gatefailed (job 114174742145); fail-fast cancelled the remaining work and the CI run concluded cancelled. No CI rerun or third push was made.Main refresh after shared CI repairs
Head
c1c1699d4802bd2fcc0bfc0c465187f892d93551merges maindb6449d3f6091740dbddcf02fdc0e34dc94ca424(fix(state): satisfy Kysely guardrails for migration witness). Main also contains #167814 (78e6318772e0), identified by the maintainer as the shared OAuth fixture agent-id fix, with Linux Testbox proof for both original shard orders. No conflicts occurred, and all ten PR files are byte-identical to the preceding reviewed head.Fresh local validation: 236 tests across eight focused files passed in 255.15 s; the exact formerly failing Kysely guard (
pnpm lint:kysely) passed in 170.86 s; formatting passed in 0.35 s; core lint passed in 37.30 s and extension lint in 344.07 s. Independent Codex autoreview of the staged candidate was scoped-clean at P2 and above before commit. This refresh adds no authored production code or tests; current diff remains production +30/-11, tests +70/-9, docs +15/-2.All seven required ratchet/config-doc/plugin-inventory checks also passed. A read-only merge check against current main
c18324d1396389c6814e572e35d079f65c9827cbpassed before publication. Exact-head CI has only the authorized inherited UI failure; the exact-head ClawSweeper review is clean, as recorded below. The maintainer permits the inherited Details-gutter UI failures only; any other hosted failure remains a report-and-stop condition.Final CI disposition: READY-WITH-INHERITED-UI
Run 38042670917 tested head
c1c1699d4802bd2fcc0bfc0c465187f892d93551through merge commit96f4209a198b3244fb8624c6fe63eac35e815b87(basec18324d1396389c6814e572e35d079f65c9827cb). The architecture guard and Node changed-4 shard passed. The only root failure was checks-ui-e2e (4/9), job 114186048565: two known inheritedchat-github-publication-guest.e2e.test.tscases could not find the Publish PR button (expected +0 to be 1, lines 142 and 211). That file is unchanged by this PR. This matches the maintainer’s explicit Details-gutter inherited-UI exception.The failing UI shard passed 421 tests and failed those two cases. Overall: 49 successful jobs; only that UI job and aggregate gate failed; UI shards 2/9 and 7/9 were cancelled by fail-fast; 23 conditional jobs were skipped. The run concluded cancelled, and
openclaw/ci-gateremains failed. This is not a claim of green CI. No rerun, UI patch, or further push was made. The lead owns landing through the inherited-failure path.One exact-head ClawSweeper re-review was requested in comment 6096285170. ClawSweeper reviewed
c1c1699d4802bd2fcc0bfc0c465187f892d93551and reported no Findings and no Before merge items. Fresh independent autoreview is clean. Exact-head dependency and security-sensitive reviews passed. The PR remains open and mergeable for the lead’s inherited-failure landing path; nothing was landed by this lane.