continue-custom/core/nextEdit
Dallin Romney a33cd37041
fix(openrouter): Gemini 3 tool support, suffix stripping, thought_signature, autocomplete endpoint (#11856)
* fix: multiple OpenRouter provider improvements

- Add google/gemini-3 to tool support prefixes so Gemini 3 models are
  detected as supporting tools via OpenRouter (#8980)
- Strip :free/:extended/:beta suffixes before matching in OpenRouter
  tool support, fixing models like meta-llama/llama-3.2-3b-instruct:free
  not being recognized (#11095)
- Add thought_signature fallback for Gemini models via OpenRouter to
  prevent 400 errors when tool calling (#8980)
- Fix autocomplete/next-edit forcing legacy /completions endpoint on
  OpenRouter, which only supports /chat/completions (#3648)
- Enrich OpenRouter error messages with provider metadata details
  instead of showing generic "Provider returned error" (#11262, #11577)

* fix: remove error enrichment, add TODO for OpenRouter error extraction

* chore: clean up verbose comments and add OpenRouter tool support tests

* style: fix prettier formatting in toolSupport.ts
2026-03-25 20:31:53 -07:00
..
context fix latest user diff tracking 2025-11-30 00:51:54 -08:00
diff fix: properly calculate diff group 2025-08-05 13:23:17 -07:00
providers add current file path to prompt 2025-12-04 12:37:53 -08:00
templating add current file path to prompt 2025-12-04 12:37:53 -08:00
constants.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
DocumentHistoryTracker.ts fix: handle empty map cases properly 2025-07-30 14:56:31 -07:00
DocumentHistoryTracker.vitest.ts test: add vitest for DocumentHistoryTracker 2025-07-30 14:56:39 -07:00
NextEditEditableRegionCalculator.ts docs: add comments to region calculator 2025-08-29 16:18:17 -07:00
NextEditLoggingService.ts Remove debug logging and comment out console statements (#8175) 2025-10-13 11:02:52 -07:00
NextEditPrefetchQueue.ts fix: improvements to next edit (#8129) 2025-10-08 13:09:50 -07:00
NextEditProvider.ts fix(openrouter): Gemini 3 tool support, suffix stripping, thought_signature, autocomplete endpoint (#11856) 2026-03-25 20:31:53 -07:00
NextEditProviderFactory.ts refactor: next edit model provider rename (#7469) 2025-08-29 15:21:26 -07:00
README.md add README 2025-06-30 13:32:44 -07:00
types.ts fix: improvements to next edit (#8129) 2025-10-08 13:09:50 -07:00
utils.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
utils.vitest.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00

Next Edit Prediction

What is it?

How is it different from autocomplete?

Where are we right now?

  • Users can decide to switch between autocomplete and next edit.
  • Next edit triggers at the same time autocomplete is triggered, via vscode's inline completion provider.
  • The following happens after the trigger:
    • User's current cursor position is captured.
    • We define an editable range, ±5 lines from the current cursor position.
    • User's most recent edit is captured as a unified diff. (this is currently buggy)
    • This is sent to the model, which returns a new editable range with next edit predictions.
    • We display this new editable range in a SVG decoration.
    • User can either tab to accept or esc to reject.
      • On accept, the old editable range will be replaced by the new editable region. The cursor will be moved to the last line containing some change.
      • On reject, nothing happens.

What needs to be worked on?

  • User edit captures.
  • Find a better way to trigger next edit (this links back to the diff capture problem).
    • We can see that next edit triggers as soon as the user accepts a change. This is because autocomplete runs the same way.
    • I think autocomplete has some filter logic that doesn't display the ghost text under some conditions, which I am guessing are the following:
      • The model does not have any more completions to create.
      • The prediction at the cursor location has been cached.
  • JetBrains integration.