chore(release): 0.9.6 -- atomic init + Windows one-command installer - #25
Merged
Conversation
Surfaced by the 2026-05-21 hmj PC dogfood: `llm-relay init` would
write ANTHROPIC_BASE_URL into ~/.claude/settings.json BEFORE the
proxy server was confirmed serving traffic, so any running Claude
Code session would route to a dead port and the symptom looked
like a generic API connection error. This release fixes the
ordering and adds a one-line Windows installer on top.
Key changes:
setup_init.run_init -- atomic ordering
1. detect / port / DB / config / knowledge dir
2. start the proxy server
3. /_health gate
4. write ANTHROPIC_BASE_URL + register MCP **only if** (3) passed
`--skip-server` now also skips routing and the health gate as
one decision; the previous trap of "server skipped, settings
still mutated" is gone.
_start_server on Windows now uses win_service.start_daemon
(pythonw + CREATE_BREAKAWAY_FROM_JOB). The Popen path with
CREATE_NEW_PROCESS_GROUP left the proxy tied to its job object
so the OS killed it when the parent SSH session disconnected.
scripts/install.ps1 -- one-command Windows install
Verifies Python 3.9+, detects an active venv (uses it if
present, else --user with a PATH hint), pip installs
llm-relay[all], then calls llm-relay init. Documented in
README.md "One-command install (Windows native)".
README -- new "Prerequisites" section
Python 3.9+ requirement spelled out, recommended venv flow,
platform-specific install hints (winget / brew / apt).
Tests
New test_skip_server_does_not_write_settings_json regression
pins the atomic contract.
CHANGELOG carries the 0.9.5 Docker hotfix forward.
Tests: 594 pass (+1 new). Ruff clean. NDA grep on diff: 0 hits.
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.
Summary
Surfaced by the 2026-05-21 hmj PC dogfood:
llm-relay initwould writeANTHROPIC_BASE_URLinto~/.claude/settings.jsonbefore the proxyserver was confirmed serving traffic, so any running Claude Code session
would route to a dead port and the symptom looked like a generic API
connection error. This release fixes the ordering and adds a one-line
Windows installer on top.
User-visible deliverable:
That's the whole install (after Python 3.9+ is present).
What changed
llm-relay initis now atomicANTHROPIC_BASE_URL→ settings.json/_healthgateANTHROPIC_BASE_URL+ register MCP only if step 3 passed--skip-servernow also skips the routing change as one decision; theprevious trap of "server skipped, settings still mutated" is gone.
Windows daemon path
_start_serveron Windows delegates towin_service.start_daemon(pythonw +CREATE_BREAKAWAY_FROM_JOB). The previous Popen +CREATE_NEW_PROCESS_GROUPpath left the proxy tied to its job object, so the OS killed it when the
parent SSH session disconnected (observed during the 2026-05-21 dogfood).
scripts/install.ps1-- one-command Windows installwinget installhint linking to theREADME Prerequisites section).
--userwith a PATH hint).pip install --upgrade "llm-relay[all]".llm-relay init.README
New "Prerequisites" section spelling out Python 3.9+, recommended venv flow,
and platform-specific install hints. New "One-command install (Windows native)"
section at the top of Install pointing at
install.ps1.Tests
test_skip_server_does_not_write_settings_jsonregression intests/test_api/test_init.pypins the atomic contract: withskip_server=True, settings.json must remain untouched.Docker carry-over
CHANGELOG carries forward the 0.9.5 Docker fix that landed via PR #24
(Dockerfile
vendor/tokpresslines removed).Test plan
pytest-- 594 pass (+1 new atomic regression). 0 fail.ruff check src/ tests/-- clean.failure path) confirms
settings.jsonis not touched when health gatefails.
Post-merge sequence
git tag v0.9.6+ push.gh release create v0.9.6with CHANGELOG body.gh workflow run publish.yml -f confirm=publish(Trusted Publishing OIDC).install.ps1from hmj PC: fresh PowerShell,irm https://raw.githubusercontent.com/ArkNill/llm-relay/main/scripts/install.ps1 | iex,confirm verify all passes and Claude Code's existing session is not
disrupted mid-flow.