mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-06-19 04:35:34 +00:00
Improve AI configuration and key management
- Remove unnecessary model options from `adr` function. - Update Anthropics key path in `aikeys` function. - Refactor CodeCompanion adapters to use specific Gemini models with different reasoning efforts. - Add gitignore for .aider* files.
This commit is contained in:
parent
73c5b0b7d7
commit
184dad82e0
|
@ -1,8 +1,6 @@
|
|||
function adr --wraps aider
|
||||
aider \
|
||||
--model gemini \
|
||||
--editor-model gpt-4.1-mini \
|
||||
--weak-model gpt-4.1-mini \
|
||||
--dark-mode \
|
||||
--completion-menu-bg-color '#1f1f28' \
|
||||
--vim $argv
|
||||
|
|
|
@ -5,6 +5,6 @@ function aikeys -d 'Set AI API keys' -a service
|
|||
case openai
|
||||
echo "set -lx OPENAI_API_KEY (kp Keys/openai-general -a Password)"
|
||||
case anthro
|
||||
echo "set -lx ANTHROPIC_API_KEY (kp Keys/google-aistudio-key -a Password)"
|
||||
echo "set -lx ANTHROPIC_API_KEY (kp Keys/anthropic-bespin-nvim -a Password)"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,14 +17,15 @@ return {
|
|||
},
|
||||
},
|
||||
strategies = {
|
||||
chat = { adapter = "gemini" },
|
||||
inline = { adapter = "openai_mini" },
|
||||
cmd = { adapter = "openai_mini" },
|
||||
chat = { adapter = "gemini_high" },
|
||||
inline = { adapter = "gemini_none" },
|
||||
cmd = { adapter = "gemini_none" },
|
||||
},
|
||||
adapters = {
|
||||
anthropic = function()
|
||||
return require("codecompanion.adapters").extend("anthropic", {
|
||||
schema = {
|
||||
model = { default = "claude-3-7-sonnet-20250219" },
|
||||
max_tokens = { default = 20000 },
|
||||
},
|
||||
})
|
||||
|
@ -36,6 +37,22 @@ return {
|
|||
},
|
||||
})
|
||||
end,
|
||||
gemini_none = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
schema = {
|
||||
model = { default = "gemini-2.5-flash-preview-04-17" },
|
||||
reasoning_effort = { default = "none" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
gemini_high = function()
|
||||
return require("codecompanion.adapters").extend("gemini", {
|
||||
schema = {
|
||||
model = { default = "gemini-2.5-flash-preview-04-17" },
|
||||
reasoning_effort = { default = "high" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
openai = function()
|
||||
return require("codecompanion.adapters").extend("openai", {
|
||||
schema = {
|
||||
|
@ -44,21 +61,13 @@ return {
|
|||
},
|
||||
})
|
||||
end,
|
||||
openai_mini = function()
|
||||
return require("codecompanion.adapters").extend("openai", {
|
||||
schema = {
|
||||
model = { default = "gpt-4.1-mini" },
|
||||
temperature = { default = 0 },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
|
||||
{
|
||||
"<leader>cf",
|
||||
"<cmd>CodeCompanionChat openai_mini<cr>",
|
||||
"<cmd>CodeCompanionChat gemini_none<cr>",
|
||||
desc = "CodeCompanion Chat (Fast)",
|
||||
silent = true,
|
||||
},
|
||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.aider*
|
Loading…
Reference in a new issue