amosblomqvist
0a4a9a11de
BYOK provider embeddings (wave 6 chunk B): kill local transformers
Replace the @huggingface/transformers local embedder (~316MB ONNX cache)
with an EmbeddingPort seam: graph.embeddingModel (nullable "provider:id"
slug) selects an OpenRouter/OpenAI/Gemini adapter, resolved fresh per
call from settings + the auth store so key rotations land immediately.
- src/server/embeddings.ts rewritten: slug grammar, injected-fetch
adapters (OpenRouter input_type, Gemini taskType batching, OpenAI
index-ordered rows), honest resolution (null = skip-with-info, set
model with missing key = honest error), embedNewNodes with model-change
re-embed wipe + ghost pruning + usage steps, federated catalog
(OpenRouter /api/v1/embeddings/models — VERIFIED live, the inverse
path 404s; OpenAI text-embedding- filter; Gemini embedContent filter).
- GET /api/models/embeddings: federated catalog, empty when no keys.
- Extraction tail records stages.embedding usage into the run's money
channel; EMBEDDING_PRICES overlay in core/prices.ts (outside the
sync-generated block), callCost falls back to it; cost-summary folds
the fourth stage; graph-context injection resolves its embedder per
run, fails honestly when unconfigured, records query tokens.
- Settings: GraphSettings.embeddingModel (null factory), section parser
validates slug shape (id may contain colons — OpenRouter :free
suffixes, live catalog fact).
- Removal: @huggingface/transformers uninstalled, PATHS.modelCache and
onnx tracing entries deleted, @huggingface tracing-excludes guard
added, stale sharp/libvips comments updated to historical.
Live-verified on port 3004: catalog federates 36 rows (33 OpenRouter +
3 OpenAI), embedNewNodes embedded 10 nodes via the free liquid/lfm-2.5
model (dim 1024, 435 prompt tokens, 1 call, $0), settings PUT rejects
bad slugs with 400.
Gates: typecheck, lint, 895/895 tests, build.
2026-09-23 03:53:57 +03:00
..
2026-09-19 15:24:26 +03:00
2026-09-11 03:36:09 +03:00
2026-09-22 00:02:07 +03:00
2026-09-19 22:52:40 +03:00
2026-09-19 20:54:16 +03:00
2026-09-22 22:05:27 +03:00
2026-09-22 16:59:16 +03:00
2026-09-05 21:33:13 +03:00
2026-09-13 14:29:16 +03:00
2026-09-11 21:26:29 +03:00
2026-09-23 03:53:57 +03:00
2026-09-15 17:41:56 +03:00
2026-09-23 03:53:57 +03:00
2026-09-19 18:05:30 +03:00
2026-09-22 16:59:16 +03:00
2026-09-23 03:53:57 +03:00
2026-09-23 02:41:04 +03:00
2026-09-23 00:19:16 +03:00
2026-09-19 17:26:57 +03:00
2026-09-12 06:02:40 +03:00
2026-09-17 12:29:17 +03:00
2026-09-15 08:09:56 +03:00
2026-09-23 03:53:57 +03:00
2026-09-09 01:24:08 +03:00
2026-09-23 02:41:04 +03:00
2026-09-23 03:53:57 +03:00
2026-09-22 17:41:07 +03:00
2026-09-13 15:05:05 +03:00
2026-09-22 16:56:44 +03:00
2026-09-15 16:34:25 +03:00
2026-09-22 21:44:43 +03:00
2026-09-19 13:16:34 +03:00
2026-09-19 15:24:26 +03:00
2026-09-19 16:52:09 +03:00
2026-09-12 05:14:40 +03:00
2026-09-11 21:19:45 +03:00
2026-09-11 23:54:06 +03:00
2026-09-14 11:23:28 +03:00
2026-09-11 06:44:20 +03:00
2026-09-22 16:59:16 +03:00
2026-09-12 04:45:58 +03:00
2026-09-22 16:22:57 +03:00
2026-09-19 16:50:20 +03:00
2026-09-15 07:54:50 +03:00
2026-09-22 18:12:57 +03:00
2026-09-22 18:12:57 +03:00
2026-09-19 13:16:34 +03:00
2026-09-18 18:03:25 +03:00
2026-09-15 17:41:56 +03:00
2026-08-22 09:38:54 +03:00
2026-09-19 13:16:34 +03:00
2026-09-22 16:56:44 +03:00
2026-09-15 17:10:49 +03:00
2026-09-19 13:16:34 +03:00
2026-09-17 12:29:17 +03:00
2026-09-22 16:40:31 +03:00
2026-09-17 13:48:04 +03:00
2026-09-22 16:40:31 +03:00
2026-09-22 00:02:07 +03:00
2026-09-13 14:29:16 +03:00
2026-09-22 00:02:07 +03:00
2026-09-23 03:53:57 +03:00
2026-09-23 00:57:28 +03:00
2026-09-23 03:53:57 +03:00
2026-09-22 21:55:33 +03:00
2026-09-19 18:05:30 +03:00
2026-09-23 03:53:57 +03:00
2026-09-19 17:26:57 +03:00
2026-09-22 22:05:27 +03:00
2026-09-19 17:26:57 +03:00
2026-09-12 04:51:39 +03:00
2026-09-22 16:59:16 +03:00
2026-09-01 01:57:13 +03:00
2026-09-22 00:14:56 +03:00
2026-09-23 02:41:04 +03:00