@profullstack/board-saas 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/src/llm.js +13 -4
package/README.md CHANGED
@@ -103,7 +103,7 @@ Node 22.6+ (uses `node:sqlite`). Configuration comes from the logicsrc vault
103
103
  `profullstack/board-saas--prod` (synced into an env file by `deploy/deploy.sh`):
104
104
  `C0MPUTE_API_KEY`, `C0MPUTE_MODELS`, `RESEND_API_KEY`, `BOARD_SAAS_ADMIN_KEY`,
105
105
  `COINPAY_API_URL`, `COINPAY_BUSINESS_ID`, `COINPAY_API_KEY`, `COINPAY_WEBHOOK_SECRET`.
106
- Optional: `C0MPUTE_SITE_URL` (the c0mpute-hosted copy of the front page), `PORT`,
106
+ Optional: `C0MPUTE_CONCURRENCY` (parallel c0mpute calls, default 2), `C0MPUTE_SITE_URL` (the c0mpute-hosted copy of the front page), `PORT`,
107
107
  `BOARD_DB`, `PUBLIC_URL`.
108
108
 
109
109
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profullstack/board-saas",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Board as a Service: paste a decision brief, five AI advisors (CFO, Growth, Operator, Founder-Time, Contrarian) debate it in three rounds and a chair writes the minutes. Web, HTTP API, CLI, TUI and MCP. Runs on c0mpute.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/llm.js CHANGED
@@ -5,14 +5,21 @@
5
5
  import { C0mputeProvider } from '@profullstack/ai-providers';
6
6
  import { extractJson } from './validate.js';
7
7
 
8
- // The c0mpute CPU house model first: it runs on most nodes, with reasoning off, so it is the
9
- // one that answers when the network is busy. The 9B lives on few nodes and queues behind them.
8
+ // The 9B first, for quality: it answers in about 7-14 s on the network's funded GPU (a Vast RTX
9
+ // 3060), and the 4B models gave shallow minutes (a "strongest dissent" that agreed with the
10
+ // majority). The 4B CPU house models are the fallback when the 9B is busy or no node serves it.
10
11
  const DEFAULT_MODELS = [
12
+ 'eriktonon/qwen3.8-uncensored:9b',
11
13
  'huihui_ai/qwen3.5-abliterated:4b',
12
14
  'qwen3:4b',
13
- 'eriktonon/qwen3.8-uncensored:9b',
14
15
  ];
15
16
 
17
+ // Two calls at a time by default: the one 9B GPU runs two jobs in parallel (Ollama
18
+ // NUM_PARALLEL=2) and also writes OutreachGraph's emails, so five parallel round-1 calls would
19
+ // queue behind each other on it, spill onto CPU nodes at minutes per answer, and starve
20
+ // OutreachGraph. C0MPUTE_CONCURRENCY overrides it.
21
+ const DEFAULT_CONCURRENCY = 2;
22
+
16
23
  export function createModel(env = process.env) {
17
24
  const listed = (env.C0MPUTE_MODELS || '').split(',').map((s) => s.trim()).filter(Boolean);
18
25
  const models = listed.length ? listed : DEFAULT_MODELS;
@@ -20,7 +27,7 @@ export function createModel(env = process.env) {
20
27
  apiKey: env.C0MPUTE_API_KEY,
21
28
  baseUrl: env.C0MPUTE_URL || undefined,
22
29
  models,
23
- concurrency: Number(env.C0MPUTE_CONCURRENCY) || 5,
30
+ concurrency: Number(env.C0MPUTE_CONCURRENCY) || DEFAULT_CONCURRENCY,
24
31
  timeoutMs: Number(env.C0MPUTE_TIMEOUT_MS) || 540_000,
25
32
  stallMs: Number(env.C0MPUTE_STALL_MS) || 120_000,
26
33
  });
@@ -72,7 +79,9 @@ export async function askJson(model, { system, user, maxTokens, validate, log =
72
79
  attempt === 1
73
80
  ? user
74
81
  : `${user}\n\nYour previous reply could not be used: ${lastError}. Reply again with ONLY the JSON object, no prose, no code fences.`;
82
+ const t0 = Date.now();
75
83
  const out = await generateWithPatience(model, { system, user: prompt, maxTokens, temperature: 0.4 }, { log, patienceMs });
84
+ log(`answered by ${out.model} in ${((Date.now() - t0) / 1000).toFixed(1)}s`);
76
85
  lastRaw = out.text;
77
86
  let parsed;
78
87
  try {