Kai Options: Completions

From RAD Studio
Jump to: navigation, search

Go Up to Kai Options


Tools > Options > Kai > Completions

Here, you can configure AI code-completion providers for Kai.

Kai supports multiple completion engines, including cloud-based providers and local models. You must sign in or configure the selected provider before using AI completions.

Completions local models.png

Completions Options

The following options are available in Completions:

Item Description

General

Contains general AI completion settings.

Enable auto completions

Enables or disables AI code completions in the Code Editor.

Show as

Selects how AI completions are displayed in the editor.

Ghost text

Displays inline completion suggestions directly in the editor.

CodeInsight symbol

Displays completion suggestions using a symbol indicator.

Active model

Selects the AI provider used for code completions.

GitHub Copilot

Uses GitHub Copilot for code completions.

Local model

Uses a locally installed LLM through supported local providers.

Model settings

Contains settings for the selected AI provider.

GitHub Copilot

Displays settings for GitHub Copilot. Since this is an online model, you must first sign in.

Status

Displays the current connection or authentication status.

Message

Displays provider-related status or authentication messages.

Sign in

Opens the authentication process on a browser.

Sign out

Signs out from the selected provider.

Local model

Displays settings for the selected local model provider.

Backend

Selects the backend used for the chosen local model provider.

Default backend

Uses the default local model backend.

Other (e.g. LM Studio)

Uses another compatible local model backend, such as LM Studio.

URL

Specifies the URL address used to connect to the selected local model provider.

Test connection

Button to test the connection to the selected local model provider.

Name

Specifies the local model name.

Context size

Specifies the context size used by the local model.


Kai uses a Bring Your Own Key (BYOK) model. Depending on the selected provider, you may need a valid account or API key.

FIM Tokens Tab

FIM (Fill-In-the-Middle) tokens are special control tokens that tell a language model to complete text between a given prefix and suffix, rather than simply continuing from the end of a prompt. They are particularly important for code completion in IDEs, where the model needs to insert code at the cursor while preserving the code that follows. Configuring these token parameters allows user integration with additional local AI engines.

Since different model families use different special tokens, Kai now lets you choose predefined options or manually customize the FIM tokens.

Kai completions fim.png

Note:
To determine if a local LLM supports FIM, check the model information on the backend model, such as Hugging Face or the vendor’s documentation. It often explicitly states “Supports Fill-in-the-Middle (FIM).”

Most popular local coding models with FIM support include:

  • StarCoder
  • CodeLlama
  • DeepSeek-Coder
  • Qwen2.5-Coder
  • Codestral
  • Replit Code models

See Also