Kai Options: Completions
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 Options
The following options are available in Completions:
| Item | Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
General |
Contains general AI completion settings.
| ||||||||||||||||||||||||||
|
Model settings |
Contains settings for the selected AI provider.
|
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.
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
