Skip to content

feat(gateway): include version in User-Agent header#8192

Merged
chrarnoldus merged 1 commit into
mainfrom
session/agent_36776282-3105-49c1-b897-0043b007f043
Apr 2, 2026
Merged

feat(gateway): include version in User-Agent header#8192
chrarnoldus merged 1 commit into
mainfrom
session/agent_36776282-3105-49c1-b897-0043b007f043

Conversation

@kilo-code-bot

@kilo-code-bot kilo-code-bot Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Changes the kilo-gateway User-Agent header from static opencode-kilo-provider to opencode-kilo-provider/<version> using the KILOCODE_VERSION env var
  • Renames USER_AGENT constant to USER_AGENT_BASE and adds getUserAgent() function
  • Converts DEFAULT_HEADERS from a static object to getDefaultHeaders() function so the version is resolved at call time
  • Updates all internal consumers (provider.ts, provider-debug.ts, modes.ts, models.ts) to use the new function
  • Exports getUserAgent and getDefaultHeaders from the package index

Change User-Agent from static 'opencode-kilo-provider' to
'opencode-kilo-provider/<version>' using the KILOCODE_VERSION env var.

Rename USER_AGENT constant to USER_AGENT_BASE and convert
DEFAULT_HEADERS from a static object to getDefaultHeaders() function
so the version is resolved at call time.
Comment thread packages/kilo-gateway/src/index.ts
Comment thread packages/kilo-gateway/src/index.ts
@kilo-code-bot

kilo-code-bot Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-gateway/src/index.ts 12 Removing DEFAULT_HEADERS from the public entrypoint is a breaking API change for downstream imports.
packages/kilo-gateway/src/index.ts 89 Renaming exported USER_AGENT to USER_AGENT_BASE is a breaking API change for existing consumers.
Other Observations (not in diff)

No additional issues found outside the diff.

Files Reviewed (7 files)
  • packages/kilo-gateway/src/api/constants.ts - 0 issues
  • packages/kilo-gateway/src/api/models.ts - 0 issues
  • packages/kilo-gateway/src/api/modes.ts - 0 issues
  • packages/kilo-gateway/src/headers.ts - 0 issues
  • packages/kilo-gateway/src/index.ts - 2 issues
  • packages/kilo-gateway/src/provider-debug.ts - 0 issues
  • packages/kilo-gateway/src/provider.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by gpt-5.4-20260305 · 629,380 tokens

@chrarnoldus chrarnoldus merged commit 2fdbf78 into main Apr 2, 2026
15 checks passed
@chrarnoldus chrarnoldus deleted the session/agent_36776282-3105-49c1-b897-0043b007f043 branch April 2, 2026 19:04
jliounis pushed a commit to jliounis/kilocode that referenced this pull request May 18, 2026
…-3105-49c1-b897-0043b007f043

feat(gateway): include version in User-Agent header
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