Skip to content

fix(cli): split --provider vs --hardware on slot create (#2)#64

Merged
thinmintdev merged 4 commits into
mainfrom
fix/cli-slot-create-ux-2026-05-21
May 21, 2026
Merged

fix(cli): split --provider vs --hardware on slot create (#2)#64
thinmintdev merged 4 commits into
mainfrom
fix/cli-slot-create-ux-2026-05-21

Conversation

@thinmintdev
Copy link
Copy Markdown
Contributor

Closes finding #2 from tests/harness/FINDINGS.md. The CLI's --backend flag was really the provider; the actual hardware backend was hardcoded to vulkan, blocking ROCm + CPU slot creation from the command line.

What

Most of the split had already landed (the --provider / --hardware flags exist, the hidden --backend alias is in place, and the _detect_default_hardware probe walks /etc/hal0/hardware.json). This PR finishes the v1 polish:

  • Deprecation warning now goes to stderr via typer.echo("[deprecated] --backend will be renamed to --provider in v0.2; use --provider", err=True). Previously it was a Rich console.print to stdout, which polluted stdout for callers piping the success line into other tools.
  • Same stderr-routing applied to slot edit's --backend alias for consistency.
  • --backend remains a hidden=True deprecated alias (per CONTRIBUTING.md style), no full removal.
  • Hardcoded "backend": "vulkan" is gone from the POST body — already removed in the earlier landing; this PR preserves and tests that.

Tests

  • New: bare hal0 slot create primary on a Strix Halo fixture (AMD iGPU, vulkan_capable=True, compute_capable=False) auto-resolves hardware=vulkan — the platform hal0 v1 most cares about.
  • New: --hardware foo is rejected at the Typer/Click parse layer before the command body runs (no API call made).
  • Updated: the legacy --backend test now asserts the deprecation lands on result.stderr, not result.output, so re-introducing the old console.print path fails this regression test loudly.
  • All 10 test_slot_create_flags.py tests + the broader 27-test CLI suite are green.

Schema

SlotConfig.backend already accepts {vulkan, rocm, flm, moonshine, kokoro, cpu} and SlotConfig.provider already accepts {llama-server, flm, moonshine, kokoro} — no schema change needed.

Close finding #2 from tests/harness/FINDINGS.md. The slot-create CLI
flag --backend was always really the provider; the actual hardware
backend was hardcoded to vulkan, blocking ROCm + CPU slot creation
from the command line.

Most of the split (new --provider / --hardware flags, hidden --backend
alias, _detect_default_hardware probe) had already landed; this commit
finishes the brief:

- Deprecation warning now goes to stderr via typer.echo(..., err=True)
  with the exact phrasing the brief calls out, so stdout stays
  parseable when scripts pipe the success line elsewhere.
- Same stderr-routing applied to slot edit's --backend alias for
  consistency.
- New test: bare 'hal0 slot create primary' on a Strix Halo fixture
  (AMD iGPU, vulkan_capable=True, compute_capable=False) auto-resolves
  hardware=vulkan — the platform hal0 v1 most cares about.
- New test: --hardware foo is rejected at the Typer/Click parse layer
  before the command body runs (no API call made).
- Existing legacy-backend test now asserts the deprecation lands on
  stderr, not stdout, so re-introducing the old console.print path
  fails loudly.
@thinmintdev thinmintdev force-pushed the main branch 2 times, most recently from 0c4ce34 to 5458a0d Compare May 21, 2026 04:16
thinmintdev added a commit that referenced this pull request May 21, 2026
The hal0-toolbox-vulkan image's ENTRYPOINT is llama-server itself
(packaging/toolbox/vulkan.Dockerfile:154). The smoke-test job was
running `docker run image /bin/bash -c '...'`, which passes /bin/bash
as the first arg to llama-server, producing:

    error: invalid argument: /bin/bash

Override the entrypoint to /bin/bash for the proof-of-life check.

Closes the slot-integration CI failure that was inherited by every
PR off main (#64, #67).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thinmintdev thinmintdev merged commit bce267a into main May 21, 2026
5 of 6 checks passed
@thinmintdev thinmintdev deleted the fix/cli-slot-create-ux-2026-05-21 branch May 22, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant