fix(hub): explicit Vertex AI client + ADC auth

This commit is contained in:
Chris Christiansen 2026-09-05 10:24:11 +00:00
parent 298ff131f0
commit cffef7e430
2 changed files with 14 additions and 2 deletions

View File

@ -65,7 +65,7 @@ except ImportError as _e:
# ---------------------------------------------------------------------------
# OPAX MCP Client (inlina)
# ---------------------------------------------------------------------------
_OPAX_MCP_URL = os.environ.get("MCP_SERVER_URL", "https://opax-mcp-357036551735.us-central1.run.app")
_OPAX_MCP_URL = os.environ.get("MCP_SERVER_URL", "https://opax-mcp-zjbqp3prqq-uc.a.run.app")
_MCP_SECRET = os.environ.get("MCP_SECRET", "")
@ -260,6 +260,9 @@ def build_agent(mode: str = "light", message: str = "") -> tuple:
description=f"Jason Vauger — OPAX enterprise agent [{mode}]",
instruction=instruction,
tools=OPAX_TOOLS,
vertexai=True,
project="propane-will-491900-m5",
location="us-central1",
)
return agent, actual_model, instruction

View File

@ -185,7 +185,16 @@ def build_agent(mode: str = "light", message: str = "") -> tuple:
models = get_models_for_mode(mode)
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)
agent = Agent(model=actual_model, name="jason_vauger", description=f"Jason Vauger — OPAX enterprise agent [{mode}]", instruction=instruction, tools=OPAX_TOOLS)
agent = Agent(
model=actual_model,
name="jason_vauger",
description=f"Jason Vauger — OPAX enterprise agent [{mode}]",
instruction=instruction,
tools=OPAX_TOOLS,
vertexai=True,
project="propane-will-491900-m5",
location="us-central1",
)
return agent, actual_model, instruction
root_agent, _, _ = build_agent(mode="light")