Skip to content

fix(spine): keep the opening of thinking-model answers (bump openhuman for tinyinference list content) - #116

Merged
senamakel merged 7 commits into
mainfrom
list-content-sse
Nov 11, 2026
Merged

senamakel merged 7 commits into
mainfrom
list-content-sse

Conversation

@senamakel

@senamakel senamakel commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Bug

The spine's local-openai provider talks to Surplus (glm-5.3-flash, OpenAI-compatible streaming /chat/completions). When the model thinks first, Surplus streams delta.content as a list of typed parts. Raw frames captured live on 2026-11-11:

thinking-only:  "content": [{"type":"thinking","thinking":[{"type":"text","text":" user wants"}],"closed":false}]
transition:     "content": [{"type":"thinking","thinking":[{"type":"text","text":"."}],"closed":true}, {"type":"text","text":"ALPHA BRAVO"}]
then:           "content": " CHARLIE"

tinyinference typed content as Option<String>, and its SSE parser silently skipped any chunk that failed to deserialize. The transition chunk carries the first visible words, so they went with it. About 1 reply in 3 lost its opening ("ALPHA BRAVO CHARLIE" became " BRAVO CHARLIE" / " CHARLIE"). That broke:

  • the guard judge's JSON ({"reason lost)
  • the nightly reflect ({"memory": "# lost: "no JSON object in the answer")
  • every draft

When the model doesn't think, every chunk is a plain string and nothing was lost.

Fix (upstream, in the owning repo)

tinyhumansai/tinyinference#150 accepts content as a string or a list of parts:

  • text parts are visible text.
  • thinking / reasoning parts go to the reasoning channel, like reasoning_content, and never become visible.
  • Unknown parts are skipped.
  • Within a chunk, reasoning streams before text.

Non-streaming responses get the same treatment. A chunk that still cannot be read is now warned about (the truncated payload only at DEBUG), not dropped silently.

This PR

Bumps vendor/openhuman from 1a97319 to a8e10dff30. Nothing else.

Other tinyinference copies nested in openhuman (tinycomputer/, tinysecurity/, tinyjuice/vendor/tinyagents/, tinyvoice/vendor/tinyagents/) are not on the spine's patched path and are untouched.

Verification

  • tinyinference: 6 new tests fail before the fix and pass after it. The exact captured frames gave " CHARLIE" before the fix and "ALPHA BRAVO CHARLIE" (reasoning " user wants.") after. A plain-string guard test passes before and after. cargo test -p tinyinference-llm: 871 passed. fmt, clippy -D warnings and doc are clean.
  • cargo build --release --locked -p teeny-spine from this branch's root: passes (no CARGO_TARGET_DIR, no lockfile change).

Merge order

tinyhumansai/tinyinference#150 → tinyhumansai/tinyagents#609 → tinyhumansai/openhuman#8671 (and #8670) → this. Use merge commits, not squash, so the pinned heads stay reachable.

Refs tinyhumansai/tinyinference#150
Refs tinyhumansai/tinyagents#609
Refs tinyhumansai/openhuman#8671
Refs tinyhumansai/openhuman#8670

senamakel and others added 7 commits November 11, 2026 21:34
Add the captured output of the target build so the build results are available for reference.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extend the captured build log with the additional crates compiled during the latest build, keeping the recorded output in sync with the current dependency graph.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extend the captured build log with the remaining compilation output from the list-content-sse worktree build, including the openhuman-core and vendored tiny* crates.

Auto-committed-on: cuttlefish
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ening

Moves vendor/openhuman to 04b9aa90f7 (tinyhumansai/openhuman#8671), which carries
tinyhumansai/tinyinference#150 through tinyhumansai/tinyagents#609. The
OpenAI-compatible provider used by local-openai now reads delta/message content
sent as a list of thinking and text parts (Surplus glm-5.3-flash) instead of
dropping the chunk and the first words of the answer with it.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Resolves the vendor/openhuman gitlink to 4e3e643c65: main's pin 1a97319
(headless-keyring, tinyhumansai/openhuman#8670) plus the tinyagents bump that
carries tinyhumansai/tinyinference#150.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Same composite pin (headless-keyring 1a97319 + the tinyagents bump), now
carrying tinyinference 3c4aa88: a skipped SSE chunk's truncated payload is
logged at DEBUG, not on the WARN line.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit e90c212 into main Nov 11, 2026
7 of 8 checks passed
@senamakel
senamakel deleted the list-content-sse branch November 12, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant