Repository navigation
feat(embeddings): add Perplexity embeddings provider - #10142
Open
andrewmadson-pplx wants to merge 1 commit into
Open
andrewmadson-pplx wants to merge 1 commit into
andrewmadson-pplx wants to merge 1 commit into
Conversation
|
@andrewmadson-pplx is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
1 of 10 tasks
andrewmadson-pplx
force-pushed
the
pplx/embeddings-provider
branch
from
December 2, 2026 20:50
bd3217f to
9b69d8b
Compare
andrewmadson-pplx
marked this pull request as ready for review
December 2, 2026 20:56
Contributor
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds Perplexity to the Embeddings block with two models and selectable output widths.
No actionable issues were found. Review checks were based on source inspection; no tests or live calls were run.
|
This branch has not been deployed
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
Adds Perplexity as an Embeddings block provider, backed by the Perplexity Embeddings API (
POST https://api.perplexity.ai/v1/embeddings) withpplx-embed-v1-0.6b(up to 1024 dimensions) andpplx-embed-v1-4b(up to 2560). It follows the Mistral provider: adapter, catalog entries, key resolution (BYOK,PERPLEXITY_API_KEY), theembeddings_perplexitytool, block routing, the internal tool registry, pricing, generated metadata and docs.The API returns vectors as
base64_int8and has no float encoding (encoding_format: "float"returns 400), so the adapter decodes the signed int8 values and L2-normalizes them. Normalization keeps cosine similarity unchanged and returns a unit vector for each nonzero vector. Knowledge-base indexing stays off (kbEligible: false), the same as Mistral and Cohere.I work at Perplexity, which operates this API.
Product update (if relevant)
Embeddings block users can pick Perplexity and choose
pplx-embed-v1-4borpplx-embed-v1-0.6b, with Matryoshka dimension reduction down to 128. Docs: integrations/embeddings.Type of Change
Testing
cd apps/sim && bun run test -- lib/embeddings tools/embeddings blocks/blocks/embeddings.test.ts lib/internal/embeddings lib/internal/tool-operations(with the CI env varsNEXT_PUBLIC_APP_URL,DATABASE_URL,ENCRYPTION_KEY): Test Files 20 passed (20), Tests 140 passed (140). The new adapter tests cover the request body (base64_int8, reduceddimensions), the request headers, int8 decoding to unit vectors in input order, and rejection of a non-string embedding, a base64 string that does not round-trip, or a repeated index. The tool projection test now includes the new tool.bun run --cwd apps/sim type-checkandbun run type-check:scripts:esm: exit 0, no diagnostics.bun run lint:check: all 31 tasks pass. The run reports warnings only in files that this PR does not change.bun run check:tool-metadata,check:docs,check:integration-catalog,check:deployment-config,check:mapper-operation,check:canvas-sentencesandcheck:explicit-any, plusapps/sim/scripts/check-block-registry.ts: all exit 0.buildRequestandparse: both models at native width (1024 and 2560), andpplx-embed-v1-4bat 1024 and 128, each returned one unit vector per input at the requested width, with related inputs scoring higher than unrelated ones.To try it: run
bun run dev, add an Embeddings block, set Provider to Perplexity and enter a Perplexity API key. Withpplx-embed-v1-4band default dimensions, embed two or three strings and check you get one 2560-length vector per input, in input order. Set Dimensions to 1024 and check the vectors are 1024 long. Pickpplx-embed-v1-0.6band check the Dimensions dropdown tops out at 1024.Checklist
Screenshots/Videos