Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

add api key/url param to cli

Dillon DuPont9bcf5ead1b2f
diff --git a/libs/python/agent/agent/cli.py b/libs/python/agent/agent/cli.py
index 7669b25586..49793ba6a1 100644
--- a/libs/python/agent/agent/cli.py
+++ b/libs/python/agent/agent/cli.py
@@ -297,6 +297,20 @@ Examples:
help="Maximum number of retries for the LLM API calls",
)
+ # Provider override credentials
+ parser.add_argument(
+ "--api-key",
+ dest="api_key",
+ type=str,
+ help="API key override for the model provider (passed to ComputerAgent)",
+ )
+ parser.add_argument(
+ "--api-url",
+ dest="api_url",
+ type=str,
+ help="API base URL override for the model provider (passed to ComputerAgent)",
+ )
+
args = parser.parse_args()
# Check for required environment variables
@@ -380,6 +394,12 @@ Examples:
"max_retries": args.max_retries,
}
+ # Thread API credentials to agent if provided
+ if args.api_key:
+ agent_kwargs["api_key"] = args.api_key
+ if args.api_url:
+ agent_kwargs["api_url"] = args.api_url
+
if args.images > 0:
agent_kwargs["only_n_most_recent_images"] = args.images