Preserve valid thinking blocks during recovery
Instead of stripping all thinking blocks during thinking recovery, now only strips invalid or incompatible blocks. Uses signature cache to validate family compatibility for cross-model fallback scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -85,7 +85,7 @@ export function convertAnthropicToGoogle(anthropicRequest) {
|
||||
|
||||
if (isThinking && targetFamily && needsThinkingRecovery(messages, targetFamily)) {
|
||||
logger.debug(`[RequestConverter] Applying thinking recovery for ${targetFamily}`);
|
||||
processedMessages = closeToolLoopForThinking(messages);
|
||||
processedMessages = closeToolLoopForThinking(messages, targetFamily);
|
||||
}
|
||||
|
||||
// Convert messages to contents, then filter unsigned thinking blocks
|
||||
|
||||
Reference in New Issue
Block a user