Skip to content

feat: support injecting custom LLM clients into Gemini and AnthropicLlm#5035

Open
brucearctor wants to merge 2 commits intogoogle:mainfrom
brucearctor:feature/5027-custom-client
Open

feat: support injecting custom LLM clients into Gemini and AnthropicLlm#5035
brucearctor wants to merge 2 commits intogoogle:mainfrom
brucearctor:feature/5027-custom-client

Conversation

@brucearctor
Copy link
Copy Markdown

@brucearctor brucearctor commented Mar 28, 2026

Enable injecting pre-configured LLM clients into Gemini and AnthropicLlm models to support multi-agent systems with distinct configurations. Addresses #5027.

Testing Plan

I have verified these changes with the following:

Automated Tests

  • New Unit Tests: Added which specifically mocks the and clients to verify they are correctly consumed by the cached properties.
  • Regression Testing: Ran all 86 existing unit tests in and to ensure legacy behavior via environment variables is preserved.

Manual Verification

  • Pydantic Validation: Verified model initialization with actual and objects to ensure no runtime Pydantic resolution errors ().

Verification Command

uv run pytest tests/unittests/models/test_custom_client.py
uv run pytest tests/unittests/models/test_google_llm.py tests/unittests/models/test_anthropic_llm.py

@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented Mar 28, 2026

Response from ADK Triaging Agent

Hello @brucearctor, thank you for your contribution!

To help reviewers better understand and verify your changes, could you please add a testing plan section to your PR description? This should describe how you've tested the changes, including any manual end-to-end tests you've performed.

You can find more details in our contribution guidelines.

Thanks!

@adk-bot adk-bot added the models [Component] Issues related to model support label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models [Component] Issues related to model support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants