Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions samples/agent/adk/contact_lookup/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from google.adk.agents.llm_agent import LlmAgent
from google.adk.artifacts import InMemoryArtifactService
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService
from google.adk.models.lite_llm import LiteLlm
from google.adk.models.google_llm import Gemini
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
Expand Down Expand Up @@ -80,7 +80,7 @@ def get_processing_message(self) -> str:

def _build_agent(self, use_ui: bool) -> LlmAgent:
"""Builds the LLM agent for the contact agent."""
LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
gemini_model = os.getenv("GEMINI_MODEL", "gemini-2.5-flash")

if use_ui:
instruction = get_ui_prompt(self.base_url, CONTACT_UI_EXAMPLES)
Expand All @@ -89,7 +89,7 @@ def _build_agent(self, use_ui: bool) -> LlmAgent:
instruction = get_text_prompt()

return LlmAgent(
model=LiteLlm(model=LITELLM_MODEL),
model=Gemini(model=gemini_model),
name="contact_agent",
description="An agent that finds colleague contact info.",
instruction=instruction,
Expand Down
6 changes: 3 additions & 3 deletions samples/agent/adk/contact_multiple_surfaces/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from google.adk.agents.llm_agent import LlmAgent
from google.adk.artifacts import InMemoryArtifactService
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService
from google.adk.models.lite_llm import LiteLlm
from google.adk.models.google_llm import Gemini
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
Expand Down Expand Up @@ -75,7 +75,7 @@ def get_processing_message(self) -> str:

def _build_agent(self, use_ui: bool) -> LlmAgent:
"""Builds the LLM agent for the contact agent."""
LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
gemini_model = os.getenv("GEMINI_MODEL", "gemini-2.5-flash")

if use_ui:
examples = load_examples(self.base_url)
Expand All @@ -85,7 +85,7 @@ def _build_agent(self, use_ui: bool) -> LlmAgent:
instruction = get_text_prompt()

return LlmAgent(
model=LiteLlm(model=LITELLM_MODEL),
model=Gemini(model=gemini_model),
name="contact_agent",
description="An agent that finds colleague contact info.",
instruction=instruction,
Expand Down
6 changes: 3 additions & 3 deletions samples/agent/adk/orchestrator/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
from a2a.client import A2ACardResolver
from a2a.extensions.common import HTTP_EXTENSION_HEADER
from google.adk.models.lite_llm import LiteLlm
from google.adk.models.google_llm import Gemini
from google.adk.agents.llm_agent import LlmAgent
from google.adk.agents.remote_a2a_agent import RemoteA2aAgent, DEFAULT_TIMEOUT
from google.adk.planners.built_in_planner import BuiltInPlanner
Expand Down Expand Up @@ -182,9 +182,9 @@ async def build_agent(cls, base_url: str, subagent_urls: List[str]) -> (LlmAgent

logger.info(f'Created remote agent with description: {description}')

LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
gemini_model = os.getenv("GEMINI_MODEL", "gemini-2.5-flash")
agent = LlmAgent(
model=LiteLlm(model=LITELLM_MODEL),
model=Gemini(model=gemini_model),
name="orchestrator_agent",
description="An agent that orchestrates requests to multiple other agents",
instruction="You are an orchestrator agent. Your sole responsibility is to analyze the incoming user request, determine the user's intent, and route the task to exactly one of your expert subagents",
Expand Down
6 changes: 3 additions & 3 deletions samples/agent/adk/restaurant_finder/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from google.adk.agents.llm_agent import LlmAgent
from google.adk.artifacts import InMemoryArtifactService
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService
from google.adk.models.lite_llm import LiteLlm
from google.adk.models.google_llm import Gemini
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
Expand Down Expand Up @@ -93,7 +93,7 @@ def get_processing_message(self) -> str:

def _build_agent(self, use_ui: bool) -> LlmAgent:
"""Builds the LLM agent for the restaurant agent."""
LITELLM_MODEL = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
gemini_model = os.getenv("GEMINI_MODEL", "gemini-2.5-flash")

if use_ui:
# Construct the full prompt with UI instructions, examples, and schema
Expand All @@ -104,7 +104,7 @@ def _build_agent(self, use_ui: bool) -> LlmAgent:
instruction = get_text_prompt()

return LlmAgent(
model=LiteLlm(model=LITELLM_MODEL),
model=Gemini(model=gemini_model),
name="restaurant_agent",
description="An agent that finds restaurants and helps book tables.",
instruction=instruction,
Expand Down
6 changes: 3 additions & 3 deletions samples/agent/adk/rizzcharts/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from agent import RizzchartsAgent
from google.adk.artifacts import InMemoryArtifactService
from google.adk.memory.in_memory_memory_service import InMemoryMemoryService
from google.adk.models.lite_llm import LiteLlm
from google.adk.models.google_llm import Gemini
from google.adk.runners import Runner
from google.adk.sessions.in_memory_session_service import InMemorySessionService
from dotenv import load_dotenv
Expand Down Expand Up @@ -53,9 +53,9 @@ def main(host, port):
"GEMINI_API_KEY environment variable not set and GOOGLE_GENAI_USE_VERTEXAI is not TRUE."
)

lite_llm_model = os.getenv("LITELLM_MODEL", "gemini/gemini-2.5-flash")
gemini_model = os.getenv("GEMINI_MODEL", "gemini-2.5-flash")
agent = RizzchartsAgent(
model=LiteLlm(model=lite_llm_model),
model=Gemini(model=gemini_model),
a2ui_enabled_provider=get_a2ui_enabled,
a2ui_schema_provider=get_a2ui_schema,
)
Expand Down