Skip to content

Update ADK doc according to issue #1743 - 5#1750

Open
adk-bot wants to merge 1 commit into
mainfrom
agent-changes-20260508-214334
Open

Update ADK doc according to issue #1743 - 5#1750
adk-bot wants to merge 1 commit into
mainfrom
agent-changes-20260508-214334

Conversation

@adk-bot
Copy link
Copy Markdown
Collaborator

@adk-bot adk-bot commented May 8, 2026

5. Support for credentials parameter in ApigeeLlm

Doc file: docs/agents/models/apigee.md

Current state:

=== "Python"

```python

from google.adk.agents import LlmAgent
from google.adk.models.apigee_llm import ApigeeLlm

# Instantiate the ApigeeLlm wrapper
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"}
)

Proposed Change:

=== "Python"

```python

from google.adk.agents import LlmAgent
from google.adk.models.apigee_llm import ApigeeLlm

# Instantiate the ApigeeLlm wrapper
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"},
    # Optional: Pass google-auth credentials if the proxy requires additional OAuth scopes
    # credentials=my_credentials
)

Reasoning:
The ApigeeLlm python wrapper was updated to accept an optional credentials parameter to support passing explicit google-auth credentials (useful when the Apigee proxy requires additional OAuth scopes like userinfo.email for caller identification).

Reference: src/google/adk/models/apigee_llm.py

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit ba10bc7
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/69fe590b7476fa000712eda9
😎 Deploy Preview https://deploy-preview-1750--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

root3315

This comment was marked as low quality.

@jcwriter74
Copy link
Copy Markdown
Collaborator

jcwriter74 commented May 18, 2026

Doc file: docs/agents/models/apigee.md
Current state: >#1750
Other producers and consumers noting the same issue > google/adk-python#4721

Reasoning:
The ApigeeLlm python wrapper was updated to accept an optional credentials parameter to support passing explicit google-auth credentials (useful when the Apigee proxy requires additional OAuth scopes like userinfo.email for caller identification).

Follow-up:

  • Originally suited for ADK v1.33.0 and later.
  • More flexibility: allows for the Apigee model to expand the caller's capability of logging with the “credentials” parameter explicitly.
  • It helps avoiding fragile and less ideal workarounds previously needed to use google/auth credentials in Gemini or Vortex LLMs.
  • Previous to this solution proposal, monkey-patching to google.auth.default was necessary, making it cumbersome for producers and consumers to utilize.
  • More custom API design products. Enhances enterprise and production environments' fitting.
  • Chance to aggregate additional OAUth scopes, e.g., userinfo.email for identifying callers.
  • Wider set of Apigee proxy authentication mechanisms, such as, the current version but adds the ability to integrate with Google's OAuth and IAM systems by optionally accepting google-auth credentials.

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

Reviewed using:
Google AI Studio
Duckie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants