How can I enable a limited set of the preset adapters? #2647
paulodiovani
started this conversation in
Adapters
Replies: 1 comment
-
|
Ok, I found how to do it by checking the default config. Here is my custom adapter settings: opts = {
adapters = {
acp = {
opts = {
show_presets = false,
},
claude_code = vim.env.CLAUDE_CODE_OAUTH_TOKEN and "claude_code",
},
http = {
opts = {
show_presets = false,
show_model_choices = true,
},
copilot = "copilot",
ollama = "ollama",
openrouter = vim.env.OPENROUTER_API_KEY and function()
return require("codecompanion.adapters").extend("openai_compatible", {
formatted_name = "OpenRouter",
env = {
url = "https://openrouter.ai/api/v1",
api_key = "OPENROUTER_API_KEY",
chat_url = "/chat/completions",
models_endpoint = "/models"
},
schema = {
model = {
default = "anthropic/claude-sonnet-4",
},
},
})
end,
},
},I might submit a pull request with documentation updates. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use a subset of the preset adapters (currently,
coliplot,openrouter,claude_code, andollama), and I don't need to change their configuration, but I also don't want to list all the adapters I don't have access, just these.The documentation only shows how to create new adapters based on existing ones, but it seems overkill to do something like:
How can I simply provide a list of adapters to show?
If this option does not exist, please consider a feature request.
Beta Was this translation helpful? Give feedback.
All reactions