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.
21 lines
744 B
JavaScript
21 lines
744 B
JavaScript
import { expect, test } from "bun:test"
|
|
import { agent, connect } from "./aider.agent.js"
|
|
|
|
test("says where Aider keeps its model", () => {
|
|
expect(agent).toMatchObject({ id: "aider", config: "~/.aider.conf.yml", model: "model", prefix: "openai/" })
|
|
})
|
|
|
|
test("points Aider at magpie with its own key", () => {
|
|
const out = connect({
|
|
gateway: { url: "http://127.0.0.1:3425", v1: "http://127.0.0.1:3425/v1", key: "magpie-aider" },
|
|
model: { id: "deepseek/deepseek-flash", name: "DeepSeek Flash" },
|
|
models: [],
|
|
agent: { id: "aider", config: "/home/u/.aider.conf.yml" },
|
|
})
|
|
expect(out).toEqual({
|
|
"openai-api-base": "http://127.0.0.1:3425/v1",
|
|
"openai-api-key": "magpie-aider",
|
|
"show-model-warnings": false,
|
|
})
|
|
})
|