Skip to content

fix: row.cosine_similarity was always None on self-host - #33

Merged
RobinXL merged 1 commit into
mainfrom
fix/cosine-alias
Aug 26, 2026
Merged

fix: row.cosine_similarity was always None on self-host#33
RobinXL merged 1 commit into
mainfrom
fix/cosine-alias

Conversation

@RobinXL

@RobinXL RobinXL commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The engine sends the field as vectorSimilarity (run-result rows and analysis statistics alike); the models read only cosineSimilarity, the hosted platform's name. Every self-host caller of
run.results()[i].cosine_similarity got None with vector similarity enabled and computed. Found while verifying the openai v7 bump - the 0.866 was sitting in row.raw the whole time.

Both models now accept both spellings via AliasChoices. Verified live against a v7 engine: cosine_similarity 0.87 on a real run.

The engine sends the field as vectorSimilarity (run-result rows and
analysis statistics alike); the models read only cosineSimilarity, the
hosted platform's name. Every self-host caller of
run.results()[i].cosine_similarity got None with vector similarity
enabled and computed. Found while verifying the openai v7 bump - the
0.866 was sitting in row.raw the whole time.

Both models now accept both spellings via AliasChoices. Verified live
against a v7 engine: cosine_similarity 0.87 on a real run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RobinXL
RobinXL merged commit d3f3517 into main Aug 26, 2026
3 checks passed
@RobinXL
RobinXL deleted the fix/cosine-alias branch August 26, 2026 18:11
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.

1 participant