magpie (cb406c84) lets a plugin add an agent it has no setup of its own for. This one writes Aider's ~/.aider.conf.yml: the model under litellm's openai/ prefix, magpie's /v1 and Aider's own key. check.mjs skips agent packages as it does middleware; README gains an Agents section. Run: bun test packages/aider (2 pass); bun scripts/check.mjs; the module loaded through magpie's agentplug.Compile and its connect returned the three keys. The same module, in a sandbox magpie, wired a real aider 0.86.2 that answered from a real DeepSeek account, and Disconnect put the file back byte for byte.
24 lines
763 B
JavaScript
24 lines
763 B
JavaScript
// Aider (aider.chat) keeps its settings in ~/.aider.conf.yml and reaches
|
|
// any OpenAI-compatible endpoint through litellm's openai/ prefix, so
|
|
// magpie's model goes in as openai/<provider>/<model>, beside magpie's
|
|
// address and the key magpie keeps for Aider.
|
|
export const agent = {
|
|
id: "aider",
|
|
name: "Aider",
|
|
bin: "aider",
|
|
config: "~/.aider.conf.yml",
|
|
model: "model",
|
|
prefix: "openai/",
|
|
ua: ["aider", "litellm"],
|
|
notice: "Aider reads its settings when it starts: restart it to use the new model.",
|
|
}
|
|
|
|
export function connect({ gateway }) {
|
|
return {
|
|
"openai-api-base": gateway.v1,
|
|
"openai-api-key": gateway.key,
|
|
// magpie's model ids aren't in litellm's list, so aider would warn on each
|
|
"show-model-warnings": false,
|
|
}
|
|
}
|