Selfcoder can suggest code while you type. Suggestions appear as ghost text in the editor and come from a local fill-in-the-middle (FIM) model on your configured backend.
- Press Tab to accept a suggestion.
- Press
Alt+\(Option+\on macOS) to request a suggestion on demand. - Keep typing to ignore it.
Inline completion is off by default. Chat, Plan, Agent, @Selfcoder, and the VS Code model picker work the same whether it is on or off.
- Make a FIM-capable code model available in your backend. See Supported Models.
- Run Selfcoder: Select Inline Code Completion Model from the Command Palette.
- Pick the model.
To turn it off again, run the same command and choose Off.
The command writes the Selfcoder.inlineCodeCompletion setting. You can also set the model ID there directly; an empty value turns inline completion off.
When Selfcoder is connected, the status bar tooltip shows the inline completion state: Off, the model name, or the configured model marked (unavailable) when the active backend does not offer it.
The completion model is independent of the model you select in the sidepanel. A small, fast model can complete code while a larger one handles Chat, Plan, and Agent.
Both models may stay loaded in memory at the same time, so check that your machine has room for both.
Inline completion needs a model trained for fill-in-the-middle completion. General chat or instruct models are not offered.
On Ollama, a model qualifies when Ollama reports the insert capability. ollama show <model> lists it under Capabilities. This also covers custom-named models.
On LM Studio, vLLM, and OpenAI-compatible servers, Selfcoder recognizes these model families by name:
- Qwen Coder (Qwen2.5-Coder, Qwen3-Coder)
- CodeQwen1.5
- Codestral
- DeepSeek Coder
- StarCoder, StarCoderBase, and StarCoder2
- Stable Code
- CodeGemma
- Code Llama
- Granite 4.0
- Seed-Coder
- CodeGeeX4
- Mellum
Known variants without fill-in-the-middle support are left out: CodeQwen1.5 chat builds, Stable Code and CodeGemma instruct builds, Seed-Coder instruct and reasoning builds, Code Llama Python, Code Llama 34B and 70B, other Granite versions, and Mellum2.
Hidden models, embedding models, and, with Selfcoder.privacyProtection set to strict, cloud-tagged models are not offered.
| Backend | Endpoint used |
|---|---|
| LM Studio | POST /v1/completions |
| Ollama | POST /api/generate |
| vLLM and OpenAI compatible | POST /v1/completions, which the server must expose |
Inline completion uses the same backend address and bearer token as chat.
The first suggestion can take longer while the backend loads the model. Selfcoder starts the load and shows suggestions once it finishes.
Inline completion uses only the current document:
- up to 6,000 characters before the cursor
- up to 2,000 characters after the cursor
No other workspace content is collected. Requests go only to your configured backend address.
Selfcoder waits for a short pause in typing before it sends a request, and cancels it when you keep typing or move the cursor. Suggestions are limited to 128 tokens, and to the rest of the line when the cursor is in the middle of a line.
VS Code merges the suggestions of every inline completion provider. With both Copilot and Selfcoder turned on, either suggestion may appear first, and both models work on every pause.
Turn one of them off, for example with "github.copilot.enable": { "*": false } or by choosing Off in Selfcoder: Select Inline Code Completion Model. Alt+] and Alt+[ cycle through the merged suggestions.
See Troubleshooting.