mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 05:12:26 +00:00
Apple FM's stream_response yields cumulative text snapshots, but OpenAI-compatible clients concatenate delta.content — so streamed responses were duplicated/stuttered (#378). Diff each snapshot against the last and emit only the incremental suffix; fall back to the full snapshot if the model revises earlier text, and skip empty deltas. Rebased on #377 (apple_fm_sdk migration): uses the options= streaming API. Adds a stubbed-SDK regression test asserting deltas are incremental, not cumulative. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>