Integrate portkey.ai as multi-provider gateway with tool use support#2
Draft
fede-kamel wants to merge 10 commits intomainfrom
Draft
Integrate portkey.ai as multi-provider gateway with tool use support#2fede-kamel wants to merge 10 commits intomainfrom
fede-kamel wants to merge 10 commits intomainfrom
Conversation
9e10570 to
c790516
Compare
feat: Adding portkey.ai gateway as a custom model feat: Adding portkey.ai gateway as a custom model
…d_truncate_results (strands-agents#192)
…gents#193) Per follow-up to strands-agents#178, where we discussed preventing similar_tool and similar-tool from both being added to the tool registry, to avoid ambiguity in direct-method invocations
* build(a2a): add a2a deps and mitigate otel conflict
7b0b1ee to
f815280
Compare
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.
🚀 Portkey Integration for Strands SDK
Summary
This PR adds first-class support for Portkey, a gateway platform for LLM providers, into the Strands SDK. It enables a unified, configurable, and extensible way to interact with multiple AI models (OpenAI, Anthropic via Bedrock, Gemini, and more) through a single abstraction.
The integration emphasizes tool use and streaming completions, and lays foundational support for future capabilities like multi-modal interactions (images, audio — coming in a future PR).
🔍 What is Portkey?
Portkey is a powerful LLM gateway that provides:
Portkey is becoming the go-to model abstraction layer for companies scaling LLM usage — including Notion, Descript, Ramp, and others — because it makes managing model complexity simple, modular, and scalable.
✅ Supported Model Providers
This integration supports and has been tested with:
🔧 Focus for This PR:
🎯 Why This Matters
Adding Portkey unlocks significant benefits:
tool_callsacross models🌍 Industry Adoption & Strategic Importance
Portkey is not just a convenience — it is a requirement for SDK adoption in many real-world AI systems.
Why We Must Support Portkey:
Leading companies already standardize on Portkey. Without first-class support, these companies cannot use the SDK, as their LLM access, observability, and governance are fully routed through Portkey.
Companies Using Portkey in Production:
📎 Reference: Portkey Customers
Supporting Portkey makes the Strands SDK immediately compatible with the infrastructure already powering major AI systems — greatly reducing integration effort.
🧩 Strands SDK Context
This implementation extends the
Modelinterface within the Strands SDK, Amazon’s agent platform for intelligent task automation.Key Capabilities Enabled:
tool_calls/tool_use)🔍 High-Level Implementation
This PR introduces a new model provider class:
PortkeyModel, implementing the fullModelinterfaceToolSpecmapping and schema encodingAll logic is structured to allow future expansion to other Portkey-supported capabilities (e.g., caching, retry policies, routing rules).
🧪 Testing Scope
This feature was validated across the following dimensions:
🛠️ Next Steps
Related Issues
N/A
Documentation PR
📚 References
Type of Change
Testing
This change has been tested with:
hatch fmt --linterhatch fmt --formatterhatch test --allChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.