Repository navigation
c0mpute first for AI text in edge functions (broadcast draft, metadata, news post) - #76
Merged
Merged
Conversation
draft-email-broadcast, fetch-metadata and generate-news-post try the c0mpute peer network first (npm:@profullstack/ai-providers@0.2.0 in Deno, via supabase/functions/_shared/c0mpute.ts), then their existing OpenAI and Gemini calls. Timeouts stay under the self-hosted edge runtime's ~60 s worker limit. Banner images stay on OpenAI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan15 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 11 | LOW: 2
Snippets are redacted; ThreatCrush never prints matched credential material. |
A draft from the 9B peer model takes 2-5 minutes, longer than one edge request lives (60 s worker clock, 150 s gateway), so the button hung and came back empty. The function now queues the job and returns its id; the page re-posts the id until the draft is ready (10 min cap) and shows progress. Infernet 5xx during its redeploys counts as pending, and a live done event that beats backfilled tokens triggers one full replay. OpenAI then Gemini answer if c0mpute cannot take or finish the job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased #73 onto main now that saasrow runs again at saasrow.pwa.pit.world.
_shared/c0mpute.ts: c0mpute via @profullstack/ai-providers 0.2.0, 40 s budget inside the ~60 s edge worker limitdraft-email-broadcast("Write with AI" on /admin/email-broadcast): c0mpute, then OpenAI, then Geminifetch-metadata,generate-news-post: same orderEdge functions are deployed by hand to the dev2 functions container;
C0MPUTE_API_KEY(fleetik_live_key) goes involumes/functions/secrets.env.🤖 Generated with Claude Code