✨ feat(headroom): Add opt-in proxy routing extension#293
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new opt-in Pi extension (/headroom wrap|stop|status) that can start/monitor a local Headroom proxy and dynamically route supported providers through it without mutating persistent models.json.
Changes:
- Introduces a
HeadroomProxyManagerto spawn, health-check, and stop a localheadroom proxysubprocess. - Registers a new
headroomslash command to wrap/stop/status provider routing usingpi.registerProvider()/pi.unregisterProvider(). - Adds unit tests covering arg parsing, provider override construction, status formatting, and proxy lifecycle ownership.
Human Reviewer Callouts (Non-Blocking)
- (none)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| extensions/headroom/index.ts | Registers /headroom command, manages provider overrides, and hooks session shutdown cleanup. |
| extensions/headroom/proxy.ts | Implements proxy subprocess lifecycle + /health//stats polling. |
| extensions/headroom/helpers.ts | Provides arg parsing, override construction, and status formatting helpers. |
| extensions/headroom/headroom.test.mjs | Adds test coverage for parsing, override config, and proxy manager behavior. |
e1bfdbb to
06f876c
Compare
Add /headroom wrap, stop, and status commands that manage a local Headroom proxy, dynamically override supported providers, and restore routing without mutating models.json. Headroom installation remains user-managed; missing binaries report uv tool installation guidance. Verification: npm test; npm run typecheck closes #292
Add headroom proxy and index-level command coverage for wrap, stop, shutdown cleanup, provider overrides, model reselection, command help text, argument parsing, and routing rollback. Verification: npm test; npm run typecheck
06f876c to
b26841c
Compare
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.
Add /headroom wrap, stop, and status commands that manage a local Headroom proxy, dynamically override supported providers, and restore routing without mutating models.json.
Headroom installation remains user-managed; missing binaries report uv tool installation guidance.
Verification: npm test; npm run typecheck
closes #292