Repository navigation
docs: exact remediation SQL for known issue #15 (embedding dimension mismatch) - #64
Merged
kartikmanimuthu merged 1 commit intoOct 19, 2026
Conversation
…edding dimension mismatch) The code-side guardrail for this issue already shipped, but the actual database row for the affected tenant was never corrected because DB access was not available in the session that made the code fix. That part cannot be fixed by a PR against this repo — it is deployment- specific data — so this documents the exact SELECT/UPDATE needed, for whoever has DB access to run directly from the known-issues entry instead of re-deriving the root cause.
fabicarvano
added a commit
to fabicarvano/agentfork
that referenced
this pull request
Oct 17, 2026
kartikmanimuthu
approved these changes
Oct 19, 2026
kartikmanimuthu
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @fabicarvano — this is the right shape for a problem that isn't really a code bug: documenting the exact SQL so whoever has database access can apply it without re-deriving the root cause from the writeup.
Agreed on the framing too: nothing was ever successfully written at the wrong dimension, so this is a one-row config correction rather than a re-embedding job. I verified the columns are Unsupported("vector(1024)") in all three places, so the premise holds.
Three small edits I'd like before merge, all in the documented SQL:
- The
UPDATEis broader than theSELECTjustifies. TheSELECTdeliberately catches every provider whose dimension isn't 1024 — including ones that are correct for their own model (the OpenAI-compatible provider defaults to 3072). ForcingembeddingModel = 'amazon.titan-embed-text-v2:0'on each flagged row would silently rewrite a working provider's model, so it's worth saying "confirm the row is Titan before applying" explicitly. - Add a tenant filter (
AND "tenantId" = '<tenant id>') to both statements — on a shared database this otherwise touches every tenant. "embeddingDimensions" IS DISTINCT FROM 1024is one null-safe predicate instead ofIS NULL OR != 1024.
Approving — thanks for closing the loop on a data-level issue that a code PR can't fix.
5 tasks done
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.
The code-side guardrail for this already shipped (KNOWN_MODEL_DIMENSIONS lookup in embeddings.ts). What is still open is the actual database row for the affected tenant, which was never corrected because DB access was not available in the session that made the code fix.
That part cannot be fixed by a PR against this repo at all — it is deployment-specific data, not code. This PR just documents the exact SELECT/UPDATE needed directly in the known-issues entry, so whoever has DB access for the affected deployment can apply it without re-deriving the root cause from the writeup.
No re-embedding is required: since every insert at the wrong dimension failed outright, nothing was ever successfully written with it — this is a one-row config correction.