Skip to content

Conversation

@VisargD
Copy link
Collaborator

@VisargD VisargD commented Mar 29, 2025

Code Quality new feature

Title: Feat: anthropic thinking json to stream transform

🔄 What Changed

  • Fixed bug in Anthropic and Vertex AI providers to correctly check for partial_json using undefined check instead of truthy check
  • Added caching support for Anthropic thinking responses
  • Enhanced Bedrock chat completion to check for empty content blocks
  • Added comprehensive support for content_blocks in OpenAI chat completion JSON to stream transformation
  • Created new ContentBlockChunk type definition

🔍 Impact of the Change

  • Improves handling of streaming responses from various AI providers
  • Enables proper transformation of JSON responses with thinking blocks to stream format
  • Ensures empty tool call chunks are handled correctly
  • Provides better support for content blocks in streaming responses

📁 Total Files Changed

  • 5 files modified with 122 additions and 4 deletions

🧪 Test Added

N/A

🔒 Security Vulnerabilities

N/A

Motivation:

  • Fixes issues with Anthropic thinking feature and JSON streaming transformations
  • Improves compatibility with various AI provider response formats
  • Enhances support for content blocks in streaming responses

Related Issues:
N/A

@VisargD VisargD changed the title Featanthropic thinking json to stream transform Feat: anthropic thinking json to stream transform Mar 29, 2025
@VisargD
Copy link
Collaborator Author

VisargD commented Mar 29, 2025

Created this PR from the existing PR with some minor changes: #1005 @narengogi

@VisargD VisargD merged commit 7f85166 into main Mar 29, 2025
1 check passed
@VisargD VisargD deleted the feat/anthropic-thinking-json-to-stream-transform branch March 29, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants