Merge pull request 'fix: remove hardcoded LAN IP from default base_url (closes #5)' (#15) from fix/issue-5 into main

Reviewed-on: https://git.home.ms/jarianc/Clover/pulls/15
This commit is contained in:
jarianc 2026-07-05 02:09:19 -05:00
commit 0fff7aaf42

View File

@ -29,7 +29,9 @@ def load_config():
"threads": int(os.getenv("CLOVER_THREADS", "5")),
"model": os.getenv("CLOVER_MODEL", "qwen3-coder:30b"),
"api_key": os.getenv("CLOVER_API_KEY"),
"base_url": os.getenv("CLOVER_BASE_URL", "http://192.168.8.223:11434"),
"base_url": os.getenv(
"CLOVER_BASE_URL", "error-set-CLOVER_BASE_URL-in-.env-file"
),
"debug": os.getenv("CLOVER_DEBUG", "false").lower() == "true",
"verbose": os.getenv("CLOVER_VERBOSE", "false").lower() == "true",
"cache_enabled": os.getenv("CLOVER_CACHE_ENABLED", "true").lower() == "true",
@ -205,8 +207,12 @@ def validate_config():
issues = []
# Check required settings
if not config.get("base_url"):
issues.append("base_url is required")
base_url = config.get("base_url", "")
if not base_url or base_url.startswith("error-set-"):
issues.append(
"CLOVER_BASE_URL is not set. Set it in your .env file or environment. "
"Example: CLOVER_BASE_URL=http://localhost:11434"
)
# Check numeric values
try: