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
Claude Sonnet 4.5 Throws "text content block must contain non-whitespace text" #3375
Using Claude Sonnet 4.5 and GLM.4.6 and switching between them based on the task, after switching from GLM 4.6 to Claude Sonnet 4.5 and sending a message it returns error "messages: text content block must contain non-whitespace text"
OpenCode version
15.4
Steps to reproduce
Start a new session
Use GLM 4.6 to edit some files do somethings
Switch to Claude Sonnet 4.5
Send message
(you might need to switch multiple times between the models to get the error)
ill take a look, its kinda annoying because glm makes those whitespace chunks but sonnet wont accept them so we need to walk the line and handle both things
I think anthropic stopped enforcing this, I cannot replicate this error at all, if anyone can I will gladly reopen just pleaseee attach a session export opencode export > err.json << Select a session from the list that u replicated the error in
Activity
github-actions commentedon Oct 23, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
levniko commentedon Oct 23, 2025
this is happening for me too
Opencode v0.15.14
Claude Opus 4.1
Claude Sonnet 4.5
rekram1-node commentedon Oct 23, 2025
ill take a look, its kinda annoying because glm makes those whitespace chunks but sonnet wont accept them so we need to walk the line and handle both things
rekram1-node commentedon Nov 11, 2025
I think anthropic stopped enforcing this, I cannot replicate this error at all, if anyone can I will gladly reopen just pleaseee attach a session export
opencode export > err.json<< Select a session from the list that u replicated the error in