Repository navigation
AI: quality gate on c0mpute first, frontier fallback - #2
Conversation
scoreQuality called api.anthropic.com directly and needed a key that has no credit, so the quality gate failed open on every inbound post. It now goes through @profullstack/ai-providers: c0mpute (our own peer network) first, OpenAI and Anthropic only when a paid key is set. - anthropicApiKey is now optional; c0mpute needs no key, so a receiver with minQualityScore set but no key scores instead of skipping. - QualityScore reports which provider and model answered. - A JSON schema goes to the model, because a small peer node needs to be told the shape. - Timeout default 15s -> 120s: a peer node is slower than Haiku. - Still never throws and still fails open. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
ThreatCrush Security Scan1 finding(s) LOW: 1
Snippets are redacted; ThreatCrush never prints matched credential material. |
scoreQualitycalledapi.anthropic.comdirectly with a key that currently answers "credit balance too low", so the quality gate failed open on every inbound post. It now routes through@profullstack/ai-providers: c0mpute first, OpenAI and Anthropic only as fallbacks.Part of the fleet rollout (ai-providers ROLLOUT.md wave 1) — this one release moves 7 consumers: crawlproof, coinpayportal, bl0ggers, d0rz, logicsrc, media-streamer, niche-db.
Changes
anthropicApiKeyis now optional. c0mpute needs no key, so a receiver withminQualityScoreset but no key now scores instead of silently skipping the gate.openaiApiKeyadded for the other paid fallback.QualityScorereportsproviderandmodel, so you can see what answered.Testing
pnpm test— 54 passed.tsc --noEmitclean. The quality tests now fake c0mpute's real wire protocol (POST /api/chat+ SSE) end to end through the package, plus an injected-router suite.🤖 Generated with Claude Code