feat(vscode,gateway): route Mercury Next Edit through Kilo Gateway#10644
Merged
Conversation
Adds a new "Mercury Next Edit via Kilo Gateway" autocomplete model so users can get Next Edit predictions through their Kilo account without needing a separate Inception API key. The gateway proxies to the new /api/nextedit/completions endpoint added in cloud#3516.
Matches the renamed endpoint on the cloud side.
marius-kilocode
approved these changes
May 28, 2026
| "enumDescriptions": [ | ||
| "Codestral via Kilo Gateway", | ||
| "Mercury Edit 2 via Kilo Gateway", | ||
| "Mercury Next Edit (multi-line edit predictions with jump-to-edit UX) via Kilo Gateway", |
Contributor
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Other Observations (not in diff)
Files Reviewed (7 files)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 903,454 tokens Review guidance: REVIEW.md from base branch |
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.
Summary
Adds Kilo Gateway routing for Mercury Next Edit. Companion to #10606 (which added Mercury Next Edit through the direct Inception provider) and cloud#3516 (the gateway endpoint).
A new "Mercury Next Edit via Kilo Gateway" autocomplete model lets users get Next Edit predictions through their Kilo account — no separate Inception API key required.
Changes
packages/kilo-gateway/src/autocomplete.ts: newkilo/inception/mercury-next-editmodel entry (kind: "edit", providerID:kilo)packages/kilo-gateway/src/edit.ts:resolveEditTargetnow returns a real Kilo Gateway URL (/api/nextedit/completions) for kilo edit modelspackages/kilo-gateway/src/server/edit.ts: handler proxies to the gateway with the standard kilo auth +X-KILOCODE-FEATURE: autocompleteheaders, mirroring the FIM handlerpackages/kilo-vscode/src/services/autocomplete/next-edit/MercuryEditProvider.ts+NextEditInlineCompletionProvider.ts: pass the configured provider/model through instead of hardcodinginception/mercury-next-editpackages/kilo-vscode/package.json: addinception/mercury-next-editto the autocomplete model enumTest plan
packages/kilo-gateway/test/edit.test.tscovering the kilo gateway target.bun test(kilo-gateway),bun run test:unit(kilo-vscode), andbun turbo typecheckall pass.