Skip to content

Pi: Fix Pinecone vector-search output options. The Pinecone block expose... - #6066

Closed
BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
pi/7-RrYvX1
Closed

Pi: Fix Pinecone vector-search output options. The Pinecone block expose...#6066
BillLeoutsakosvl346 wants to merge 3 commits into
stagingfrom
pi/7-RrYvX1

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Task

Fix Pinecone vector-search output options.
The Pinecone block exposes Include Values and Include Metadata checkboxes for the search_vector operation, but apps/sim/tools/pinecone/search_vector.ts always sends both fields as true.
Trace how the options checkbox list is serialized and map its selected IDs to includeValues and includeMetadata in the tool parameters. Use those parameters in the Pinecone query body instead of hardcoded values.
Add focused tests covering neither option, each option individually, and both options. Do not require a live Pinecone account or API key for testing. Run the relevant tests, Biome, and TypeScript checks.

Summary

Implemented Pinecone vector-search option handling.

Changes:

  • apps/sim/tools/pinecone/search_vector.ts

    • Uses the serialized checkbox-derived includeValues and includeMetadata parameters.
    • Defaults both flags to false when unchecked.
  • apps/sim/tools/pinecone/search_vector.test.ts

    • Added focused tests for:
      • Neither option selected
      • Include Values only
      • Include Metadata only
      • Both options selected
    • Tests build the request body directly and require no Pinecone credentials.

Validation could not be run because bunx is unavailable in the sandbox (bunx: command not found).

The Pinecone block expose...
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @BugBot run

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 29, 2026 10:56pm

Request Review

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to Pinecone vector-search request shaping with tests; behavior change is that unchecked options now omit payload fields instead of always including them.

Overview
Pinecone Search With Vector no longer always requests full vector values and metadata from Pinecone. The query body now derives includeValues and includeMetadata from the block’s Options checkbox list (options), defaulting both to false when nothing is selected.

When options is present, selected IDs (includeValues, includeMetadata) drive the flags; otherwise the tool falls back to the existing boolean params via tolerant parsing. The block input schema and tool types were extended with options, and unit tests cover all four checkbox combinations by asserting the built request body (no live API).

Reviewed by Cursor Bugbot for commit 128451b. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread apps/sim/tools/pinecone/search_vector.ts Outdated
@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Maps Pinecone vector-search checkbox options into query flags and stops hardcoding includeValues/includeMetadata as true.

  • search_vector.ts prefers selected options IDs and falls back to safe boolean parsing for direct params.
  • Adds focused unit tests for none/each/both option combinations.
  • Registers options on the Pinecone block inputs and tool param types.

Confidence Score: 5/5

This PR appears safe to merge; the prior string-"false" coercion issue is addressed and no blocking failure remains.

parseBoolean only treats true/1 as true, checkbox-selected IDs drive the query flags when options are present, and tests cover the option matrix without requiring live Pinecone credentials.

Important Files Changed

Filename Overview
apps/sim/tools/pinecone/search_vector.ts Uses checkbox option IDs for includeValues/includeMetadata and parseBoolean so string "false" no longer becomes true.
apps/sim/tools/pinecone/search_vector.test.ts Covers neither, values-only, metadata-only, and both option mappings on the request body builder.
apps/sim/blocks/blocks/pinecone.ts Exposes options on block inputs alongside existing includeValues/includeMetadata fields.
apps/sim/tools/pinecone/types.ts Adds optional options string[]

Reviews (3): Last reviewed commit: "Pi Babysit: address PR #6066 feedback" | Re-trigger Greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @BugBot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1773d7c. Configure here.

Comment thread apps/sim/tools/pinecone/search_vector.test.ts Outdated
Comment thread apps/sim/tools/pinecone/search_vector.ts
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile @BugBot run

@BillLeoutsakosvl346
BillLeoutsakosvl346 deleted the pi/7-RrYvX1 branch July 29, 2026 23:09
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