From e9c540b8c100964aca7bb97625ab0d03578b15a5 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 2 Apr 2026 17:17:01 +0200 Subject: [PATCH] feat: make OpenClaw model configurable via environment variable --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 95075e9..e682798 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ from _db_com import database OPENCLAW_URL = os.getenv("OPENCLAW_URL") OPENCLAW_TOKEN = os.getenv("OPENCLAW_TOKEN") OPENCLAW_PROXY_AUTH = os.getenv("OPENCLAW_PROXY_AUTH") +OPENCLAW_MODEL = os.getenv("OPENCLAW_MODEL", "openrouter/auto") DATABASE_STORAGE = os.getenv("DATABASE_STORAGE_NAME") AGENT_USERNAME = os.getenv("AGENT_USERNAME") @@ -81,7 +82,7 @@ Inform them that you have to be told the exact details on what to do next, as yo else: auth = None response = requests.post( - OPENCLAW_URL, headers=headers, json={"message": message, "thinking": "low", "timeoutSeconds": 45, "model": "openrouter/google/gemini-3-flash-preview"}, auth=auth + OPENCLAW_URL, headers=headers, json={"message": message, "thinking": "low", "timeoutSeconds": 45, "model": OPENCLAW_MODEL}, auth=auth ) if response.status_code == 200: print(