Commit graph

5 commits

Author SHA1 Message Date
fb3a4c697d feat(llm): v0.20.0 — LLMRouter dict init + Ollama embed preflight (closes #59, #60)
Some checks failed
CI / test (push) Waiting to run
Mirror / mirror (push) Has been cancelled
Release — PyPI / release (push) Has been cancelled
- LLMRouter.__init__ now accepts a Path | dict; pagepiper ingest scripts
  pass a runtime-constructed config dict instead of a temp file
- _check_ollama_model_pulled() preflight on embed(): checks /api/tags once
  per backend URL and raises RuntimeError("...Fix: ollama pull <model>")
  when the configured embedding model is not pulled; silently skips for
  non-Ollama backends (vLLM, etc.) that don't expose /api/tags
- 6 new tests: dict init paths (x2) + preflight scenarios (x4)
- Existing embed tests updated to mock requests.get to avoid live Ollama calls
2026-05-05 14:59:49 -07:00
7526092481 fix(llm): strengthen embed skip-verification test; add DEMO_MODE check to embed() 2026-05-04 16:02:26 -07:00
8e2d15bcd4 feat(llm): add LLMRouter.embed() for batch embedding generation
Adds embed(texts, model_override, fallback_order) to LLMRouter. Only
openai_compat backends are tried (Ollama/vLLM expose /v1/embeddings;
anthropic and vision_service do not). Uses embedding_model from backend
config when present, falls back to the chat model otherwise. Supports
cf-orch allocation and raises RuntimeError when all backends are exhausted.

4 tests added (TDD: RED → GREEN), 763 total passing, no regressions.
2026-05-04 15:58:44 -07:00
090a86ce1b refactor: update LLMRouter lazy import — circuitforge_core.resources.client → circuitforge_orch.client 2026-04-04 22:16:17 -07:00
ae4624158e feat: add LLM router (extracted from Peregrine) 2026-03-25 11:06:29 -07:00