Skip to content

fix(ollama): strip inline kimi cloud reasoning leak#86515

Merged
clawsweeper[bot] merged 13 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-86286
May 25, 2026
Merged

fix(ollama): strip inline kimi cloud reasoning leak#86515
clawsweeper[bot] merged 13 commits into
mainfrom
clawsweeper/automerge-openclaw-openclaw-86286

Conversation

@clawsweeper

@clawsweeper clawsweeper Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Makes #86286 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.

ClawSweeper 🐠 replacement reef notes:

  • Repair fallback: GitHub rejected the repair branch push because it updates workflow files and the ClawSweeper app token does not have workflows permission

Inherited issue-closing references from the source PR:
Fixes #86129

Co-author credit kept:

fish notes: model gpt-5.5, reasoning high; reviewed against b709229.

@clawsweeper clawsweeper Bot added size: L clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge proof: supplied External PR includes structured after-fix real behavior proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 25, 2026
@openclaw-barnacle openclaw-barnacle Bot added extensions: ollama and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. labels May 25, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. clawsweeper Tracked by ClawSweeper automation labels May 25, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: supplied External PR includes structured after-fix real behavior proof. label May 25, 2026
@clawsweeper

clawsweeper Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

Codex review: passed. Reviewed May 25, 2026, 11:12 AM ET / 15:12 UTC.

Summary
This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.

PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.

Reproducibility: yes. from source and the linked report: current main appends Ollama message.content directly into streamed and final visible output, so the boundary-delimited Kimi payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none

Risk before merge

  • The sanitizer rewrites and buffers Kimi :cloud visible text; a wrong boundary heuristic can suppress valid output or allow hidden reasoning through, so this needs explicit maintainer acceptance despite green tests.
  • The streaming sanitizer intentionally bypasses the pending window after 512 characters to keep markerless answers moving; that bounds latency but leaves a possible long-prefix leak edge if the real delimiter arrives later.

Maintainer options:

  1. Proceed with scoped sanitizer (recommended)
    Land after required checks if maintainers accept that Kimi :cloud output is heuristically buffered and rewritten to prevent visible reasoning leaks.
  2. Tighten long-prefix behavior first
    Before merge, adjust the 512-character bypass or add focused coverage for longer observed prefixes if maintainers want stronger leak prevention over streaming latency.
  3. Pause for natural vendor capture
    Pause merge if maintainers require proof from a naturally reproducing live Ollama Kimi cloud response rather than the local compatible stream shape used here.

Next step before merge
No automated repair is needed from this review; the PR is already automerge-opted with no blocking findings, leaving CI and maintainer risk acceptance as the next gate.

Security
Cleared: No new dependency, workflow, secret, or supply-chain concern was found; the security-sensitive content-rewrite tradeoff is captured as merge risk.

Review details

Best possible solution:

Land the scoped Ollama-plugin sanitizer once required checks pass and maintainers accept the bounded Kimi-cloud heuristic, keeping any broader provider-independent reasoning handling as separate work.

Do we have a high-confidence way to reproduce the issue?

Yes, from source and the linked report: current main appends Ollama message.content directly into streamed and final visible output, so the boundary-delimited Kimi payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Is this the best way to solve the issue?

Yes, this is the narrowest maintainable path I found: it stays inside the Ollama plugin, scopes to Kimi cloud refs, handles final and streaming output, and covers sibling non-Kimi behavior. The bounded streaming heuristic remains the main maintainer tradeoff.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 8da8bc4aadfc.

Label changes

Label justifications:

  • P1: The PR addresses user-visible leakage of model reasoning from an active provider path, which can affect real chat workflows across channels.
  • merge-risk: 🚨 message-delivery: The patch changes how streamed text_delta, text_end, partial, and done content are buffered and emitted for Kimi cloud responses.
  • merge-risk: 🚨 security-boundary: The patch is meant to protect hidden reasoning from becoming visible, and an incorrect heuristic could still expose or wrongly strip sensitive assistant-internal text.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 🚀 automerge armed: This PR is in ClawSweeper's automerge lane. Sufficient (terminal): The PR body inherits after-fix terminal proof from the source PR showing the real Ollama stream parser/event builder emitted only cleaned text in text_delta, text_end, and done output.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body inherits after-fix terminal proof from the source PR showing the real Ollama stream parser/event builder emitted only cleaned text in text_delta, text_end, and done output.
Evidence reviewed

PR surface:

Source +183, Tests +473, Docs +1. Total +657 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 5 240 57 +183
Tests 1 474 1 +473
Docs 1 1 0 +1
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 715 58 +657

What I checked:

  • Current main still lacks response sanitization: On origin/main, the Ollama stream path still accumulates raw message content and assigns it to the final assistant message; a grep for the new sanitizer symbols returned no matches. (extensions/ollama/src/stream.ts:1288, 8da8bc4aadfc)
  • PR adds scoped Kimi-cloud sanitizer: The PR scopes sanitization to provider-qualified or bare kimi-k*:cloud refs and strips text after the observed variation-selector boundary only when the prefix is long enough to look like reasoning. (extensions/ollama/src/sanitizers/kimi-inline-reasoning.ts:15, b7092291573f)
  • PR wires sanitizer into final and streaming output: The final-message builder sanitizes visible content by default, while the streaming path accumulates raw content separately, flushes only resolved visible content, and avoids double-sanitizing the final streamed message. (extensions/ollama/src/stream.ts:965, b7092291573f)
  • Regression coverage covers final and streaming surfaces: New tests cover final-message stripping, provider-qualified refs, non-Kimi preservation, streaming buffering, cleaned text_delta/text_end/done output, and avoiding double-sanitization. (extensions/ollama/src/stream-runtime.test.ts:949, b7092291573f)
  • Real behavior proof supplied in source PR body: The inherited proof ran the real Ollama stream parser/event builder against a local Ollama-compatible NDJSON server and showed only Final answer only. in text_delta, text_end, and done output. (b7092291573f)
  • Read-only syntax sanity passed: The PR diff has no whitespace-error output from git diff --check. (b7092291573f)

