Skip to content

run wizard: self-hosted model server option; viewer logo - #82

Merged
luiyen merged 4 commits into
masterfrom
run-wizard-self-hosted
Nov 8, 2026
Merged

luiyen merged 4 commits into
masterfrom
run-wizard-self-hosted

Conversation

@luiyen

@luiyen luiyen commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • hbench run wizard: a self-hosted provider for any OpenAI-compatible server (llama.cpp, vLLM, LM Studio, MLX…).
    • Asks for the server URL and reads the model from /v1/models (picks it if only one is loaded).
    • Rewrites localhost/127.0.0.1/[::1] to host.docker.internal so the agent's container can reach it.
    • Sets OPENAI_BASE_URL/OPENAI_API_KEY with -m openai/<id>. claude-code gets ANTHROPIC_BASE_URL/ANTHROPIC_API_KEY with anthropic/<id>. gemini-cli isn't offered the option.
    • On a 401 it asks for the API key in a hidden prompt. The printed command shows "$SELF_HOSTED_API_KEY", never the key.
    • Asks for --model-served-by, prefilled from the server's Server header.
    • The credential check now runs after the model is picked and is skipped for self-hosted servers.
    • Enables dialoguer's password feature, which adds no new crates (zeroize is already in the lock file).
  • Viewer: the header mark is 32px instead of 24px, and the favicon is now the Hbench mark instead of the old bar chart.

Testing

  • New unit tests cover URL handling, the host.docker.internal rewrite, guessing the served-by label, and the answers filling in the run args and printed command. Clippy is clean.
  • Locally dspy_rlm::tests::runner_bridges_tools_with_fake_dspy fails because this machine has Python 3.9, which lacks X | None syntax. That failure is unrelated to this PR.
  • Tried a self-hosted run against a TensorFold (MLX) server: the wizard part worked. The trials then failed with a 403 from that server, which only accepts loopback host names unless started with --allowed-host host.docker.internal.

Pick "self-hosted" as the provider to point the agent at llama.cpp, vLLM,
LM Studio, MLX or any other OpenAI-compatible server: the wizard reads the
model from /v1/models, rewrites localhost to host.docker.internal for the
container, asks for an API key (hidden) when the server wants one, and
asks what served the model, guessed from the Server header.
@node-q node-q deleted a comment from hacktron-app Bot Nov 8, 2026
@hacktron-app

hacktron-app Bot commented Nov 8, 2026

Copy link
Copy Markdown

Hacktron Security Check - Skipped

Reason: Code Review is not active for this organization

Start a free trial (no credit card required), subscribe, or add a payment method from organization billing settings

Go to: https://app.hacktron.ai/nodeq/billing

rzonyx
rzonyx previously approved these changes Nov 8, 2026
@luiyen
luiyen merged commit 172cc0a into master Nov 8, 2026
11 checks passed
@luiyen luiyen mentioned this pull request Nov 9, 2026
luiyen added a commit that referenced this pull request Nov 9, 2026
hbench run's wizard gets a "self-hosted" provider for any OpenAI-compatible model server (llama.cpp, vLLM, LM Studio, MLX…) (#82). The viewer and the ASCII logo show the Hbench mark (#77, #82).
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.

2 participants