Skip to content

feat(config): route embeddings through named providers - #678

Open
Zeming-Yuan wants to merge 2 commits into
EverMind-AI:mainfrom
Zeming-Yuan:feat/issue-666-embedding
Open

Zeming-Yuan wants to merge 2 commits into
EverMind-AI:mainfrom
Zeming-Yuan:feat/issue-666-embedding

Conversation

@Zeming-Yuan

Copy link
Copy Markdown
Contributor

Refs #666. Follows #674.

Summary

Embedding previously built its client and startup probe from the inline [embedding] section. A deployment using the same gateway for chat and embedding had to repeat the connection. The index recorded the model ID and vector width, so moving the same model ID to a different gateway was invisible.

[embedding].provider_ref now selects one OpenAI-compatible connection for the whole index. Explicit inline credentials and URL each take precedence for their own field. Query, write, probe and rebuild use the same resolved configuration.

LanceDB and Milvus record a digest of the effective endpoint alongside the model. Moving the endpoint with the same model and width allows startup and produces a persistent warning in everos config show. A successful rebuild records the new endpoint. Existing model and width mismatches still require a rebuild. An older index can acquire its first endpoint record after a successful probe under the index lock.

Area

  • Architecture method
  • Documentation

Verification

make ci
make docs-check
uv run --frozen pytest -q tests/integration/test_named_embedding_provider.py
uv run --frozen pytest -q tests/unit/test_config/test_documented_model_configs.py
# With the CI Milvus 2.6.22 server and EVEROS_TEST_MILVUS_URI configured
EVEROS_TEST_MILVUS_FULL_STARTUP=1 uv run --frozen pytest -q tests/integration/test_milvus_remote.py

Local CI passed with 5,348 unit tests and 246 integration tests. The real Milvus run passed all 10 tests, including endpoint attestation. Documentation checks and the package build passed.

The service regression originally returned no embedding client for a named gateway. It now checks the HTTP requests from write, query and dimension probe, then reads the rebuilt index through a separate connection. The original compatibility fixture covers 102 shipped and documented configurations, both as written and with synthetic credentials.

Checklist

  • This branch covers embedding routing and its index diagnostics.
  • Updated the configuration guide and changelog.
  • Added request-level, CLI and storage regression coverage.
  • Used synthetic credentials and checked documentation links.

Notes for Reviewers

The metadata addition is backward-compatible. Reading configuration uses a bounded, read-only lookup and skips the model probe. This stage uses the existing OpenAI-compatible adapter. Presets, optional LiteLLM support and routing for other roles remain follow-up work.

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; suggestions only, and they are marked inline.

The named embedding route is wired consistently through provider construction, query/write clients, the startup dimension probe, rebuild attestation, archive rebuilds, and safe config display. Endpoint provenance keeps the existing model/width refusals while treating a same-model endpoint move as the accepted persistent warning, and legacy inline configuration remains covered by the compatibility corpus. I found no weakened tests.

Covered: CLAUDE.md and all scoped .claude/rules; the feature diff and affected callers; the accepted #666 design and earlier provenance/factory history; backward compatibility and public API usage; credential isolation; LanceDB/Milvus metadata paths; and the architecture constraints. All static checks passed, including Ruff and all 14 import contracts. The focused affected suite passed 83/83. The unit run produced 5,337 passes and 4 skips, with 11 NLTK failures solely because its required downloaded data was initially absent; after installing the repository-prescribed assets, that complete module passed 15/15. Integration passed 246 with 11 skips and 6 deselections (live Milvus was unavailable). Documentation/link checks passed; Ruby was unavailable for the Makefile YAML step, and the same templates parsed successfully with installed PyYAML.

One nonblocking public-facade example correction is inline.

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers; this can merge as far as I am concerned.

Reviewed the delta from 9fb75f2. It resolves the outstanding public-facade documentation mismatch consistently in the component example, architecture table, and factory contract, without changing runtime behavior or weakening tests. The prior thread is replied to and resolved.

Verification: Ruff and format checks passed for the affected component/tests; 228 named-provider compatibility and integration tests passed; documentation checks passed.

This branch has not been deployed

No deployments
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.

2 participants