mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
feat: Agent SDK auto-detects Claude Code session — no API key needed locally
ANTHROPIC_API_KEY is optional: Agent SDK uses Claude Code OAuth session when running locally (detects CLAUDE_CODE_SSE_PORT). In CI, ANTHROPIC_API_KEY from secrets is used. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ interface AgentOptions {
|
||||
qaGuide: string
|
||||
outputDir: string
|
||||
geminiApiKey: string
|
||||
anthropicApiKey: string
|
||||
anthropicApiKey?: string // Optional — Agent SDK auto-detects Claude Code session
|
||||
maxTurns?: number
|
||||
timeBudgetMs?: number
|
||||
}
|
||||
@@ -518,7 +518,7 @@ ${issueContext}`
|
||||
options: {
|
||||
model: 'claude-sonnet-4-6',
|
||||
systemPrompt,
|
||||
apiKey: anthropicApiKey,
|
||||
...(anthropicApiKey ? { apiKey: anthropicApiKey } : {}),
|
||||
maxTurns,
|
||||
mcpServers: { 'qa-agent': server },
|
||||
allowedTools: [
|
||||
|
||||
@@ -1938,13 +1938,9 @@ async function main() {
|
||||
recordingStartMs = Date.now()
|
||||
narrationSegments.length = 0
|
||||
|
||||
// Hybrid agent (Claude + Gemini) — requires ANTHROPIC_API_KEY
|
||||
// Hybrid agent (Claude + Gemini)
|
||||
// Uses ANTHROPIC_API_KEY in CI, or Claude Code OAuth session locally
|
||||
const anthropicKey = process.env.ANTHROPIC_API_KEY
|
||||
if (!anthropicKey) {
|
||||
throw new Error(
|
||||
'ANTHROPIC_API_KEY is required for issue reproduction. The Gemini-only agent has been removed due to low success rate.'
|
||||
)
|
||||
}
|
||||
const { runHybridAgent } = await import('./qa-agent.js')
|
||||
const issueCtx = opts.diffFile
|
||||
? readFileSync(opts.diffFile, 'utf-8').slice(0, 6000)
|
||||
|
||||
Reference in New Issue
Block a user