-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Open
Description
Problem
When switching from Cerebras GLM 4.7 to Claude Opus 4.5 in the same session, I get this error:
messages.1: all messages must have non-empty content except for the optional final assistant message
This makes it impossible to switch between models during development sessions.
Steps to Reproduce
- Start a session with
buildagent (Cerebras GLM 4.7) - Send a few messages
- Switch to
planagent (Claude Opus 4.5 with extended thinking) - Try to send a message
- Error occurs
Environment
- OpenCode version: 1.1.49
- Provider: Cerebras (GLM 4.7) → Anthropic (Opus 4.5)
- OS: macOS
Related Issues
- Error: Invalid
signatureinthinkingblock #6418 - Invalid signature in thinking block (different error but related to model switching) - AI_APICallError: messages.157: all messages must have non-empty content except for the optional final assistant message #2655 - Empty message content (closed, PR fix: only keep aborted messages if they have sufficient parts #2651 merged)
- Interrupted thinking-only message causes 400 error (patch part bypasses filter) #9042 - Interrupted thinking-only message (closed)
- Empty message content causes Anthropic API errors during compaction #6446 - Empty message content during compaction (closed)
Notes
- PR fix: ensure switching anthropic models mid convo on copilot works without errors, fix issue with reasoning opaque not being picked up for gemini models #11569 was merged before v1.1.49 release but doesn't seem to fix this specific case
- PR fix: strip incompatible thinking blocks when switching to Claude (improved) #11882 is open but has failing tests
- This is a critical blocker for workflows that require switching between GLM and Claude models
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels