From 9bcf5ead1b2fea12aaf1b7d32747ad69a9efdcdf Mon Sep 17 00:00:00 2001 From: Dillon DuPont Date: Thu, 30 Oct 2025 12:38:18 -0400 Subject: [PATCH] add api key/url param to cli --- libs/python/agent/agent/cli.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libs/python/agent/agent/cli.py b/libs/python/agent/agent/cli.py index 7669b255..49793ba6 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