-
Notifications
You must be signed in to change notification settings - Fork 24
Add Strands & Google ADK Integration #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
csgulati09
reviewed
Sep 19, 2025
Failing and getting Type Error while running the boilerplate README code
|
csgulati09
reviewed
Sep 22, 2025
csgulati09
approved these changes
Sep 22, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
PR: Google ADK Integration for Portkey Python SDK (optional)
Motivation
BaseLlm
interface without changing their app code.Summary
LlmResponse
.adk
so normal installs aren’t impacted.What’s included
New adapter
system_role="developer" | "system"
(default"developer"
).tool_choice="auto"
unless the caller overrides it.ImportError
copy:# type: ignore[arg-type]
and# type: ignore[union-attr]
on ADK function-call parts where ADK/GenAI typing is looser than runtime behavior.Packaging
adk
:google-adk
google-genai
Documentation
resp.partial
) to avoid duplicate final output.Example script
PORTKEY_API_KEY
(required)MODEL_SLUG
(optional; defaults to@openai/gpt-4o-mini
)Tests
google-adk
isn’t installed (pytest.importorskip("google.adk")
).Minor improvement
Lint/Type config
line-length=88
to match Black.Usage
Install
pip install 'portkey-ai[adk]'
Streaming (prints only partial chunks to avoid duplicates)
Non‑streaming (single final response)
Options
system_role
: default"developer"
, can be set to"system"
for providers that expect strict system role semantics.tool_choice="auto"
is set by default unless explicitly provided.Local verification
Virtual environment and dev tooling
Lint/format/type
Run tests
Run example
Backwards compatibility
adk
extra and imports only when used.Known limitations and notes
# type: ignore[...]
to keep mypy green without weakening overall typing.Checklist
adk
(google-adk, google-genai)Release notes
pip install 'portkey-ai[adk]'
. Supports streaming, tools, and a configurable system role. Includes examples and tests.