Skip to content

Commit 0cd13b1

Browse files
committed
feat(adapters): add support for OpenRouter
1 parent 7cc35b7 commit 0cd13b1

5 files changed

Lines changed: 364 additions & 12 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Thank you to the following people:
3030

3131
- :speech_balloon: [Copilot Chat](https://github.com/features/copilot) meets [Zed AI](https://zed.dev/blog/zed-ai), in Neovim
3232
- :zap: Integrates Neovim with LLMs and Agents in the CLI
33-
- :electric_plug: Support for LLMs from Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI (or [bring your own](https://codecompanion.olimorris.dev/extending/adapters.html))
33+
- :electric_plug: Support for LLMs from [Anthropic](https://platform.claude.com/docs/en/about-claude/models/overview), [DeepSeek](https://www.deepseek.com), [Google Gemini](https://ai.google.dev/gemini-api/docs/models), [GitHub Copilot](https://github.com/features/copilot), [GitHub Models](https://docs.github.com/en/github-models), [Mistral](https://mistral.ai/), [Novita](https://novita.ai/), [Ollama](https://ollama.com/), [OpenAI](https://developers.openai.com/api/docs/models), Azure OpenAI, [OpenRouter](https://openrouter.ai/), [HuggingFace](https://huggingface.co/) and [xAI](https://docs.x.ai/developers/models) out of the box (or [bring your own](https://codecompanion.olimorris.dev/extending/adapters.html))
3434
- :robot: Support for [Agent Client Protocol](https://agentclientprotocol.com/overview/introduction), enabling coding with agents like [Augment Code](https://docs.augmentcode.com/cli/overview), [Cagent](https://github.com/docker/cagent) from Docker, [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex](https://openai.com/codex), [Copilot CLI](https://github.com/features/copilot/cli), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Goose](https://block.github.io/goose/), [Cursor CLI](https://cursor.com/docs/cli/overview), [Kimi CLI](https://github.com/MoonshotAI/kimi-cli), [Kiro](https://kiro.dev/docs/cli/), [Mistral Vibe](https://github.com/mistralai/mistral-vibe) and [OpenCode](https://opencode.ai)
3535
- :heart_hands: User contributed and supported [adapters](https://codecompanion.olimorris.dev/configuration/adapters-http#community-adapters)
3636
- :battery: Support for [Model Context Protocol (MCP)](https://codecompanion.olimorris.dev/model-context-protocol#model-context-protocol-mcp-support)

doc/codecompanion.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*codecompanion.txt* For NVIM v0.11 Last change: 2026 June 04
1+
*codecompanion.txt* For NVIM v0.11 Last change: 2026 June 17
22

33
==============================================================================
44
Table of Contents *codecompanion-table-of-contents*
@@ -80,7 +80,7 @@ FEATURES *codecompanion-welcome-features*
8080

8181
- Copilot Chat <https://github.com/features/copilot> meets Zed AI <https://zed.dev/blog/zed-ai>, in Neovim
8282
- Integrates Neovim with LLMs and Agents in the CLI
83-
- Support for LLMs from Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI out of the box (or bring your own!)
83+
- Support for LLMs from Anthropic <https://platform.claude.com/docs/en/about-claude/models/overview>, DeepSeek <https://www.deepseek.com>, Google Gemini <https://ai.google.dev/gemini-api/docs/models>, GitHub Copilot <https://github.com/features/copilot>, GitHub Models <https://docs.github.com/en/github-models>, Mistral <https://mistral.ai/>, Novita <https://novita.ai/>, Ollama <https://ollama.com/>, OpenAI <https://developers.openai.com/api/docs/models>, Azure OpenAI, OpenRouter <https://openrouter.ai/>, HuggingFace <https://huggingface.co/> and xAI <https://docs.x.ai/developers/models> out of the box (or |codecompanion-extending-adapters|)
8484
- Support for Agent Client Protocol <https://agentclientprotocol.com/overview/introduction>, enabling coding with agents like Augment Code <https://docs.augmentcode.com/cli/overview>, Cagent <https://github.com/docker/cagent> from Docker, Claude Code <https://docs.anthropic.com/en/docs/claude-code/overview>, Cline CLI <https://docs.cline.bot/home>, Codex <https://openai.com/codex>, Copilot CLI <https://github.com/features/copilot/cli>, Gemini CLI <https://github.com/google-gemini/gemini-cli>, Goose <https://block.github.io/goose/>, Cursor CLI <https://cursor.com/docs/cli/overview>, Kilo Code <https://kilo.ai>, Kimi CLI <https://github.com/MoonshotAI/kimi-cli>, Kiro <https://kiro.dev/cli/>, Mistral Vibe <https://github.com/mistralai/mistral-vibe> and OpenCode <https://opencode.ai>
8585
- User contributed and supported |codecompanion-configuration-adapters-http-community-adapters|
8686
- Support for |codecompanion-model-context-protocol|
@@ -2306,9 +2306,9 @@ conversation.
23062306
opts = {
23072307
context_management = {
23082308
editing = {
2309-
trigger = 0.65,
2310-
keep_cycles = 3, -- preserve tool results from the last N cycles
2311-
exclude_tools = { "memory" }, -- tool names whose results are never edited
2309+
trigger = 0.65, -- Context editing is triggered when X% of the context window is reached
2310+
exclude_tools = { "memory" }, -- Output from these tools is never edited
2311+
keep_cycles = 3, -- Keep the last N cycles of tool results
23122312
},
23132313
},
23142314
},
@@ -2332,14 +2332,14 @@ whether a failure should silently fall back to the chat adapter.
23322332
opts = {
23332333
context_management = {
23342334
compaction = {
2335-
trigger = 0.85,
2335+
trigger = 0.85, -- Compaction is triggered when X% of the context window is reached
2336+
min_token_savings = 10000, -- Only compact when at least this amount of tokens will be saved
23362337

2337-
-- Adapter used to generate the summary. Defaults to the chat adapter.
2338-
-- Accepts a string (adapter name) or a table `{ name = "...", model = "..." }`
2338+
---The adapter to use for compaction. Defaults to the current chat adapter
2339+
---@type nil|string|{ name: string, model:string }
23392340
adapter = nil,
23402341

2341-
-- If the override adapter fails, silently retry with the chat adapter
2342-
fallback_to_chat_adapter = false,
2342+
fallback_to_chat_adapter = false, -- on failure, retry with the chat adapter?
23432343
},
23442344
},
23452345
},

doc/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CodeCompanion is a plugin which enables you to code with AI, using LLMs and agen
2020

2121
- :speech_balloon: [Copilot Chat](https://github.com/features/copilot) meets [Zed AI](https://zed.dev/blog/zed-ai), in Neovim
2222
- :zap: Integrates Neovim with LLMs and Agents in the CLI
23-
- :electric_plug: Support for LLMs from Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI out of the box (or bring your own!)
23+
- :electric_plug: Support for LLMs from [Anthropic](https://platform.claude.com/docs/en/about-claude/models/overview), [DeepSeek](https://www.deepseek.com), [Google Gemini](https://ai.google.dev/gemini-api/docs/models), [GitHub Copilot](https://github.com/features/copilot), [GitHub Models](https://docs.github.com/en/github-models), [Mistral](https://mistral.ai/), [Novita](https://novita.ai/), [Ollama](https://ollama.com/), [OpenAI](https://developers.openai.com/api/docs/models), Azure OpenAI, [OpenRouter](https://openrouter.ai/), [HuggingFace](https://huggingface.co/) and [xAI](https://docs.x.ai/developers/models) out of the box (or [bring your own!](/extending/adapters))
2424
- :robot: Support for [Agent Client Protocol](https://agentclientprotocol.com/overview/introduction), enabling coding with agents like [Augment Code](https://docs.augmentcode.com/cli/overview), [Cagent](https://github.com/docker/cagent) from Docker, [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview), [Cline CLI](https://docs.cline.bot/home), [Codex](https://openai.com/codex), [Copilot CLI](https://github.com/features/copilot/cli), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Goose](https://block.github.io/goose/), [Cursor CLI](https://cursor.com/docs/cli/overview), [Kilo Code](https://kilo.ai), [Kimi CLI](https://github.com/MoonshotAI/kimi-cli), [Kiro](https://kiro.dev/cli/), [Mistral Vibe](https://github.com/mistralai/mistral-vibe) and [OpenCode](https://opencode.ai)
2525
- :heart_hands: User contributed and supported [adapters](/configuration/adapters-http#community-adapters)
2626
- :battery: Support for [Model Context Protocol (MCP)](/model-context-protocol)

0 commit comments

Comments
 (0)