Skip to content

Commit b94cdda

Browse files
feat: enhance ACP server with model metadata and custom provider support
1 parent 4f108d7 commit b94cdda

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,28 @@ For releases before v1.3.35, see [GitHub Releases](https://github.com/VladoIvank
1111
> as the social-share summary (IFTTT → X/Bluesky), capped at 220 chars.
1212
> If omitted, the feed falls back to the first paragraph.
1313
14+
## [2.1.2] — 2026-05-21
15+
16+
> ACP server enhancements that power the new Codeep VS Code 2.2 features — editor clients can now list models per provider and pin a provider, model, or custom endpoint over the protocol.
17+
18+
### Added
19+
20+
- **`session/list_providers` now returns model metadata** — each provider
21+
carries its `models` (id + name), `defaultModel`, and a `dynamicModels`
22+
flag. Lets ACP clients (the VS Code model picker, Zed) build a provider →
23+
model selector without hardcoding a catalog. Backward-compatible: older
24+
clients ignore the extra fields.
25+
- **New `session/set_config_option` ids: `provider` and `customBaseUrl`.**
26+
`provider` switches the active provider (and picks its default model +
27+
protocol); `customBaseUrl` sets the base URL for the `custom`
28+
(OpenAI-compatible) provider. These let editor settings drive provider /
29+
model / endpoint without hand-editing `~/.codeep/config.json`.
30+
31+
### Notes
32+
33+
- Pure additive ACP surface — no behavior change for the TUI or existing
34+
clients. The Codeep VS Code extension 2.2.0 builds on these.
35+
1436
## [2.1.1] — 2026-05-20
1537

1638
> Codeep now works with any OpenAI-compatible endpoint — vLLM, LiteLLM, LM Studio, text-generation-webui. New "Custom (OpenAI-compatible)" provider with a configurable base URL, plus support for the standard OPENAI_BASE_URL env var. Fixes #1.

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,3 +1296,25 @@ The chat sidebar now surfaces two extra ACP signals that previously only the TUI
12961296
- **Diff preview on permission prompts** — manual-mode permission cards now show a `-` / `+` diff for `edit_file`, a content preview for `write_file`, and the full `$ command` + `cwd` for `execute_command`, so users can verify before clicking *Allow*. Payload is truncated (~4 KB per field, 200 lines per file) with a visible marker. Other ACP clients (Zed, etc.) ignore the extra fields silently.
12971297
- **`@file` mentions** — type `@` in the chat input to open a workspace-wide file picker. Pick with arrow keys + Enter; the file's content is inlined into the prompt as an `[Attached files]` preamble. Files over 200 KB are skipped with a marker. Multiple mentions in one message are deduplicated.
12981298
- **Auto-reconnect** — if the CLI process exits unexpectedly (crash, OOM kill, parent restart), the extension reconnects on its own with exponential backoff (1s → 2s → 4s → 8s → 16s → 30s, capped at 6 attempts). The status bar shows the countdown. Configurable idle-watchdog timeout (`codeep.requestTimeoutMinutes`, default 5 min) replaces the old fixed cap so slow reasoning models don't get killed mid-thought.
1299+
1300+
### Editor-native actions (new in 2.2)
1301+
1302+
- **Code Actions (lightbulb)** — select code and press `Ctrl+.` for **Explain**, **Improve / refactor**, **Add tests**, and **Add doc comment**. On a line with an error/warning, a **Fix this problem** quick-fix sends the diagnostic plus the code to Codeep. Everything routes through the chat, so the full agent (file edits via the diff preview, MCP tools) is available.
1303+
- **Model picker in the status bar** — click `Codeep · <model>` (or run **Codeep: Select Provider & Model**) to switch provider + model from a quick-pick. Providers with open-ended catalogs (OpenRouter, Ollama, custom endpoints) let you type a model id.
1304+
- **Self-hosted endpoints from settings** — point the extension at vLLM / LiteLLM / LM Studio / text-generation-webui with `codeep.baseUrl` (e.g. `http://localhost:8000/v1`), plus `codeep.provider` (`custom` or `openai`) and `codeep.model`. The `codeep.provider` / `codeep.model` settings are applied on every connect, so they stay authoritative.
1305+
- **Get Started walkthrough** — a native VS Code walkthrough (Help → Get Started) covering CLI install, opening the chat, editor actions, and choosing a model.
1306+
1307+
> The 2.2 model picker and `custom`-provider settings need CLI **2.1.2+**; they degrade gracefully on older CLIs (free-text model input, and `codeep.baseUrl` still works for the `openai` provider via `OPENAI_BASE_URL`).
1308+
1309+
### Native chat & agent integration (new in 2.3)
1310+
1311+
- **`@codeep` chat participant** — invoke Codeep from VS Code's built-in Chat view: type `@codeep` and ask, or `@codeep /explain` / `@codeep /review` with a selection. Answers come from your configured Codeep provider/model via the CLI (not VS Code's model picker), on an independent session.
1312+
- **`#codeepSkills` language-model tool** — exposes your workspace's Codeep skill bundles (`.codeep/skills/*/SKILL.md`) to VS Code agent mode and `#`-references, so the native agent can follow your project's own workflows.
1313+
- Requires VS Code **1.95+** (for the stable Chat Participant + Language Model Tools APIs).
1314+
1315+
### Source control & sidebar (new in 2.3)
1316+
1317+
- **Generate Commit Message** — a sparkle button in the Source Control panel (and `Codeep: Generate Commit Message` in the palette) reads your staged diff and writes a Conventional Commits message into the commit box. Falls back to the working-tree diff if nothing is staged; asks before replacing a message you've already typed.
1318+
- **Sessions tree view** — a native **Sessions** view in the Codeep sidebar lists saved conversations (title + age). Click to load into the chat, inline-delete, or start a New Session from the title bar.
1319+
- **MCP config validation**`.codeep/mcp_servers.json` (project and global) gets JSON schema validation + autocomplete, so a mistyped `command` / `args` / `env` is caught before a session starts.
1320+
- **Workspace Trust** — declares limited support for untrusted workspaces, with a reminder to review permission prompts carefully (Codeep runs a local agent that can edit files and run commands).