Likely related people:

  • steipete: Git history on the central Ollama stream/runtime files shows recent current-main work and the imported current stream implementation under Peter Steinberger, including the provider-runtime move and later Ollama stream/test updates. (role: recent area contributor; confidence: high; commits: 64bf80d4d50c, a374c3a5bfd5, f950132207f8; files: extensions/ollama/src/stream.ts, extensions/ollama/src/stream-runtime.test.ts)
  • osolmaz: The PR body records @osolmaz as the automerge requester, and the PR history shows multiple commits by Onur Solmaz adding the stream-buffering and sanitizer refinements. (role: replacement repair contributor; confidence: medium; commits: 1835bd2d4aad, 4a0796d051c0, ed9583454edc; files: extensions/ollama/src/stream.ts, extensions/ollama/src/stream-runtime.test.ts)
  • jason-allen-oneal: The replacement PR credits the closed source PR, and the local PR commit history shows Jason O'Neal authored the initial sanitizer fix commits that this branch carries forward. (role: source fix contributor; confidence: medium; commits: cb270d0e346b, 6cd71de3fc54; files: extensions/ollama/src/stream.ts, extensions/ollama/src/stream-runtime.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels May 25, 2026
@clawsweeper clawsweeper Bot added the status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane. label May 25, 2026
@clawsweeper

clawsweeper Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

ClawSweeper PR egg

✨ Hatched: 🥚 common Velvet Merge Sprite

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: polishes edge cases.
Image traits: location artifact grotto; accessory miniature diff map; palette charcoal, cyan, and signal green; mood bright-eyed; pose leaning over a miniature review desk; shell starlit enamel shell; lighting soft underwater shimmer; background subtle branch markers.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Velvet Merge Sprite in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@clawsweeper

clawsweeper Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

🦞✅
ClawSweeper merged this PR after the passing review.

Source: clawsweeper[bot]
Feedback: structured ClawSweeper verdict: pass (sha=b7092291573f9951977adc519f66d989e0ddb3b7)
Merge status: merged by ClawSweeper automerge
Merged at: 2026-05-25T15:16:43Z
Merge commit: c4bce00727ec

What merged:

  • This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
  • PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
  • Reproducibility: yes. from source and the linked report: current main appends Ollama message.content direc ... payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:

  • PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
  • PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
  • PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
  • PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
  • PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
  • PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

The automerge loop is complete.

Automerge progress:

  • 2026-05-25 15:16:30 UTC review passed b7092291573f (structured ClawSweeper verdict: pass (sha=b7092291573f9951977adc519f66d989e0ddb...)
  • 2026-05-25 14:29:57 UTC merge check queued b7092291573f (checks and exact-head review are ready)
  • 2026-05-25 15:06:10 UTC review queued b7092291573f (queued)
  • 2026-05-25 15:16:46 UTC merged b7092291573f (merged by ClawSweeper automerge)

@clawsweeper clawsweeper Bot merged commit c4bce00 into main May 25, 2026
250 of 272 checks passed
@clawsweeper clawsweeper Bot deleted the clawsweeper/automerge-openclaw-openclaw-86286 branch May 25, 2026 15:16
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 26, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Summary:
- This PR adds an Ollama Kimi-cloud visible-content sanitizer for streamed and final assistant replies, updates stream handling and regression tests, and adds a changelog entry.
- PR surface: Source +183, Tests +473, Docs +1. Total +657 across 7 files.
- Reproducibility: yes. from source and the linked report: current main appends Ollama `message.content` direc ...  payload described in the issue would be shown. I did not run a live vendor repro in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(ollama): sanitize kimi inline reasoning in stream events
- PR branch already contained follow-up commit before automerge: fix(ollama): buffer kimi cloud stream reasoning
- PR branch already contained follow-up commit before automerge: fix(ollama): cover kimi inline boundary variants
- PR branch already contained follow-up commit before automerge: fix(ollama): preserve text start partial state
- PR branch already contained follow-up commit before automerge: fix(ollama): bound kimi stream sanitizer hold
- PR branch already contained follow-up commit before automerge: fix(ollama): keep kimi sanitizer deltas append-only

Validation:
- ClawSweeper review passed for head b709229.
- Required merge gates passed before the squash merge.

Prepared head SHA: b709229
Review: openclaw#86515 (comment)

Co-authored-by: Jason O'Neal <jason.allen.oneal@gmail.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:automerge Maintainer opted this PR into bounded ClawSweeper-reviewed automerge clawsweeper Tracked by ClawSweeper automation extensions: ollama merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 🚀 automerge armed This PR is in ClawSweeper's automerge lane.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ollama provider: missing response-level reasoning stripper for Kimi models causes inline reasoning leak to chat

2 participants