You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Empty reasoning step (no delta) in replayed history causes 400 on later Kimi K3 requests #37651
Multi-turn sessions with opencode-go/kimi-k3 (max variant) start failing with Error from provider (Console Go): Upstream request failed (HTTP 400) once the history contains an assistant step where the provider opened and closed a reasoning stream without emitting any delta. Every later request in that session fails; a fresh session works until it hits the same history shape.
This is the second, independent failure path originally documented in #37552. That issue was closed when models.dev#3331 fixed the temperature path (thanks for the fast fix) — but this replay path does not involve temperature at all and still reproduces after the catalog fix.
Root cause
MessageV2.toModelMessages replays a reasoning part with empty text and no metadata (between duplicate step-start boundaries) as an assistant message with no usable content, which the upstream endpoint rejects.
Evidence
Reproduced with a minimal config ("model": "opencode-go/kimi-k3" only — no agent files, no temperature anywhere).
A/B: the exact affected session replayed through a build patched to skip empty metadata-free reasoning parts continued for 26 steps and finished normally; the same session on stock source fails immediately. Identical catalog and provider conditions in both runs.
Activity
github-actions commentedon Sep 17, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.