mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-08-18 03:46:27 +00:00
feat: implement Flash-First architecture and Multi-Tier model policy
- Transitioned V2 Optimizer to high-density batching (100 items/batch). - Reconfigured Health Cleaner to use Flash/Lite for high-volume URL rescue. - Codified mandates 48-50 in GEMINI.md for AI governance. - Added Agentic Model Selection Matrix to README.md. - Improved error handling to ensure Rate-Limit events trigger Circuit Breakers.
This commit is contained in:
@@ -135,7 +135,8 @@ class IntelligentLinkCleaner:
|
||||
|
||||
try:
|
||||
async with self.ai_semaphore:
|
||||
ai_results = await call_gemini_with_retry(prompt, prefer_flash=False, use_grounding=True)
|
||||
# Mandate 48: Use Flash/Lite for high-volume rescue to avoid Rate-Limits
|
||||
ai_results = await call_gemini_with_retry(prompt, prefer_flash=True, use_grounding=True, role="Link-Rescue")
|
||||
if isinstance(ai_results, list):
|
||||
res_map = {normalize_url(r.get("old_url", "")): r.get("new_url") for r in ai_results}
|
||||
for u in batch:
|
||||
|
||||
+5
-5
@@ -319,7 +319,7 @@ class V2VisionEngine:
|
||||
analyst_results = []
|
||||
|
||||
# 1.1 Fast-Track: Large Batches, NO GROUNDING (Fast)
|
||||
BATCH_SIZE_FAST = 40 # Increased from 25
|
||||
BATCH_SIZE_FAST = 100 # Increased from 40 for optimal RPM/TPM balance
|
||||
total_fast = len(fast_track)
|
||||
for i in range(0, total_fast, BATCH_SIZE_FAST):
|
||||
batch = fast_track[i:i+BATCH_SIZE_FAST]
|
||||
@@ -353,9 +353,9 @@ class V2VisionEngine:
|
||||
}
|
||||
item.update(eval_data)
|
||||
analyst_results.append(item)
|
||||
except:
|
||||
except Exception:
|
||||
for l in batch: analyst_results.append(l)
|
||||
await asyncio.sleep(0.5)
|
||||
await asyncio.sleep(2.0) # Safety delay to respect TPM limits
|
||||
|
||||
# 1.2 Grounded-Track: Small Batches, WITH GROUNDING (Slower but precise)
|
||||
BATCH_SIZE_GROUNDED = 15 # Increased from 5
|
||||
@@ -391,9 +391,9 @@ class V2VisionEngine:
|
||||
}
|
||||
item.update(eval_data)
|
||||
analyst_results.append(item)
|
||||
except:
|
||||
except Exception:
|
||||
for l in batch: analyst_results.append(l)
|
||||
await asyncio.sleep(2.0) # Reduced from 5.0 to improve throughput # --- AGENT PHASE 2: SELECTIVE AUDIT (MCP-Grounded) ---
|
||||
await asyncio.sleep(4.0) # Higher delay for Grounding tasks # --- AGENT PHASE 2: SELECTIVE AUDIT (MCP-Grounded) ---
|
||||
# Identify candidates for high-trust verification
|
||||
audit_candidates = [l for l in analyst_results if "[DE FACTO STANDARD]" in l.get("tags", []) or "[ENTERPRISE-STABLE]" in l.get("tags", [])]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user