mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-16 07:33:06 +08:00
AnthropicContentBlock / antigravity ClaudeContentItem serialized `signature` with omitempty, so thinking blocks without an upstream signature (Chat Completions reasoning_content, Responses reasoning without encrypted_content, every streamed thinking content_block_start) went out with no `signature` key. Anthropic always sends the key (`""` on content_block_start). Strict clients such as Grok Build deserialize it as a required field and abort the response or SSE stream with "missing field `signature`". - apicompat: thinking MarshalJSON always emits `thinking` and `signature` - antigravity: ClaudeContentItem MarshalJSON does the same; streamed thinking content_block_start carries `signature: ""` - tests: wire-shape regression tests; update TestStreamingReasoning expectation Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>