Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bd055bb
Add Atomic Chat as a first-class local provider.
yanalialiuk May 22, 2026
c935ec8
Remove dead code
yanalialiuk May 26, 2026
9a6164c
Update Atomic Chat provider icon to theme-colored vector.
yanalialiuk May 28, 2026
08400b5
Allow optional API key for local Atomic Chat and LM Studio providers.
yanalialiuk May 28, 2026
658e8b3
Gate Atomic Chat discovery behind explicit opt-in
yanalialiuk Jun 1, 2026
8dd4327
Update packages/plugin-atomic-chat/src/utils/should-probe-atomic-chat.ts
yanalialiuk Jun 1, 2026
53116fa
Remove dead branch in atomic-chat model ref probe.
yanalialiuk Jun 2, 2026
41b7fee
Fix PR CI: register atomic chat plugin and complete i18n.
yanalialiuk Jun 3, 2026
3b525e6
Format i18n locale files and ProviderConnectDialog with Prettier.
yanalialiuk Jun 3, 2026
d36152a
Address PR review: docs order, narrow annotations, plugin fixes.
yanalialiuk Jun 4, 2026
2aa303d
Align dialog-provider with upstream keymap bindings after rebase.
yanalialiuk Jun 4, 2026
766af3e
Update packages/kilo-vscode/webview-ui/src/components/settings/Provid…
yanalialiuk Jun 4, 2026
6041d8e
Deduplicate Atomic Chat /v1/models fetch on config discovery.
yanalialiuk Jun 4, 2026
ca8cd3c
Fix kilo-code-bot review: import provider key and log cache errors.
yanalialiuk Jun 4, 2026
beb3b39
fix(plugin-atomic-chat): harden discovery and reduce chat toasts
yanalialiuk Jun 4, 2026
bc29b1e
fix(plugin-atomic-chat): refresh model cache on chat validation retries
yanalialiuk Jun 4, 2026
aa1bd10
Update packages/plugin-atomic-chat/src/utils/index.ts
yanalialiuk Jun 4, 2026
998609b
fix(plugin-atomic-chat): repair categorizeError not_found branch
yanalialiuk Jun 4, 2026
379084e
Merge branch 'main' into feat/atomic-chat-local-provider
yanalialiuk Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/kilo-docs/lib/nav/ai-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const AiProvidersNav: NavSection[] = [
links: [
{ href: "/ai-providers/ollama", children: "Ollama" },
{ href: "/ai-providers/lmstudio", children: "LM Studio" },
{ href: "/ai-providers/atomic-chat", children: "Atomic Chat" },
{ href: "/ai-providers/vscode-lm", children: "VS Code LM API" },
{
href: "/ai-providers/openai-compatible",
Expand Down
112 changes: 112 additions & 0 deletions packages/kilo-docs/pages/ai-providers/atomic-chat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
---
title: "Using Atomic Chat with Kilo Code | Local LLMs"
description: "Run local models in Kilo Code via Atomic Chat's OpenAI-compatible API. Setup for VS Code and the CLI."
sidebar_label: Atomic Chat
---

# Using Atomic Chat With Kilo Code

[Kilo Code](https://kilocode.ai/) supports [Atomic Chat](https://atomic.chat/) as a local provider. Atomic Chat runs models on your machine and exposes an OpenAI-compatible API (default `http://127.0.0.1:1337/v1`).

**Website:** [https://atomic.chat/](https://atomic.chat/)
**Repository:** [https://github.com/AtomicBot-ai/Atomic-Chat](https://github.com/AtomicBot-ai/Atomic-Chat)

## Prerequisites

1. Install [Atomic Chat](https://atomic.chat/) (macOS or Windows).
2. Download and load a model in the app.
3. Enable the **local API server** (default port **1337**).
4. Confirm the API responds:

```bash
curl http://127.0.0.1:1337/v1/models
```

## Configuration in Kilo Code

Kilo Code ships the `@kilocode/plugin-atomic-chat` plugin by default. It **does not** call localhost unless you opt in (see below). When enabled, it discovers models from `GET /v1/models` and can warn if the selected model is not loaded.

**Localhost HTTP runs only when one of these is true:**

- You configure `provider.atomic-chat` in `kilo.jsonc`
- You set `"model": "atomic-chat/..."` (or per-agent model uses `atomic-chat`)
- You enable optional auto-detect: `"atomicChat": { "autoDetect": true }` (probes ports **1337** and **1338**)

Otherwise no requests are made to Atomic Chat (suitable for restricted environments).

{% tabs %}
{% tab label="VSCode" %}

Open **Settings** (gear icon) → **Providers** → **Atomic Chat**. No API key is required for the default local server. Adjust the base URL if Atomic Chat uses a non-default host or port.

{% /tab %}
{% tab label="CLI" %}

**Config file** (`~/.config/kilo/kilo.jsonc` or `./kilo.jsonc`):

```jsonc
{
"provider": {
"atomic-chat": {
"options": {
"baseURL": "http://127.0.0.1:1337/v1",
},
},
},
}
```

Set your default model (use an id from `curl http://127.0.0.1:1337/v1/models`):

```jsonc
{
"model": "atomic-chat/gemma-4-E4B-it-IQ4_XS",
}
```

Optional auto-detect without a provider block:

```jsonc
{
"atomicChat": { "autoDetect": true },
}
```

To disable the provider entirely, use `disabled_providers: ["atomic-chat"]` or remove `@kilocode/plugin-atomic-chat` from the `plugin` array in your config.

{% /tab %}
{% /tabs %}

## Custom or unlisted models

If a loaded model does not appear in the picker, register it under `provider.atomic-chat.models`:

```jsonc
{
"model": "atomic-chat/my-local-model",
"provider": {
"atomic-chat": {
"models": {
"my-local-model": {
"id": "exact-id-from-v1-models",
"name": "My Local Model",
},
},
},
},
}
```

See [Custom Models](/docs/code-with-ai/agents/custom-models) for all model fields.

## Tips

- Prefer capable models with large context windows; agent workflows use long prompts.
- Keep only the models you need loaded in Atomic Chat to save memory.
- For embeddings via Atomic Chat, use the **openai-compatible** indexing provider with the same base URL.

## Related

- [LM Studio](/docs/ai-providers/lmstudio)
- [Ollama](/docs/ai-providers/ollama)
- [Local models overview](/docs/automate/extending/local-models)
1 change: 1 addition & 0 deletions packages/kilo-docs/pages/ai-providers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Major AI companies offering powerful models via API:

Run models on your own hardware for privacy and offline use:

- **[Atomic Chat](/docs/ai-providers/atomic-chat)** - Local models with TurboQuant inference and auto-discovery in Kilo Code
- **[Ollama](/docs/ai-providers/ollama)** - Easy local model management
- **[LM Studio](/docs/ai-providers/lmstudio)** - Desktop app for local models
- **[OpenAI Compatible](/docs/ai-providers/openai-compatible)** - Any OpenAI-compatible endpoint
Expand Down
12 changes: 6 additions & 6 deletions packages/kilo-docs/pages/automate/extending/local-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Run AI models locally with Kilo Code"

# Using Local Models

Kilo Code supports running language models locally on your own machine using [Ollama](https://ollama.com/) and [LM Studio](https://lmstudio.ai/). This offers several advantages:
Kilo Code supports running language models locally on your own machine using [Ollama](https://ollama.com/), [LM Studio](https://lmstudio.ai/), and [Atomic Chat](https://atomic.chat/). This offers several advantages:

- **Privacy:** Your code and data never leave your computer.
- **Offline Access:** You can use Kilo Code even without an internet connection.
Expand All @@ -21,23 +21,23 @@ Kilo Code supports running language models locally on your own machine using [Ol

## Supported Local Model Providers

Kilo Code currently supports two main local model providers:
Kilo Code supports several local model providers:
Comment thread
yanalialiuk marked this conversation as resolved.

1. **Ollama:** A popular open-source tool for running large language models locally. It supports a wide range of models.
2. **LM Studio:** A user-friendly desktop application that simplifies the process of downloading, configuring, and running local models. It also provides a local server that emulates the OpenAI API.
2. **LM Studio:** A user-friendly desktop application that simplifies downloading and running local models, with a local server that emulates the OpenAI API.
3. **[Atomic Chat](https://atomic.chat/):** Open-source local AI with TurboQuant-optimized inference, a built-in chat UI, and an OpenAI-compatible API on port **1337**. Kilo Code can discover loaded models when you opt in (`provider.atomic-chat`, `atomicChat.autoDetect`, or an `atomic-chat/...` model).

## Setting Up Local Models

For detailed setup instructions, see:

- [Setting up Ollama](/docs/ai-providers/ollama)
- [Setting up LM Studio](/docs/ai-providers/lmstudio)

Both providers offer similar capabilities but with different user interfaces and workflows. Ollama provides more control through its command-line interface, while LM Studio offers a more user-friendly graphical interface.
- [Setting up Atomic Chat](/docs/ai-providers/atomic-chat)

## Troubleshooting

- **"No connection could be made because the target machine actively refused it":** This usually means that the Ollama or LM Studio server isn't running, or is running on a different port/address than Kilo Code is configured to use. Double-check the Base URL setting.
- **"No connection could be made because the target machine actively refused it":** This usually means that Atomic Chat, Ollama, or LM Studio isn't running, or is on a different port than Kilo Code expects (Atomic Chat: `http://127.0.0.1:1337/v1`, LM Studio: `http://127.0.0.1:1234/v1`, Ollama: `http://127.0.0.1:11434`). Double-check the Base URL setting.

- **Slow Response Times:** Local models can be slower than cloud-based models, especially on less powerful hardware. If performance is an issue, try using a smaller model.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { useLanguage } from "../../context/language"
import { useProvider } from "../../context/provider"
import { useVSCode } from "../../context/vscode"
import { createProviderAction } from "../../utils/provider-action"
import {
ATOMIC_CHAT_PROVIDER_KEY,
isLocalProviderOptionalApiKey,
LOCAL_PROVIDER_API_KEY_PLACEHOLDER,
} from "../../utils/local-providers"

interface ProviderConnectDialogProps {
providerID: string
Expand Down Expand Up @@ -265,7 +270,7 @@ const ProviderConnectDialog: Component<ProviderConnectDialogProps> = (props) =>
<For each={methods()}>
{(item, index) => (
<Button variant="secondary" size="large" onClick={() => selectMethod(index())}>
{item.type === "api" ? language.t("provider.connect.method.apiKey") : item.label}
{item.type === "api" ? item.label || language.t("provider.connect.method.apiKey") : item.label}
</Button>
)}
</For>
Expand All @@ -283,10 +288,29 @@ const ProviderConnectDialog: Component<ProviderConnectDialogProps> = (props) =>
const [value, setValue] = createSignal("")
const [fields, setFields] = createStore<Record<string, string>>({})
const prompts = createMemo(() => method()?.prompts?.filter((prompt) => visible(prompt, fields)) ?? [])
const apiKeyOptional = () => isLocalProviderOptionalApiKey(props.providerID)

function apiKeyDescription() {
if (props.providerID === ATOMIC_CHAT_PROVIDER_KEY) {
Comment thread
yanalialiuk marked this conversation as resolved.
return language.t("provider.connect.atomicChat.description")
}
if (apiKeyOptional()) {
return language.t("provider.connect.apiKey.description.local", { provider: name() })
}
return language.t("provider.connect.apiKey.description", { provider: name() })
}

function apiKeyLabel() {
if (apiKeyOptional()) {
return language.t("provider.connect.apiKey.label.optional", { provider: name() })
}
return language.t("provider.connect.apiKey.label", { provider: name() })
}

function submit(e: SubmitEvent) {
e.preventDefault()
const apiKey = value().trim()
const trimmed = value().trim()
const apiKey = trimmed || (apiKeyOptional() ? LOCAL_PROVIDER_API_KEY_PLACEHOLDER : "")
if (!apiKey) {
setState({ ...state, error: language.t("provider.connect.apiKey.required"), field: "apiKey" })
return
Expand All @@ -313,14 +337,16 @@ const ProviderConnectDialog: Component<ProviderConnectDialogProps> = (props) =>
style={{ display: "flex", "flex-direction": "column", gap: "16px" }}
onSubmit={submit}
>
<div class="provider-connect-body">
{language.t("provider.connect.apiKey.description", { provider: name() })}
</div>
<div class="provider-connect-body">{apiKeyDescription()}</div>
<TextField
autofocus
type="password"
label={language.t("provider.connect.apiKey.label", { provider: name() })}
placeholder={language.t("provider.connect.apiKey.placeholder")}
label={apiKeyLabel()}
placeholder={
apiKeyOptional()
? language.t("provider.connect.apiKey.placeholder.optional")
: language.t("provider.connect.apiKey.placeholder")
}
value={value()}
onChange={setValue}
validationState={state.field === "apiKey" ? "invalid" : undefined}
Expand Down
6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/ar.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/br.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/bs.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/da.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/de.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/kilo-vscode/webview-ui/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,14 @@ export const dict = {
"provider.connect.status.failed": "Authorization failed: {{error}}",
"provider.connect.apiKey.description":
"Enter your {{provider}} API key to connect your account and use {{provider}} models in Kilo.",
"provider.connect.apiKey.description.local":
"Connect to your local {{provider}} server. Leave the API key empty if the server does not require one (default for localhost).",
"provider.connect.atomicChat.description":
"Connect to Atomic Chat on your machine (default http://127.0.0.1:1337). No API key is required for the local server — start Atomic Chat, load a model, then connect.",
"provider.connect.apiKey.label": "{{provider}} API key",
"provider.connect.apiKey.label.optional": "{{provider}} API key (optional)",
"provider.connect.apiKey.placeholder": "API key",
"provider.connect.apiKey.placeholder.optional": "Leave empty for local server",
"provider.connect.apiKey.required": "API key is required",
"provider.connect.prompt.required": "{{field}} is required",
"provider.connect.azure.endpointType.label": "Select Azure endpoint configuration",
Expand Down
Loading
Loading