mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-06-19 12:45: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
|
function adr --wraps aider
|
||||||
aider \
|
aider \
|
||||||
--model gemini \
|
--model gemini \
|
||||||
--editor-model gpt-4.1-mini \
|
|
||||||
--weak-model gpt-4.1-mini \
|
|
||||||
--dark-mode \
|
--dark-mode \
|
||||||
--completion-menu-bg-color '#1f1f28' \
|
--completion-menu-bg-color '#1f1f28' \
|
||||||
--vim $argv
|
--vim $argv
|
||||||
|
|
|
@ -5,6 +5,6 @@ function aikeys -d 'Set AI API keys' -a service
|
||||||
case openai
|
case openai
|
||||||
echo "set -lx OPENAI_API_KEY (kp Keys/openai-general -a Password)"
|
echo "set -lx OPENAI_API_KEY (kp Keys/openai-general -a Password)"
|
||||||
case anthro
|
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
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,14 +17,15 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
strategies = {
|
strategies = {
|
||||||
chat = { adapter = "gemini" },
|
chat = { adapter = "gemini_high" },
|
||||||
inline = { adapter = "openai_mini" },
|
inline = { adapter = "gemini_none" },
|
||||||
cmd = { adapter = "openai_mini" },
|
cmd = { adapter = "gemini_none" },
|
||||||
},
|
},
|
||||||
adapters = {
|
adapters = {
|
||||||
anthropic = function()
|
anthropic = function()
|
||||||
return require("codecompanion.adapters").extend("anthropic", {
|
return require("codecompanion.adapters").extend("anthropic", {
|
||||||
schema = {
|
schema = {
|
||||||
|
model = { default = "claude-3-7-sonnet-20250219" },
|
||||||
max_tokens = { default = 20000 },
|
max_tokens = { default = 20000 },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -36,6 +37,22 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
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()
|
openai = function()
|
||||||
return require("codecompanion.adapters").extend("openai", {
|
return require("codecompanion.adapters").extend("openai", {
|
||||||
schema = {
|
schema = {
|
||||||
|
@ -44,21 +61,13 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
openai_mini = function()
|
|
||||||
return require("codecompanion.adapters").extend("openai", {
|
|
||||||
schema = {
|
|
||||||
model = { default = "gpt-4.1-mini" },
|
|
||||||
temperature = { default = 0 },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
|
{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
|
||||||
{
|
{
|
||||||
"<leader>cf",
|
"<leader>cf",
|
||||||
"<cmd>CodeCompanionChat openai_mini<cr>",
|
"<cmd>CodeCompanionChat gemini_none<cr>",
|
||||||
desc = "CodeCompanion Chat (Fast)",
|
desc = "CodeCompanion Chat (Fast)",
|
||||||
silent = true,
|
silent = true,
|
||||||
},
|
},
|
||||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.aider*
|
Loading…
Reference in a new issue