src/acp/server.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,16 @@ export function startAcpServer(): Promise<void> {
796796
} else {
797797
config.set('model', value);
798798
}
799+
} else if (configId === 'provider' && typeof value === 'string') {
800+
// Switch provider without specifying a model — picks the provider's
801+
// default model + protocol. Used by editor clients that pin a provider
802+
// in their settings (e.g. the VS Code `codeep.provider` setting).
803+
setProvider(value);
804+
} else if (configId === 'customBaseUrl' && typeof value === 'string') {
805+
// Base URL for the `custom` (OpenAI-compatible) provider — lets editor
806+
// clients point Codeep at a self-hosted endpoint (vLLM/LiteLLM/LM Studio)
807+
// without hand-editing ~/.codeep/config.json.
808+
config.set('customBaseUrl', value);
799809
} else if (configId === 'language' && typeof value === 'string') {
800810
config.set('language', value as LanguageCode);
801811
} else if (
@@ -889,6 +899,14 @@ export function startAcpServer(): Promise<void> {
889899
hint: p.hint ?? p.description,
890900
requiresKey: !p.noApiKey,
891901
subscribeUrl: p.subscribeUrl,
902+
// Model metadata so ACP clients (e.g. the VS Code model picker) can
903+
// offer a provider → model selector without hardcoding a catalog.
904+
// `dynamicModels` flags providers whose model list is open-ended
905+
// (OpenRouter, Ollama, custom endpoints) — clients should let the
906+
// user type a model id rather than only pick from `models`.
907+
models: p.models.map((m) => ({ id: m.id, name: m.name })),
908+
defaultModel: p.defaultModel,
909+
dynamicModels: p.dynamicModels ?? false,
892910
}));
893911
transport.respond(msg.id, { providers });
894912
}

0 commit comments

Comments
 (0)