Support for credentials parameter in ApigeeLlm #1743 - 5#1750
Conversation
✅ Deploy Preview for adk-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Doc file: docs/agents/models/apigee.md Reasoning: Follow-up:
Conclusion: the current credentials snippet correctly addresses the ability of a producer or a consumer to add and integrate with Google's OAuth and IAM systems by optionally accepting google-auth credentials. Simple and precise. Reference: src/google/adk/models/apigee_llm.py |
|
The update below defines the credentials component of the argument model, needed to initialize the ApigeeLlm backend from google.adk.agents import LlmAgent
from google.adk.models.apigee_llm import ApigeeLlm
**credentials:** As one of the components of the arg model for initializing the Apigee LLM backend, this field represents optional google-auth credentials passed through to the
underlying `genai.Client`. Use this when the Apigee proxy requires
additional OAuth scopes for example, `userinfo.email` for tokeninfo-based
caller identification). When omitted, the default `genai.Client`
authentication flow is used.
"model "= ApigeeLlm(
# Specify the Apigee route to your model. For more info, check out the ApigeeLlm documentation (https://github.com/google/adk-python/tree/main/contributing/samples/hello_world_apigeellm).
**model**="apigee/gemini-flash-latest",
# The proxy URL of your deployed Apigee proxy including the base path
**proxy_url**=f"https://{APIGEE_PROXY_URL}",
# Pass necessary authentication/authorization headers (like an API key)
**custom_headers**={"foo": "bar"},
# (for instance, `userinfo.email` for tokeninfo-based caller identification)
**credentials**: Optional google-auth credentials passed through to the
underlying `genai.Client`. Use this when the Apigee proxy requires
additional OAuth scopes. When omitted, the default `genai.Client` authentication flow is used.
# credentials=my_credentials
) |
5. Support for
credentialsparameter inApigeeLlmDoc file: docs/agents/models/apigee.md
Current state:
Proposed Change:
Reasoning:
The ApigeeLlm python wrapper was updated to accept an optional
credentialsparameter to support passing explicitgoogle-authcredentials (useful when the Apigee proxy requires additional OAuth scopes likeuserinfo.emailfor caller identification).Reference: src/google/adk/models/apigee_llm.py