extract resolveModel() to run before agent selection
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
This commit is contained in:
committed by
pullfrog[bot]
parent
1f1e3995f9
commit
b1f9878877
@@ -305,11 +305,6 @@ async function runTestForAgent(ctx: RunContext): Promise<ValidationResult> {
|
||||
env.PULLFROG_TEST_REPO_SETUP = testConfig.repoSetup;
|
||||
}
|
||||
|
||||
// use anthropic sonnet to avoid google quota issues and gemini doom-looping
|
||||
if (ctx.agent === "opentoad") {
|
||||
env.PULLFROG_MODEL ??= "anthropic/claude-sonnet-4-6";
|
||||
}
|
||||
|
||||
// build file-based env vars for MCP servers that don't inherit parent env
|
||||
let fileEnv: Record<string, string> | undefined;
|
||||
if (testConfig.fileAgentEnv) {
|
||||
|
||||
Reference in New Issue
Block a user