Repository navigation
fix: add a key-gated OpenAI API interface for other services; 11960:0 → 11960:1 - #44
Merged
Merged
Conversation
… → 11960:1
StartOS 0.4.1 enforces a binding's proxy auth on the plain bridge port as
well as TLS. llama.cpp's only binding (api-multi) is gated with Basic auth
for the browser, so DSH and Open WebUI, which send `Bearer no-key-required`
over the bridge, now get `401 Basic realm="StartOS"`. One binding takes one
ProxyAuth, and browsers can't send Bearer, so one host can't serve both.
- New host `api-key` on the same internal port 8080, gated with Bearer, and
interface `openai-api` ("OpenAI-compatible API"). The browser interface
keeps its id, host, addresses and Basic login; it is renamed "Web UI".
- The key is generated in init when missing (install and update) and
published on a new `public` volume at `credentials.json` (`apiKey`), the
way vLLM publishes its key. The `public` volume is backed up.
- New API Key action shows the key and can rotate it. Rotation only changes
the proxy gate; llama-server doesn't restart.
Verified on a 0.4.1.1 box (generic variant, update over 11960:0):
- both hosts bind 8080 side by side; the UI password and api-multi's ports
are unchanged;
- new host, LAN TLS and bridge plain: no key, wrong key, the placeholder and
Basic admin all 401; the key 200 on /v1/models and /v1/chat/completions;
- old host still takes Basic only;
- rotation: old key 401, new key 200, llama-server not restarted;
- DSH and Open WebUI built against this connect and chat (separate PRs).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white
approved these changes
Nov 2, 2026
helix-white
left a comment
Member
There was a problem hiding this comment.
Reviewed the diff and surrounding init, interface, action, and backup code at 3f19bb2. No blocking correctness findings. The existing browser host/interface IDs are preserved; the separate Bearer binding stays unbound without a key, and key rotation updates proxy auth without changing the daemon specification. The new credential volume is included in backups.
Merge-tree check is clean; SDK 3.1.1 matches the latest published version. Read-only review: no build or tests run. DiscoverMatrix, generic, NVIDIA, and Vulkan CI passed; ROCm was still running at review time.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
MattDHill
approved these changes
Nov 2, 2026
This was referenced Nov 2, 2026
MattDHill
pushed a commit
to 13Homer13/open-webui-startos
that referenced
this pull request
Nov 3, 2026
StartOS 0.4.1 enforces a binding's proxy auth on the bridge port too, so the llama.cpp connection (Basic-gated `api-multi`, placeholder key) fails with `401 Basic realm="StartOS"`. llama.cpp 11960:1 adds a Bearer-gated `api-key` host and publishes its key on `public/credentials.json` (Start9Labs/llama-cpp-startos#44). - llama-cpp backend: hostId `api-key`, keySource `public`, keyRequired false, versionRange `>=11960:1`. An existing connection is repointed to the new address and gets the key on the next start. - syncBackendState: look a public-key backend up in the repointed URL list instead of `connectedIds`, which is computed before the repoint. A backend whose address moved on this start kept its old key until a second restart; this hit llama.cpp's move here and vLLM whenever its bridge port moves. - Lockfile pins llama-cpp-startos to Start9Labs#44's head until it reaches `next`. Verified on a 0.4.1.1 box with llama.cpp 11960:1: published 0.12.5:0 connected to llama.cpp (401, placeholder key), then a sideload update to this build. In one start the URL moved to the new host, the key became the published one, the model listed and a chat through /api/chat/completions answered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MattDHill
pushed a commit
to Start9Labs/open-webui-startos
that referenced
this pull request
Nov 3, 2026
* fix: connect to llama.cpp's key-gated API interface; 0.12.5:0 → 0.12.5:1 StartOS 0.4.1 enforces a binding's proxy auth on the bridge port too, so the llama.cpp connection (Basic-gated `api-multi`, placeholder key) fails with `401 Basic realm="StartOS"`. llama.cpp 11960:1 adds a Bearer-gated `api-key` host and publishes its key on `public/credentials.json` (Start9Labs/llama-cpp-startos#44). - llama-cpp backend: hostId `api-key`, keySource `public`, keyRequired false, versionRange `>=11960:1`. An existing connection is repointed to the new address and gets the key on the next start. - syncBackendState: look a public-key backend up in the repointed URL list instead of `connectedIds`, which is computed before the repoint. A backend whose address moved on this start kept its old key until a second restart; this hit llama.cpp's move here and vLLM whenever its bridge port moves. - Lockfile pins llama-cpp-startos to #44's head until it reaches `next`. Verified on a 0.4.1.1 box with llama.cpp 11960:1: published 0.12.5:0 connected to llama.cpp (401, placeholder key), then a sideload update to this build. In one start the URL moved to the new host, the key became the published one, the model listed and a chat through /api/chat/completions answered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: require llama.cpp's published key; repin llama-cpp-startos to next llama.cpp 11960:1 gates its API host with Bearer, so a placeholder key can only get a 401. Mark the llama-cpp backend keyRequired, like vLLM, and fix the Configure Backends description (5 locales), which still said llama.cpp needs no key. Repin the lockfile from #44's head to llama-cpp-startos next (6e6a294); #44 was squash-merged, so its head commit is on no branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
MattDHill
pushed a commit
to Start9-Community/DeepseekHarnessStart9
that referenced
this pull request
Nov 3, 2026
….2.1-rc.3:1 StartOS 0.4.1 enforces a binding's proxy auth on the bridge port too, so the llama.cpp route (Basic-gated `api-multi`, `Bearer no-key-required`) fails with `401 Basic realm="StartOS"`. llama.cpp 11960:1 adds a Bearer-gated `api-key` host and publishes its key on `public/credentials.json` (Start9Labs/llama-cpp-startos#44). - llama-cpp backend: hostId `api-key`, keySource `public`, versionRange `>=11960:1`. The key is read with `.const()`, so a rotation restarts dsh onto the new key. - start-sdk 3.1.0 → 3.1.1. - Lockfile pins llama-cpp-startos to #44's head until it reaches `next` (it was still on 5189939, an SDK 3.0.6 commit). - README dependency row; AGENTS.md drops "the gate covers the TLS addresses only", which 0.4.1 made false. Verified on a 0.4.1.1 box with llama.cpp 11960:1: Connect Model Servers lists the model; the route points at the api-key bridge port; dsh's STARTOS_LLAMA_CPP_API_KEY matches the proxy token and a chat completion sent from the dsh container with it answers. After rotating llama.cpp's key, dsh restarted by itself onto the new one. Not verified: a chat typed in the dsh web UI, arm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
On StartOS 0.4.1 the OS proxy enforces a binding's
addSsl.authon the plain bridge port too (0.4.1 release notes: "Enforce HTTP authentication on both plaintext and TLS service connections when an HTTP proxy authentication policy is configured"). llama.cpp has one binding,api-multi:8080, gated with Basicadmin:<uiPassword>for the browser. Services that connect to llama.cpp over the bridge (DeepSeek Harness, Open WebUI) sendBearer no-key-requiredand now get:Reported on a GPU box (llama-cpp 11669:1, DSH 0.2.1-rc.3, StartOS 0.4.1): llama.cpp's own web UI works, DSH and Open WebUI chats fail with an auth error. Reproduced on a 0.4.1.1 dev box.
One binding takes exactly one
ProxyAuth(basicorbearer), and browsers can only do Basic, so one host can't serve both.Fix
api-key, on the same internal port 8080, gated with Bearer, exporting interfaceopenai-api("OpenAI-compatible API", typeapi). The browser interface keeps its id (api), host, addresses and Basic login; it's renamed "Web UI".initializeServicewhen missing (so on install and on update, no migration) and published on a newpublicvolume atcredentials.json→apiKey, the vLLM pattern.publicis included in backups so siblings' configs survive a restore..const()restart onto it; ones that read.once()pick it up on their next start.Rejected alternatives: an unauthenticated bridge-only binding (gives every service on the box keyless llama.cpp, which is what 0.4.1 closed), and
llama-server --api-keywith the proxy gate dropped (browser users would have to paste the key into the web UI, reversing the move of auth to the proxy in 1.0.9994:1).Verified (0.4.1.1 dev box, generic variant, sideload update over 11960:0)
api-multi's assigned ports are unchanged; the key exists after the update.no-key-required/ Basic admin → 401 (Bearer realm="StartOS"); the key → 200 on/v1/modelsand/v1/chat/completions.next.Not verified: GPU variants (no GPU on the test box), arm.
🤖 Generated with Claude Code