Conversation
…gs into LiteLLM ctor - Remove `dimensions` from the litellm whitelist in `_ACCEPTED_KWARGS`. Output dimension must be identical for indexing and query for vectors to be comparable, so it's a model-wide setting, not a per-side knob — exposing it under `indexing_params` / `query_params` invited misconfiguration. Updated comment template, README, design doc, and testing plan accordingly. - Plumb `indexing_params` into `create_embedder` and pass them as constructor kwargs to `PacedLiteLLMEmbedder`. The values land in `self._kwargs` and become defaults forwarded into every `litellm.aembedding` call — including paths that don't go through the `INDEXING_EMBED_PARAMS` context var (e.g. the dim probe in `_get_dim`). Per-call overrides (`query_params` spread at query time) still win because `_embed` overlays kwargs on top of `self._kwargs`. Sentence- transformers ignores `indexing_params` (its constructor doesn't accept arbitrary kwargs; `prompt_name` is per-call only).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
shared.embeddermodule-level global. It was set bycreate_embedder()but never read from production code — the embedder flows through theEMBEDDERContextKeyviacontext.provide/use_context.tests/test_daemon.py'sdaemon_sockfixture: the pre-load +dm.create_embeddermonkeypatch was only a win as a cross-module cache via the now-dead global. The session-scoped fixture loads once either way, andrun_daemon()is now exercised on its real embedder path.monkeypatch.setattr(_shared, "embedder", stub)intests/test_chunker_registry.py.CodeChunk.embeddingis annotated with theEMBEDDERContextKey (not the global), and the stub is already wired throughProject.create(..., stub, ...).Test plan
uv run mypy .— passes.uv run pytest tests/test_daemon.py tests/test_chunker_registry.py— passes locally.