hypercli-cli 0.7.11__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hypercli-cli
3
- Version: 0.7.11
3
+ Version: 0.7.12
4
4
  Summary: CLI for HyperCLI - GPU orchestration and LLM API
5
5
  Project-URL: Homepage, https://hypercli.com
6
6
  Project-URL: Documentation, https://docs.hypercli.com
@@ -302,23 +302,28 @@ def plans(
302
302
  OPENCLAW_CONFIG_PATH = Path.home() / ".openclaw" / "openclaw.json"
303
303
 
304
304
 
305
- def fetch_models(api_base: str = PROD_API_BASE) -> list[dict]:
306
- """Fetch available models from HyperClaw /v1/models endpoint."""
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
307
  import httpx
308
308
  try:
309
- resp = httpx.get(f"{api_base}/api/v1/models", timeout=10)
309
+ resp = httpx.get(
310
+ f"{api_base}/v1/models",
311
+ headers={"Authorization": f"Bearer {api_key}"},
312
+ timeout=10,
313
+ )
310
314
  resp.raise_for_status()
311
315
  data = resp.json().get("data", [])
312
316
  return [
313
317
  {
314
318
  "id": m["id"],
315
- "name": m.get("id", "").replace("-", " ").title(),
319
+ "name": m["id"].replace("-", " ").title(),
316
320
  "reasoning": False,
317
321
  "input": ["text"],
318
- "contextWindow": m.get("context_window", 200000),
319
- "maxTokens": m.get("max_tokens", 8192),
322
+ "contextWindow": 200000,
323
+ "maxTokens": 8192,
320
324
  }
321
325
  for m in data
326
+ if m.get("id")
322
327
  ]
323
328
  except Exception as e:
324
329
  console.print(f"[yellow]⚠ Could not fetch models from API: {e}[/yellow]")
@@ -366,8 +371,8 @@ def openclaw_setup(
366
371
  else:
367
372
  config = {}
368
373
 
369
- # Fetch current model list from API
370
- models = fetch_models()
374
+ # Fetch current model list from LiteLLM via API
375
+ models = fetch_models(api_key)
371
376
 
372
377
  # Patch only models.providers.hyperclaw
373
378
  config.setdefault("models", {}).setdefault("providers", {})
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "hypercli-cli"
7
- version = "0.7.11"
7
+ version = "0.7.12"
8
8
  description = "CLI for HyperCLI - GPU orchestration and LLM API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes