From 7f6397b514848b98e30abc99faaa3a8d2010b032 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Wed, 17 Jun 2026 17:06:15 +0000 Subject: [PATCH] perf: route Guardian and Vision text analysis to Groq instead of Claude MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guardian anomaly alerts and SITREP are pure text reasoning — Groq's llama-3.3-70b-versatile handles them at near-zero cost with lower latency. Vision Protocol image analysis stays on Claude (claude-opus- 4-8) because Groq has no vision models. Text-only sysinfo snapshots (no image captured) also move to Groq. Co-Authored-By: Claude Sonnet 4.6 --- deploy/reactor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/reactor.py b/deploy/reactor.py index 813847b..7519758 100644 --- a/deploy/reactor.py +++ b/deploy/reactor.py @@ -688,8 +688,8 @@ async def handle_screenshot(payload: dict) -> dict: try: snap_text = json.dumps(result, indent=2)[:3000] prompt = f"Summarize this server system snapshot for JARVIS. Highlight any concerns:\n\n{snap_text}" - analysis = await llm_call([{"role": "user", "content": prompt}], "claude") - provider_used = "claude" + analysis = await llm_call([{"role": "user", "content": prompt}], "groq") + provider_used = "groq" except Exception as e: analysis = f"Analysis unavailable: {e}" @@ -1022,7 +1022,7 @@ async def guardian_loop() -> None: "for Myron. Be direct about severity and what action to take. " "No markdown, no headers." ) - ai_msg = await llm_call([{"role": "user", "content": ai_prompt}], "claude") + ai_msg = await llm_call([{"role": "user", "content": ai_prompt}], "groq") # Update the most recent guardian event with AI analysis await db_execute( """UPDATE guardian_events SET ai_analysis=%s @@ -1062,10 +1062,10 @@ async def _guardian_inject_chat(message: str) -> None: async def handle_sitrep(payload: dict) -> dict: """ Situation Report — comprehensive health briefing across all field stations. - payload: { detail: brief|full, provider: claude } + payload: { detail: brief|full, provider: groq } """ detail = payload.get("detail", "full") - provider = payload.get("provider", "claude") + provider = payload.get("provider", "groq") log.info(f"[GUARDIAN] SITREP requested (detail={detail})")