Revert "fix(hub): use LlmAgent with explicit Vertex AI client"

This reverts commit c8af73304dbfddaccb65ecbcffcdc014a7c036f4.
This commit is contained in:
Chris Christiansen 2026-09-05 10:57:28 +00:00
parent 1a1d4ae99b
commit 9e0a795b4b

View File

@ -14,7 +14,7 @@ import google.auth.transport.requests
from typing import Literal from typing import Literal
from google.adk.agents import LlmAgent from google.adk.agents import Agent
from google.adk.tools import FunctionTool from google.adk.tools import FunctionTool
from google.adk.runners import Runner from google.adk.runners import Runner
from gemini_guard import guarded_run, CircuitOpen, RateLimitExceeded from gemini_guard import guarded_run, CircuitOpen, RateLimitExceeded
@ -254,13 +254,12 @@ def build_agent(mode: str = "light", message: str = "") -> tuple:
models = get_models_for_mode(mode) models = get_models_for_mode(mode)
actual_model = route_model(message=message, mode=mode, flash_model=ORCHESTRATOR_MODEL, pro_model=models["orchestrator"]) actual_model = route_model(message=message, mode=mode, flash_model=ORCHESTRATOR_MODEL, pro_model=models["orchestrator"])
instruction = _INSTRUCTION_TEMPLATE.format(mode=mode, model=actual_model) instruction = _INSTRUCTION_TEMPLATE.format(mode=mode, model=actual_model)
agent = LlmAgent( agent = Agent(
model=actual_model, model=actual_model,
name="jason_vauger",
description=f"Jason Vauger — OPAX enterprise agent [{mode}]",
instruction=instruction, instruction=instruction,
tools=OPAX_TOOLS, tools=OPAX_TOOLS,
vertexai=True,
project="propane-will-491900-m5",
location="us-central1",
) )
return agent, actual_model, instruction return agent, actual_model, instruction