From 038ad4df10cbd43ffe431dae9096b482e053bca2 Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Thu, 28 Aug 2025 16:55:28 -0400 Subject: [PATCH] Force default model for human-in-the-loop --- libs/python/agent/agent/agent.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/python/agent/agent/agent.py b/libs/python/agent/agent/agent.py index 8120109d..b796866d 100644 --- a/libs/python/agent/agent/agent.py +++ b/libs/python/agent/agent/agent.py @@ -188,7 +188,11 @@ class ComputerAgent: max_trajectory_budget: If set, adds BudgetManagerCallback to track usage costs and stop when budget is exceeded telemetry_enabled: If set, adds TelemetryCallback to track anonymized usage data. Enabled by default. **kwargs: Additional arguments passed to the agent loop - """ + """ + # If the loop is "human/human", we need to prefix a grounding model fallback + if model in ["human/human", "human"]: + model = "openai/computer-use-preview+human/human" + self.model = model self.tools = tools or [] self.custom_loop = custom_loop @@ -253,10 +257,6 @@ class ComputerAgent: # == Initialize computer agent == - # If the loop is "human/human", we need to prefix a grounding model fallback - if model in ["human/human", "human"]: - model = "openai/computer-use-preview+human/human" - # Find the appropriate agent loop if custom_loop: self.agent_loop = custom_loop