omnigraph/crates/omnigraph-cli/tests
Ragnor Comerford b999ae3753
feat(engine)!: provider-independent embedding client (RFC-012 Phase 2)
Replace the Gemini-only EmbeddingClient with one resolved EmbeddingConfig { provider, model, base_url, api_key } behind a sealed Provider enum (OpenAiCompatible | Gemini | Mock). OpenAiCompatible (POST {base}/embeddings, bearer, {model, input, dimensions}) covers OpenRouter — the new default gateway — OpenAI direct, and self-hosted endpoints; Gemini keeps its RETRIEVAL_QUERY/RETRIEVAL_DOCUMENT task types; Mock is offline/deterministic. EmbedRole replaces the task-type string.

from_env() resolves provider via OMNIGRAPH_EMBED_PROVIDER (default openai-compatible), base/model via OMNIGRAPH_EMBED_BASE_URL/_MODEL, and the api key from OPENROUTER_API_KEY/OPENAI_API_KEY or GEMINI_API_KEY. BREAKING (pre-release, no back-compat): the default provider is now OpenRouter, OMNIGRAPH_GEMINI_BASE_URL is dropped, and Gemini-only users set OMNIGRAPH_EMBED_PROVIDER=gemini.

Folds in RFC-012 Phase 1 NFR floor: a total-operation OMNIGRAPH_EMBED_QUERY_DEADLINE_MS deadline (default 60s; 0=unbounded) bounds the ~121s worst case, and tracing spans (target omnigraph::embedding) record provider/model/dim/attempt/elapsed/outcome. The offline 'omnigraph embed' CLI follows the resolved provider (its hardcoded gemini-only bail removed). 17 engine embedding unit tests, 4 CLI embed tests, and the search integration suite (22) pass.

Cross-query client reuse and the docs refresh land in follow-up commits.
2026-06-15 17:27:49 +02:00
..
support feat(cli)!: remove legacy data-plane addressing (--target, positional http→remote, --as-on-served) (#238) 2026-06-15 04:29:16 +03:00
cli_cluster.rs feat(cli): cluster-managed maintenance addressing + init signpost (RFC-010 Slice 3) (#221) 2026-06-14 02:52:21 +03:00
cli_cluster_e2e.rs refactor(cli): split the test monolith into command-area suites 2026-06-11 15:16:51 +03:00
cli_data.rs feat(cli)!: remove legacy data-plane addressing (--target, positional http→remote, --as-on-served) (#238) 2026-06-15 04:29:16 +03:00
cli_queries.rs feat(cli)!: remove legacy data-plane addressing (--target, positional http→remote, --as-on-served) (#238) 2026-06-15 04:29:16 +03:00
cli_schema_config.rs feat(cli)!: remove legacy data-plane addressing (--target, positional http→remote, --as-on-served) (#238) 2026-06-15 04:29:16 +03:00
parity_matrix.rs feat: canonical POST /load, deprecate /ingest (RFC-009 Phase 5) (#222) 2026-06-14 03:32:16 +03:00
system_local.rs feat(engine)!: provider-independent embedding client (RFC-012 Phase 2) 2026-06-15 17:27:49 +02:00
system_remote.rs feat(cli)!: unified load command; deprecate ingest as an alias 2026-06-11 04:18:00 +03:00