Skip to content

feat(gateway): send version headers on notification requests - #11966

Merged
markijbema merged 1 commit into
mainfrom
mark/notification-version-headers
Jul 6, 2026
Merged

feat(gateway): send version headers on notification requests#11966
markijbema merged 1 commit into
mainfrom
mark/notification-version-headers

Conversation

@markijbema

Copy link
Copy Markdown
Contributor

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:

  1. fetchKilocodeNotifications (packages/kilo-gateway/src/api/notifications.ts) previously sent only Authorization + Content-Type, bypassing the shared header helpers. It now spreads getDefaultHeaders() + buildKiloHeaders(...), so the request carries User-Agent, X-KILOCODE-EDITORNAME, and (when set) X-KILOCODE-ORGANIZATIONID.

  2. VS Code server-manager.ts now sets KILOCODE_VERSION to the extension version when spawning kilo serve. getUserAgent() reads this env var, so all gateway requests from the VS Code backend now send User-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 (via X-KILOCODE-EDITORNAME). Setting KILOCODE_VERSION puts the actual extension version into User-Agent, giving the backend a reliable signal to discriminate notifications (and other responses) by extension version.

Notes

  • Setting KILOCODE_VERSION affects User-Agent on all gateway requests from the VS Code-spawned backend (intended). It does not affect X-KILOCODE-EDITORNAME, which is set explicitly and used verbatim.
  • The TUI/standalone-CLI path still doesn't set KILOCODE_VERSION, so a kilo serve started outside VS Code sends User-Agent: opencode-kilo-provider with no version.

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
markijbema marked this pull request as ready for review July 6, 2026 11:33
@markijbema
markijbema enabled auto-merge July 6, 2026 11:33
@markijbema
markijbema merged commit cc418f4 into main Jul 6, 2026
26 checks passed
@markijbema
markijbema deleted the mark/notification-version-headers branch July 6, 2026 11:33
@kilo-code-bot

kilo-code-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/kilo-gateway/src/api/notifications.ts
  • packages/kilo-vscode/src/services/cli-backend/server-manager.ts

Reviewed by claude-sonnet-5-20260630 · Input: 20 · Output: 3.8K · Cached: 612.2K

Review guidance: REVIEW.md from base branch main

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants