hypercli-cli 0.7.10__tar.gz → 0.7.12__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.10 → hypercli_cli-0.7.12}/PKG-INFO +1 -1
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/claw.py +45 -14
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/pyproject.toml +1 -1
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/.gitignore +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/README.md +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/__init__.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/billing.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/cli.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/comfyui.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/flow.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/instances.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/jobs.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/llm.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/output.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/renders.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/tui/__init__.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/tui/job_monitor.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/user.py +0 -0
- {hypercli_cli-0.7.10 → hypercli_cli-0.7.12}/hypercli_cli/wallet.py +0 -0
|
@@ -301,16 +301,43 @@ 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
|
-
|
|
304
|
+
|
|
305
|
+
def fetch_models(api_key: str, api_base: str = PROD_API_BASE) -> list[dict]:
|
|
306
|
+
"""Fetch available models from LiteLLM /v1/models (served by HyperClaw)."""
|
|
307
|
+
import httpx
|
|
308
|
+
try:
|
|
309
|
+
resp = httpx.get(
|
|
310
|
+
f"{api_base}/v1/models",
|
|
311
|
+
headers={"Authorization": f"Bearer {api_key}"},
|
|
312
|
+
timeout=10,
|
|
313
|
+
)
|
|
314
|
+
resp.raise_for_status()
|
|
315
|
+
data = resp.json().get("data", [])
|
|
316
|
+
return [
|
|
317
|
+
{
|
|
318
|
+
"id": m["id"],
|
|
319
|
+
"name": m["id"].replace("-", " ").title(),
|
|
320
|
+
"reasoning": False,
|
|
321
|
+
"input": ["text"],
|
|
322
|
+
"contextWindow": 200000,
|
|
323
|
+
"maxTokens": 8192,
|
|
324
|
+
}
|
|
325
|
+
for m in data
|
|
326
|
+
if m.get("id")
|
|
327
|
+
]
|
|
328
|
+
except Exception as e:
|
|
329
|
+
console.print(f"[yellow]⚠ Could not fetch models from API: {e}[/yellow]")
|
|
330
|
+
console.print("[yellow] Using fallback model list[/yellow]")
|
|
331
|
+
return [
|
|
332
|
+
{
|
|
333
|
+
"id": "kimi-k2.5",
|
|
334
|
+
"name": "Kimi K2.5",
|
|
335
|
+
"reasoning": False,
|
|
336
|
+
"input": ["text"],
|
|
337
|
+
"contextWindow": 200000,
|
|
338
|
+
"maxTokens": 8192,
|
|
339
|
+
},
|
|
340
|
+
]
|
|
314
341
|
|
|
315
342
|
|
|
316
343
|
@app.command("openclaw-setup")
|
|
@@ -344,19 +371,22 @@ def openclaw_setup(
|
|
|
344
371
|
else:
|
|
345
372
|
config = {}
|
|
346
373
|
|
|
374
|
+
# Fetch current model list from LiteLLM via API
|
|
375
|
+
models = fetch_models(api_key)
|
|
376
|
+
|
|
347
377
|
# Patch only models.providers.hyperclaw
|
|
348
378
|
config.setdefault("models", {}).setdefault("providers", {})
|
|
349
379
|
config["models"]["providers"]["hyperclaw"] = {
|
|
350
380
|
"baseUrl": "https://api.hyperclaw.app/v1",
|
|
351
381
|
"apiKey": api_key,
|
|
352
382
|
"api": "openai-completions",
|
|
353
|
-
"models":
|
|
383
|
+
"models": models,
|
|
354
384
|
}
|
|
355
385
|
|
|
356
386
|
# Optionally set default model
|
|
357
387
|
if default:
|
|
358
388
|
config.setdefault("agents", {}).setdefault("defaults", {}).setdefault("model", {})
|
|
359
|
-
config["agents"]["defaults"]["model"]["primary"] = "hyperclaw/
|
|
389
|
+
config["agents"]["defaults"]["model"]["primary"] = f"hyperclaw/{models[0]['id']}"
|
|
360
390
|
|
|
361
391
|
# Write back
|
|
362
392
|
OPENCLAW_CONFIG_PATH.parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -366,7 +396,8 @@ def openclaw_setup(
|
|
|
366
396
|
|
|
367
397
|
console.print(f"[green]✅ Patched {OPENCLAW_CONFIG_PATH}[/green]")
|
|
368
398
|
console.print(f" provider: hyperclaw key: {api_key[:16]}...")
|
|
369
|
-
|
|
399
|
+
for m in models:
|
|
400
|
+
console.print(f" model: hyperclaw/{m['id']}")
|
|
370
401
|
if default:
|
|
371
|
-
console.print(" default model: hyperclaw/
|
|
402
|
+
console.print(f" default model: hyperclaw/{models[0]['id']}")
|
|
372
403
|
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
|