Skip to content

fix: workarounds for recent Anthropic type changes#196

Merged
cpsievert merged 2 commits into
mainfrom
fix/anthropic-types
Oct 29, 2025
Merged

fix: workarounds for recent Anthropic type changes#196
cpsievert merged 2 commits into
mainfrom
fix/anthropic-types

Conversation

@cpsievert

@cpsievert cpsievert commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator

Follow up to #194 and fix types for Anthropic's latest changes in types

@cpsievert cpsievert requested a review from Copilot October 29, 2025 17:35
@cpsievert cpsievert marked this pull request as ready for review October 29, 2025 17:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses type compatibility issues that emerged from recent changes to the Anthropic API's type definitions. The changes add type casts and workarounds to handle situations where the Anthropic library changed certain field types (notably from object to dict for the input field).

Key Changes:

  • Added type ignore comments and explicit casts to handle the changed type of ToolUseBlock.input during streaming
  • Added a cast when passing tool arguments to ensure dict type compatibility
  • Refactored tool schema construction to avoid direct property assignment type issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cpsievert cpsievert merged commit 84f10b0 into main Oct 29, 2025
4 of 7 checks passed
@cpsievert cpsievert deleted the fix/anthropic-types branch November 6, 2025 15:33
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.

2 participants