mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
feat: Opus escalation for INCONCLUSIVE issues
Sonnet tries first. If INCONCLUSIVE, automatically retries with claude-opus-4-6 (30 turns). Disable with QA_OPUS_ESCALATION=0. Also: model param added to ResearchOptions for flexibility.
This commit is contained in:
@@ -35,6 +35,7 @@ interface ResearchOptions {
|
||||
anthropicApiKey?: string
|
||||
maxTurns?: number
|
||||
timeBudgetMs?: number
|
||||
model?: string
|
||||
}
|
||||
|
||||
export type ReproMethod = 'e2e_test' | 'video' | 'both' | 'none'
|
||||
@@ -602,7 +603,7 @@ ${issueContext}`
|
||||
prompt:
|
||||
'Write a Playwright E2E test that reproduces the reported bug. Use inspect() to discover selectors, readFixture() or readTest() if you need to understand the fixture API or see existing test patterns, writeTest() to write the test, runTest() to execute it. Iterate until it works or you determine the bug cannot be reproduced.',
|
||||
options: {
|
||||
model: 'claude-sonnet-4-6',
|
||||
model: opts.model ?? 'claude-sonnet-4-6',
|
||||
systemPrompt,
|
||||
...(anthropicApiKey ? { apiKey: anthropicApiKey } : {}),
|
||||
maxTurns,
|
||||
|
||||
@@ -1952,7 +1952,7 @@ async function main() {
|
||||
// QA guide not available
|
||||
}
|
||||
}
|
||||
const research = await runResearchPhase({
|
||||
let research = await runResearchPhase({
|
||||
page,
|
||||
issueContext: issueCtx,
|
||||
qaGuide: qaGuideText,
|
||||
@@ -1963,6 +1963,28 @@ async function main() {
|
||||
console.warn(
|
||||
`Research complete: ${research.verdict} — ${research.summary.slice(0, 100)}`
|
||||
)
|
||||
|
||||
// Opus escalation: if Sonnet couldn't reproduce, try Opus
|
||||
if (
|
||||
research.verdict === 'INCONCLUSIVE' &&
|
||||
anthropicKey &&
|
||||
process.env.QA_OPUS_ESCALATION !== '0'
|
||||
) {
|
||||
console.warn('Escalating to claude-opus-4-6 for complex issue...')
|
||||
research = await runResearchPhase({
|
||||
page,
|
||||
issueContext: issueCtx,
|
||||
qaGuide: qaGuideText,
|
||||
outputDir: opts.outputDir,
|
||||
serverUrl: opts.serverUrl,
|
||||
anthropicApiKey: anthropicKey,
|
||||
model: 'claude-opus-4-6',
|
||||
maxTurns: 30
|
||||
})
|
||||
console.warn(
|
||||
`Opus result: ${research.verdict} — ${research.summary.slice(0, 100)}`
|
||||
)
|
||||
}
|
||||
console.warn(`Evidence: ${research.evidence.slice(0, 200)}`)
|
||||
|
||||
// ═══ Phase 2: Record demo video with demowright ═══
|
||||
|
||||
Reference in New Issue
Block a user