Add API gem version testing and fix Anthropic 1.14.0 compatibility#265
Merged
TonsOfFun merged 3 commits intoactiveagents:mainfrom Nov 11, 2025
Merged
Add API gem version testing and fix Anthropic 1.14.0 compatibility#265TonsOfFun merged 3 commits intoactiveagents:mainfrom
TonsOfFun merged 3 commits intoactiveagents:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the test infrastructure by adding multi-version testing for API provider gems and fixes compatibility issues with Anthropic gem version 1.14.0, which introduced changes to how streaming tool calls are handled.
- Added CI matrix testing for multiple versions of Anthropic (1.12.x, 1.14.x) and OpenAI (0.34.x, 0.35.x) gems
- Fixed streaming message processing to handle internal
_json_buffield and string-based tool inputs in Anthropic 1.14.0 - Removed unused OpenRouter types file
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/active_agent/providers/anthropic_provider.rb | Adds compatibility patches for Anthropic 1.14.0 to strip internal fields and handle JSON string inputs |
| lib/active_agent/generation_provider/open_router/types.rb | Removes entire unused file (505 lines) |
| gemfiles/anthropic_1.12.gemfile | Adds gemfile for testing with Anthropic 1.12.x |
| gemfiles/anthropic_1.14.gemfile | Adds gemfile for testing with Anthropic 1.14.x |
| gemfiles/openai_0.34.gemfile | Adds gemfile for testing with OpenAI 0.34.x |
| gemfiles/openai_0.35.gemfile | Adds gemfile for testing with OpenAI 0.35.x |
| .github/workflows/ci.yml | Adds new test-api-gems job with matrix testing across API provider versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.