feat(gateway): send version headers on notification requests - #11966
Merged
Conversation
Wire fetchKilocodeNotifications up to the shared header helpers (getDefaultHeaders + buildKiloHeaders) so notification requests carry User-Agent, X-KILOCODE-EDITORNAME, and org headers instead of only Authorization/Content-Type. Also set KILOCODE_VERSION to the extension version when spawning kilo serve so the extension version flows into the User-Agent, letting the backend discriminate on extension version.
markijbema
marked this pull request as ready for review
July 6, 2026 11:33
markijbema
enabled auto-merge
July 6, 2026 11:33
chrarnoldus
approved these changes
Jul 6, 2026
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by claude-sonnet-5-20260630 · Input: 20 · Output: 3.8K · Cached: 612.2K Review guidance: REVIEW.md from base branch |
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…sion-headers feat(gateway): send version headers on notification requests
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.
What
Send the regular Kilo gateway headers (including version) on the notification endpoint request, so the backend can discriminate on the extension version.
Two changes:
fetchKilocodeNotifications(packages/kilo-gateway/src/api/notifications.ts) previously sent onlyAuthorization+Content-Type, bypassing the shared header helpers. It now spreadsgetDefaultHeaders()+buildKiloHeaders(...), so the request carriesUser-Agent,X-KILOCODE-EDITORNAME, and (when set)X-KILOCODE-ORGANIZATIONID.VS Code
server-manager.tsnow setsKILOCODE_VERSIONto the extension version when spawningkilo serve.getUserAgent()reads this env var, so all gateway requests from the VS Code backend now sendUser-Agent: opencode-kilo-provider/<extensionVersion>.Why
The notification endpoint was the only gateway call not using the shared headers, so it sent no version at all. Separately, the extension version (
KILO_APP_VERSION) was never surfaced in a gateway header — only the VS Code app version (viaX-KILOCODE-EDITORNAME). SettingKILOCODE_VERSIONputs the actual extension version intoUser-Agent, giving the backend a reliable signal to discriminate notifications (and other responses) by extension version.Notes
KILOCODE_VERSIONaffectsUser-Agenton all gateway requests from the VS Code-spawned backend (intended). It does not affectX-KILOCODE-EDITORNAME, which is set explicitly and used verbatim.KILOCODE_VERSION, so akilo servestarted outside VS Code sendsUser-Agent: opencode-kilo-providerwith no version.