fix(hub): explicit Vertex AI client + ADC auth
This commit is contained in:
parent
298ff131f0
commit
cffef7e430
|
|
@ -65,7 +65,7 @@ except ImportError as _e:
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# OPAX MCP Client (inlina)
|
# 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", "")
|
_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}]",
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,16 @@ 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 = 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
|
return agent, actual_model, instruction
|
||||||
|
|
||||||
root_agent, _, _ = build_agent(mode="light")
|
root_agent, _, _ = build_agent(mode="light")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user