* fix: strip invalid thinking signatures from aborted/errored messages When a stream is interrupted mid-response, thinking blocks may have empty or partial cryptographic signatures. These get persisted to session history and sent on the next API call, causing: 'Invalid signature in thinking block' transformMessages() now detects aborted/errored assistant messages and clears thinkingSignature fields so they are treated as unsigned thinking (converted to text by the serializer). Also protect truncateForPersistence from corrupting signatures — clear them entirely instead of truncating, since a partial signature is always invalid. * fix: disable thinking when tool_choice forces tool use on Bedrock Bedrock rejects requests that combine extended thinking with forced tool_choice (any or specific tool). The Anthropic provider already had a guard (disableThinkingIfToolChoiceForced) but the Bedrock provider was missing the equivalent check. Also fix thinking block serialization: when a thinking block has no valid signature (e.g., from an aborted stream), convert it to plain text instead of sending it as reasoningContent without a signature. The API requires the signature field on all reasoning blocks for models that support it. Add thinking block diagnostics to error messages for signature/thinking related failures to aid debugging.
@oh-my-pi/pi-coding-agent
Core implementation package for the omp coding agent in the oh-my-pi monorepo.
For installation, setup, provider configuration, model roles, slash commands, and full CLI reference, see:
Package-specific references: