Add gitUrl and gitBranch fields to kilo_meta so shared sessions
include repository context. Resolves the best remote (origin > single
available > upstream) and fetches the URL with a 10s in-flight cache.
Introduce X-KILOCODE-FEATURE header for tracking request origin
across different entry points (CLI, VSCode extension, autocomplete).
- Add HEADER_FEATURE, DEFAULT_FEATURE, and ENV_FEATURE constants
- Add getFeatureHeader() helper reading from KILOCODE_FEATURE env var
- Include feature header in buildKiloHeaders() when env var is set
- Set feature to "autocomplete" for FIM/completion requests
- Set KILOCODE_FEATURE="vscode-extension" when spawning CLI from VSCode
- Default to "cli" feature in opencode entry point
- Add unit tests for feature header logic
Disable reasoning for Claude models via Kilo Gateway until the
OpenRouter AI SDK is upgraded to v2.x (which includes the fix for
reasoning_details duplication - OpenRouterTeam/ai-sdk-provider#344).
Changes:
- Remove hardcoded reasoning effort for Claude in options()
- Return empty variants for Claude in variants()
- Remove Claude-specific reasoning.effort in smallOptions()
- Keep thinking/reasoning block stripping code (prevents corrupt
reasoning_details from being sent back to the API)
- Caching continues to work via model.api.id matching
Fixes#303
* fix: support remote MCP server migration in mcp-migrator
The MCP migrator only handled stdio/local MCP servers. When a user
configured a remote streamable-http or sse MCP server in
.kilocode/mcp_settings.json, it failed with:
The "file" argument must be of type string. Received undefined
This happened because convertServer() always assumed local servers,
building a command array from server.command (which is undefined for
remote servers).
Changes:
- Add remote transport type detection (streamable-http, sse)
- Convert remote servers to Config.McpRemote (type: "remote")
- Pass through url and headers fields
- Make command optional in KilocodeMcpServer interface
- Add comprehensive tests for remote server migration
* fix: validate url/command before use in mcp-migrator
Add guard clauses for missing url on remote servers and missing command
on local servers instead of using non-null assertions that could crash
on malformed config files.
---------
Co-authored-by: Kilo Agent <agent@kilo.ai>
Co-authored-by: marius-kilocode <marius@kilocode.ai>
* feat: changelog generation
* refactor: rename all ENV variables to KILO prefix
* refactor: publish rework
* refactor: publish rework
* refactor: unify git commiter action
* refactor: add all kilobots to the team
* feat: add ask agent for read-only Q&A mode
Add a new primary 'ask' agent that answers questions and explains code
without making changes. Permissions are read-only: read, grep, glob,
list, question, webfetch, websearch, codesearch — edit, bash, and task
are denied. Migrators already had 'ask' in their known mode lists.
* fix: preserve .env read gating in ask agent, clarify read-only prompt
Address PR review feedback:
- Re-state *.env pattern map in ask agent permissions so the blanket
deny+allow doesn't bypass the default env file gating
- Update prompt to say 'this agent is read-only' instead of implying
edits are possible on request
- Add .env gating assertions to ask agent test
The Kilocode extension stores project-level MCP settings in
.kilocode/mcp.json, but the migrator was looking for
.kilocode/mcp_settings.json (which is only used for global settings).
This meant local MCP servers were never picked up by the CLI.
refactor(opencode): improve project ID resolution and normalization
Implement logic to resolve a unique project identifier with priority given
to `.kilocode/config.json` and falling back to the git origin remote URL.
The resolved ID is normalized, cached per-instance, and sent as a header
to the Kilo Gateway provider to enable project-specific tracking.
* fix: use 'max' instead of 'xhigh' as highest reasoning effort for Anthropic models on Kilo Gateway
Anthropic's native effort levels are low/medium/high/max, not xhigh.
The upstream merge replaced the Kilo-specific effort mapping with
OPENAI_EFFORTS which uses xhigh. This restores 'max' as the
user-facing variant name while mapping it to 'xhigh' on the wire
for OpenRouter API compatibility.
* fix: clarify comment about OpenRouter effort naming vs Anthropic naming
Enterprise users logging in via OAuth had their organization ID stored
in auth.accountId but the model fetch code never read it, causing the
model list to be fetched from the personal endpoint instead of the
org-specific endpoint that applies the allow list.
Unify ingest queue and session close reasons via `Session.CloseReason` and
ensure `TurnOpen`/`TurnClose` publishing is awaited; mark close reason as
`error` on unexpected exceptions and handle abort-induced stops correctly.
Add ingest queue tests for stable-key coalescing of session open/close and for
including `?v=1` on flush requests.