hypercli-cli 0.7.9__tar.gz → 0.7.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/PKG-INFO +1 -1
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/claw.py +40 -21
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/pyproject.toml +1 -1
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/.gitignore +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/README.md +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/__init__.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/billing.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/cli.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/comfyui.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/flow.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/instances.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/jobs.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/llm.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/output.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/renders.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/tui/__init__.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/tui/job_monitor.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/user.py +0 -0
- {hypercli_cli-0.7.9 → hypercli_cli-0.7.11}/hypercli_cli/wallet.py +0 -0
|
@@ -301,24 +301,38 @@ def plans(
|
|
|
301
301
|
|
|
302
302
|
OPENCLAW_CONFIG_PATH = Path.home() / ".openclaw" / "openclaw.json"
|
|
303
303
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
"
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
304
|
+
|
|
305
|
+
def fetch_models(api_base: str = PROD_API_BASE) -> list[dict]:
|
|
306
|
+
"""Fetch available models from HyperClaw /v1/models endpoint."""
|
|
307
|
+
import httpx
|
|
308
|
+
try:
|
|
309
|
+
resp = httpx.get(f"{api_base}/api/v1/models", timeout=10)
|
|
310
|
+
resp.raise_for_status()
|
|
311
|
+
data = resp.json().get("data", [])
|
|
312
|
+
return [
|
|
313
|
+
{
|
|
314
|
+
"id": m["id"],
|
|
315
|
+
"name": m.get("id", "").replace("-", " ").title(),
|
|
316
|
+
"reasoning": False,
|
|
317
|
+
"input": ["text"],
|
|
318
|
+
"contextWindow": m.get("context_window", 200000),
|
|
319
|
+
"maxTokens": m.get("max_tokens", 8192),
|
|
320
|
+
}
|
|
321
|
+
for m in data
|
|
322
|
+
]
|
|
323
|
+
except Exception as e:
|
|
324
|
+
console.print(f"[yellow]⚠ Could not fetch models from API: {e}[/yellow]")
|
|
325
|
+
console.print("[yellow] Using fallback model list[/yellow]")
|
|
326
|
+
return [
|
|
327
|
+
{
|
|
328
|
+
"id": "kimi-k2.5",
|
|
329
|
+
"name": "Kimi K2.5",
|
|
330
|
+
"reasoning": False,
|
|
331
|
+
"input": ["text"],
|
|
332
|
+
"contextWindow": 200000,
|
|
333
|
+
"maxTokens": 8192,
|
|
334
|
+
},
|
|
335
|
+
]
|
|
322
336
|
|
|
323
337
|
|
|
324
338
|
@app.command("openclaw-setup")
|
|
@@ -352,19 +366,22 @@ def openclaw_setup(
|
|
|
352
366
|
else:
|
|
353
367
|
config = {}
|
|
354
368
|
|
|
369
|
+
# Fetch current model list from API
|
|
370
|
+
models = fetch_models()
|
|
371
|
+
|
|
355
372
|
# Patch only models.providers.hyperclaw
|
|
356
373
|
config.setdefault("models", {}).setdefault("providers", {})
|
|
357
374
|
config["models"]["providers"]["hyperclaw"] = {
|
|
358
375
|
"baseUrl": "https://api.hyperclaw.app/v1",
|
|
359
376
|
"apiKey": api_key,
|
|
360
377
|
"api": "openai-completions",
|
|
361
|
-
"models":
|
|
378
|
+
"models": models,
|
|
362
379
|
}
|
|
363
380
|
|
|
364
381
|
# Optionally set default model
|
|
365
382
|
if default:
|
|
366
383
|
config.setdefault("agents", {}).setdefault("defaults", {}).setdefault("model", {})
|
|
367
|
-
config["agents"]["defaults"]["model"]["primary"] = "hyperclaw/
|
|
384
|
+
config["agents"]["defaults"]["model"]["primary"] = f"hyperclaw/{models[0]['id']}"
|
|
368
385
|
|
|
369
386
|
# Write back
|
|
370
387
|
OPENCLAW_CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -374,6 +391,8 @@ def openclaw_setup(
|
|
|
374
391
|
|
|
375
392
|
console.print(f"[green]✅ Patched {OPENCLAW_CONFIG_PATH}[/green]")
|
|
376
393
|
console.print(f" provider: hyperclaw key: {api_key[:16]}...")
|
|
394
|
+
for m in models:
|
|
395
|
+
console.print(f" model: hyperclaw/{m['id']}")
|
|
377
396
|
if default:
|
|
378
|
-
console.print(" default model: hyperclaw/
|
|
397
|
+
console.print(f" default model: hyperclaw/{models[0]['id']}")
|
|
379
398
|
console.print("\nRun: [bold]openclaw gateway restart[/bold]")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|