Replies: 2 comments
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: This is an excellent proposal that aligns with ADK's design philosophy. While there's no global environment variable for Thank you for this detailed and well-reasoned feature proposal. You've correctly identified that ADK follows a "Code-First, Environment-Aware" philosophy, using environment variables to separate configuration from code. [1, 2] Your observation is accurate: currently, there is no framework-wide support for configuring a model's However, your suggestion fits perfectly with existing patterns in the framework:
Introducing a global We believe this is a fantastic suggestion and appreciate you taking the time to outline the benefits so clearly. [1] https://github.com/google/adk-python/blob/main/contributing/samples/adk_pr_triaging_agent/README.md |
Beta Was this translation helpful? Give feedback.
-
|
@Jacksunwei @seanzhougoogle - could you please give your inputs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary:
ADK currently does a fantastic job of following a "Code-First, Environment-Aware" philosophy. We specify our agent logic in code, and ADK gracefully picks up environment-specific infrastructure details like API_KEY, PROJECT_ID, and LOCATION from standard environment variables.
However, as ADK moves into more complex enterprise environments—where traffic is often routed through sovereign AI gateways, observability proxies (like Vidai or Helicone or Portkey), or specialized logging servers—the Endpoint URL (base_url) has become as much a part of the "Infrastructure Environment" as the API Key itself.
The Question:
Does it align with ADK's architectural vision to extend its environment-discovery logic to include endpoint redirection? Specifically, would the team be open to a proposal that introduces a framework-wide global fallback (ADK_LLM_BASE_URL) coupled with support for industry-standard SDK variables (like LITELLM_API_BASE or ANTHROPIC_BASE_URL)?
Why we believe this makes sense:
Environment Parity: Moving code from a local developer machine (hitting public APIs) to a production cluster (hitting a secure proxy) currently requires code changes to the model initialization. Allowing this to be handled via the environment aligns with Infrastructure-as-Code (IaC) best practices.
Provider Harmony: Organizations often use a mix of native models (Gemini) and variety-focused adapters (LiteLLM). These often require different pathing conventions (e.g., Domain Root vs. /v1). Exposing these through the environment allows for cleaner "Mixed-Model" orchestration without bespoke path-manipulation hacks in the source code.
Observability & Compliance: Standardizing base_url discovery enables developers to drop ADK into existing observability and compliance pipelines that rely on transparent traffic redirection.
We have been exploring a minimalist, non-opinionated pass-through implementation for this that respects the native protocols of each SDK. We'd love to hear the team's thoughts on whether this is a direction you'd like to see in a PR!
Beta Was this translation helpful? Give feedback.
All reactions