Repository navigation
fix(ollama): skip local checks for hosted web search - #129833
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 26, 2026, 3:15 AM ET / 07:15 UTC. ClawSweeper reviewWhat this changesThis PR skips local Ollama daemon/sign-in checks for hosted web search, adds hosted API-key guidance, and documents separate local and hosted setup paths. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the hosted classifier treats any HTTPS URL with hostname Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe bundled Ollama Web Search plugin resolves a plugin-specific or model-provider endpoint before setup and request execution. That endpoint determines whether OpenClaw checks a local daemon/sign-in or sends requests to Ollama Cloud with API-key guidance. flowchart LR
A[Web search selection] --> B[Ollama plugin]
B --> C[Resolve endpoint]
C --> D{Canonical cloud origin?}
D -->|Yes| E[API-key setup and request]
D -->|No| F[Local daemon and sign-in checks]
E --> G[Search result or guidance]
F --> G
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +94, Docs +13. Total +107 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Classify hosted web search only when the resolved endpoint is the canonical Ollama Cloud origin after the supported Do we have a high-confidence way to reproduce the issue? Yes, from the current PR head: configure a non-default-port HTTPS Is this the best way to solve the issue? No: routing by the resolved endpoint is the right owner boundary, but hostname-only matching is broader than the documented canonical Cloud origin and the plugin’s sibling origin comparison. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8c203185d7ed. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
|
Merged via squash.
|
* fix(ollama): skip local checks for hosted web search * fix(ollama): explain hosted search API key requirements * docs(ollama): separate hosted and local search setup
Summary
Direct hosted Ollama Web Search uses the configured Ollama Cloud endpoint and an API key; it does not require a local Ollama daemon or
ollama signin. Existing setup incorrectly probed local daemon/sign-in prerequisites even when both the model-provider endpoint and plugin-specific endpoint selected hosted search.Route the existing prerequisite owner by the actual resolved endpoint. Hosted endpoints check their configured or environment API key and show actionable credential guidance when it is missing; local endpoints retain their existing daemon and sign-in warnings. Hosted HTTP 401 errors now explain the API-key requirement instead of suggesting local sign-in. The FAQ and dedicated Ollama-search guide now provide explicitly separate local and hosted setup paths.
Full branch production: +22/-22 (net 0). Tests: +96/-2.
Verification
Independently inspected Ollama's official Web Search API documentation and authentication documentation. They document
POST https://ollama.com/api/web_search, bearer API-key authentication throughOLLAMA_API_KEY, and localollama signinas a separate local-installation authentication path.Confirmed the actual hosted endpoint's authentication boundary with a credential-free, empty-body request that cannot execute a search:
Actual result:
{"error":"Unauthorized"}andhttp_status=401. No credential, local Ollama service, account, search query, or authenticated request was used. This is live negative authentication-boundary proof, not a claim of authenticated live-search success.Captured three authentic failing registered-provider/runtime cases before repairing the complete owner: hosted model-provider endpoint with no key, hosted plugin-specific override with no key, and hosted 401 authentication guidance.
Verified configured literal credentials, configured environment-marker credentials, ambient
OLLAMA_API_KEY, endpoint precedence, unchanged local daemon/sign-in diagnostics, and both hosted selection paths.Ran five actual Ollama provider, transport, interactive-setup, and noninteractive-setup suites: 187 tests passed; reran the complete changed provider suite after the documentation fix: 31 tests passed.
Ran targeted type-aware lint, formatting,
git diff --check, documentation glossary validation, andpnpm docs:check-config-examples(774 documentation files scanned; 1,194 configuration examples validated).Fresh integrated whole-branch independent P1 review passed with no accepted/actionable findings after all three commits.
Addresses both latest ClawSweeper rank-up moves: explicit local/hosted setup documentation and direct hosted authentication-boundary confirmation with official upstream contract evidence.
Risk
Low: one canonical plugin-owned setup decision, no new configuration, no authentication mechanism changes, no persistent state, no change to legitimate hosted or local search requests, and unchanged production line count.