b1f9878877
model resolution was duplicated inside each agent (opentoad, claude) and PULLFROG_MODEL override was not considered when choosing the agent. now resolveModel() runs first in main.ts, its result feeds into resolveAgent() for agent selection, and the resolved model is passed to the agent via ctx.resolvedModel. agents only handle their own fallback (opentoad: auto-select via opencode models, claude: strip provider prefix). also removes the hardcoded anthropic/claude-sonnet test runner default since ANTHROPIC_API_KEY is no longer in CI. Made-with: Cursor
10 lines
244 B
TypeScript
10 lines
244 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { resolveAgent } from "./agent.ts";
|
|
|
|
describe("resolveAgent", () => {
|
|
it("returns opentoad", () => {
|
|
const agent = resolveAgent({});
|
|
expect(agent.name).toBe("opentoad");
|
|
});
|
|
});
|