Skip to content

feat: personalize on c0mpute first, OpenAI as the fallback - #3

Merged
ralyodio merged 1 commit into
masterfrom
feat/c0mpute-first
Nov 7, 2026
Merged

ralyodio merged 1 commit into
masterfrom
feat/c0mpute-first

Conversation

@ralyodio

@ralyodio ralyodio commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Part of the fleet move of AI text calls to c0mpute (ai-providers ROLLOUT.md, wave 2).

  • AIService.generateCompletion asks c0mpute (via @profullstack/ai-providers 0.1.2, exact pin) for the placeholder JSON with generateObject, then runs the existing OpenAI json_object call when c0mpute fails and an OpenAI key is set. Return value is still a JSON string. With no OpenAI key, a c0mpute failure throws AI completion failed: ... as before.
  • Key: c0mputeApiKey option or C0MPUTE_API_KEY. C0MPUTE_DISABLED=1 restores OpenAI-only, including "OpenAI API key is required".
  • Key checks in validateConfig, LeadGenerator.validateConfig and the setup wizard count c0mpute.
  • One c0mpute router per process (keyed by key + timeout), so batchPersonalize's parallel batch shares the concurrency cap. Default timeout 300 s per call.
  • Bug fix: index.js only re-exported batchPersonalize, personalizeTemplate, processLeadsFromCSV, sendBatchEmails, getPersonalizationStats, so LeadGenerator.runCampaign / previewEmail threw ReferenceError. They are now imported.
  • Minor bump to 1.3.0.

Data note: the prompt carries lead first/last name, company, industry and title (not email or phone) and now goes to c0mpute peer nodes first, the same as OutreachGraph does.

Tests: 4 new c0mpute tests; one existing test made independent of an OPENAI_API_KEY in the shell. 201 passing.

🤖 Generated with Claude Code

AIService.generateCompletion now asks the c0mpute peer network for the
placeholder JSON through @profullstack/ai-providers (pinned 0.1.2) and runs
the existing OpenAI json_object call only when c0mpute fails and an OpenAI
key is set.

- An OpenAI key is no longer required; `c0mputeApiKey` option or
  C0MPUTE_API_KEY. C0MPUTE_DISABLED=1 restores OpenAI-only behaviour.
- validateConfig, LeadGenerator.validateConfig and the setup wizard count
  c0mpute.
- One c0mpute router per process, so batchPersonalize keeps to its
  concurrency cap.
- index.js: import the functions LeadGenerator calls. `export ... from`
  does not bind them locally, so runCampaign and previewEmail threw
  ReferenceError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

4 finding(s)

LOW: 4

Severity Rule Location
LOW js-credential-logged examples/sms-demo.js:69
LOW secret-generic-api-key test/cli-setup.test.js:85
LOW secret-generic-api-key test/cli-setup.test.js:91
LOW secret-generic-api-key test/cli-setup.test.js:97

Snippets are redacted; ThreatCrush never prints matched credential material.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​ai-providers@​0.1.2761009691100

View full report

@ralyodio
ralyodio merged commit dfc7d95 into master Nov 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant