The second refusal in #1447: OpenCode Go's Claude models answer a
thinking block with a signature and no text,
{"type":"thinking","signature":"abc123"}, with 400 "messages.1.content.0.
thinking.thinking: Field required". Messages requires the field, but
aBlock's Thinking was omitempty, so buildAnthropic dropped it whenever a
signed part had no text: Claude Code's own thinking when its display is
omitted ("thinking": "" with a real signature), and Gemini's signed
parts, translated to an Anthropic upstream.
aBlock now always writes "thinking" on a thinking block (MarshalJSON);
every other block keeps leaving its empty fields out. Only aBlock had
this: the Anthropic reply encoders already write the field as a map.
A separate change from the prefill fix (af1e477d): a different field
and a different refusal.
TestSignedThinkingWithNoTextKeepsTheField fails on the old code ("thinking
block = map[signature:abc123 type:thinking]") and passes now.
Run: gofmt -l (clean), go vet -tags nogui ./internal/gateway on darwin,
GOOS=linux and GOOS=windows, go test -tags nogui ./internal/gateway
./internal/provider ./internal/plugin under a scratch HOME (all ok).
Not run for real: the owner's OpenCode Go subscription is inactive (403).
Which request produced the reporter's messages.25 error from Codex isn't
known: Responses input carries no signatures, so it wasn't this path for
a Codex client's own turns.