Add API gem version testing and fix Anthropic 1.14.0 compatibility #265
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive testing for different versions of API provider gems and fixes compatibility issues with Anthropic gem version 1.14.0.
Changes
🧪 Test Infrastructure
test-api-gemsjob to GitHub Actions workflow to test against multiple versions of API provider gemsgemfiles/directory🐛 Bug Fixes
_json_buffield that appears in tool use content blocks🗑️ Code Cleanup
lib/active_agent/providers/open_router/request.rb(505 lines) - this appears to be unused or stray codeTechnical Details
Anthropic 1.14.0 Changes
The Anthropic gem version 1.14.0 introduced internal changes to how streaming tool calls are handled. This PR patches the streaming response processor to:
_json_buffield from tool use content blocks when processingmessage_stopevents:inputis returned as a JSON string rather than a parsed hashTesting
CI now automatically tests against multiple API gem versions to catch compatibility issues early. All existing tests continue to pass with the new changes.
Breaking Changes
None - these changes maintain backward compatibility while adding support for newer gem versions.