fix(tinycortex): key embeddings on the resolved provider slug - #15
Conversation
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Warning Review limit reached
Next review available in: 60 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
EmbeddingConfig.providerfield inmemory_config_from. tinymemorymaindoes not currently compile against tinycortexmain— this fixes that.effective_embedder_slug(config), the slug the embedder ladder actually resolves to — deliberately notconfig.memory().embedding_provider.vendor/tinycortexto the merge commit carrying the field, and updateCargo.lock.Problem
tinycortex added a required
providerfield toEmbeddingConfigin tinyhumansai/tinycortex#123 / #124. This crate never adopted it, so the struct literal incore/src/tinycortex/config.rsno longer compiles:This is a live incompatibility between the two
mainbranches, not something introduced here. It has been latent because consumers pin an older tinycortex; it surfaced while bumping the gitlink in tinyhumansai/openhuman#5544, and I confirmed it reproduces on the commit before that PR's tinycortex change, so it is independent of it.Solution
The interesting part is which value to map, because
provideris not cosmetic — tinycortex documents it as "part of the signature every per-model sidecar row is keyed by, so two backends serving the same model id never share a vector space." It decides which vectors are readable as one space.The field named
memory.embedding_providerlooks like the obvious source and is the wrong one. This crate's ownfactory.rssays so explicitly:Mapping it straight through would file a fully-local user's vectors under the cloud provider. So the mapping walks the same ladder the read and write factories walk, via the existing
effective_embedder_slug, and the reasoning is recorded at the mapping site so the next person does not "simplify" it back to the config field.Existing data is unaffected.
signatures_equivalentdisqualifies on a provider mismatch only when both sides declare a provider, and rows written under the legacy spelling declare none — so previously-embedded rows keep matching regardless of what this now writes.Impact
vendor/tinycortexadvances to0a7a067;Cargo.lockfollows.Validation
cargo check --workspace --all-targets— clean (fails onmainwith the E0063 above).cargo check -p tinymemory-core --features memory-git --all-targets— clean.cargo test -p tinymemory-core tinycortex::config— 4 passed.cargo fmt --check— clean.config.memory().embedding_provider.clone(),embedding_provider_is_the_resolved_slug_not_the_config_fieldfails withright: "ollama"; restored, it passes. The test configures rung 1 of the ladder (explicit Ollama endpoint + model) while leavingmemory.embedding_provider = "cloud", which is exactly the mis-keying scenario.0a7a067,cargo check --no-default-features --features memory-git --libis clean.Related