Repository navigation
feat(install): autowire the unsloth gateway key with minimal manual steps - #1694
Merged
Merged
Conversation
…teps
New-user automation for the unsloth universal model gateway: capture
UNSLOTH_API_KEY with as few manual steps as possible and persist it to
config.env. Shared helper in install-common.sh (both installers source it),
wired into the [8/9] unsloth step. NON-BLOCKING + NON-FATAL — no key just means
the gateway provider won't register; Continuum still runs with another
provider (solve-for-public-users), and headless/CI never blocks.
Capture ladder (most-automated first), each validated against /v1/models (200)
before persisting:
1. UNSLOTH_API_KEY already in env or config.env (and still valid) → keep it.
2. unsloth CLI auto-mint — `unsloth connect claude --no-launch` prints
UNSLOTH_API_KEY=sk-... (unsloth mints + remembers it); we parse it.
Works once a model is loaded in Studio.
3. Interactive paste prompt (TTY only) — open Studio, user creates a key,
enter + validate (Claude-Code-style, 3 tries). Skipped headless/CI.
Grounded in what unsloth actually exposes: no REST key-mint endpoint; auth.db
stores key HASHES not plaintext (can't read a key back); the CLI is the only
programmatic mint, and it needs a loaded model. So full zero-touch isn't
possible — this gets as close as the engine allows.
Live-validated: _unsloth_key_valid → 200 against the running /v1; the
already-configured path short-circuits correctly.
Remaining for #33: port the unsloth install + this key step into the PUBLIC
root install.sh (curl path) — it currently lives only in the tower installer.
config.env single-owner (#34): the installer is a legitimate bootstrap writer;
runtime owner stays Rust config_env.rs.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
New-user automation for the unsloth universal model gateway — capture
UNSLOTH_API_KEYwith as few manual steps as possible and persist it to config.env. No more hand-editing config.Capture ladder (most-automated first)
Each candidate is validated against
/v1/models(200) before persisting:UNSLOTH_API_KEYalready in env or config.env (and still valid) → keep it.unsloth connect claude --no-launchprintsUNSLOTH_API_KEY=sk-...(unsloth mints + remembers it); we parse it. Works once a model is loaded in Studio.Grounded in what unsloth actually exposes
/studio/api/keysis just the SPA).auth.dbstores key hashes, not plaintext — can't read a key back out.So full zero-touch isn't possible; this gets as close as the engine allows.
Shape
mod_unsloth_gateway_keyininstall-common.sh(both installers source it), wired into the[8/9]unsloth step.Validation
bash -nclean on both files._unsloth_key_valid→ 200 against the running/v1;mod_unsloth_gateway_keyshort-circuits with "✓ already configured + valid".Remaining (#33)
Port the unsloth install + this key step into the public root
install.sh(thecurlpath) — currently only in the tower installer. config.env single-owner (#34): the installer is a legitimate bootstrap writer; runtime owner stays Rustconfig_env.rs.See memory
unsloth-universal-model-gateway.🤖 Generated with Claude Code