Skip to content

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

Closed
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
pi/MKyZlhUw
Closed

Pi: Fix Pinecone vector-search output options. The Pinecone block expose...#6064
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
pi/MKyZlhUw

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 output options.

Changes:

  • apps/sim/blocks/blocks/pinecone.ts
    • Maps serialized checkbox-list IDs from params.options to:
      • includeValues
      • includeMetadata
    • Supports array and JSON-string checkbox values.
  • apps/sim/tools/pinecone/search_vector.ts
    • Uses the mapped parameters instead of hardcoded true.
    • Defaults both options to false when unselected.
  • Added focused tests in:
    • apps/sim/tools/pinecone/search_vector.test.ts
    • Covers neither option, each option individually, and both options.

Validation:

  • Attempted to run the focused Vitest test, but bunx is not installed 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:10pm

Request Review

@cursor

cursor Bot commented Jul 29, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Small, scoped Pinecone integration fix; response payloads may omit values/metadata when options are unchecked, changing behavior vs the previous always-true defaults.

Overview
Pinecone vector search now respects the block’s Include Values and Include Metadata checkboxes instead of always requesting both in the query.

The Pinecone block maps the options checkbox list (array or JSON string) to includeValues and includeMetadata in tool params. search_vector sends those flags on the /query body, defaulting to false when unset. Unit tests assert the request body for none, either, or both options—no live API needed.

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

@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 1 potential issue.

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 fd9e9b7. Configure here.

: []
result.includeValues = options.includes('includeValues')
result.includeMetadata = options.includes('includeMetadata')
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Checkbox options never reach query

High Severity

The new mapper reads params.options as an array of selected IDs, but checkbox-list stores each choice as a boolean under the option id (includeValues / includeMetadata), and those keys are dropped during block param extraction. UI selections never set the tool flags, so search always sends both as false after the hardcoded true defaults were removed.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fd9e9b7. Configure here.

Comment on lines +517 to +525
if (params.options != null && params.options !== '') {
const options = Array.isArray(params.options)
? params.options
: typeof params.options === 'string'
? JSON.parse(params.options)
: []
result.includeValues = options.includes('includeValues')
result.includeMetadata = options.includes('includeMetadata')
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Dead options→include mapping*

When a user enables Include Values and/or Include Metadata on a Pinecone search_vector block, CheckboxList persists booleans under the option ids includeValues/includeMetadata and never writes a selected-ID array on params.options. extractBlockParams only emits declared subBlock ids, so this branch never runs and search_vector always sends includeValues/includeMetadata as false (replacing the previous hardcoded true), so checked options never change the Pinecone query body.

Knowledge Base Used: Blocks Module

@greptile-apps

greptile-apps Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Wires Pinecone vector-search Include Values/Metadata from tool params instead of hardcoded true, adds block-side options mapping, and adds unit tests for body flag combinations.

  • search_vector.ts uses params.includeValues / params.includeMetadata with ?? false.
  • pinecone.ts maps params.options checkbox IDs into those booleans.
  • Tests cover neither/each/both flags on the tool body only (no live API).

Confidence Score: 2/5

Not safe to merge: Include Values/Metadata checkboxes still do not drive the Pinecone query, and the hardcoded-true path was replaced with always-false defaults.

CheckboxList persists per-option booleans under option ids while the new params path expects a selected-ID array on options that is never populated; extractBlockParams does not surface those option keys, so search always sends includeValues/includeMetadata false after this change.

Files Needing Attention: apps/sim/blocks/blocks/pinecone.ts, apps/sim/tools/pinecone/search_vector.ts

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/pinecone.ts Options-array mapping does not match CheckboxList storage or extractBlockParams, so UI selections never set include flags.
apps/sim/tools/pinecone/search_vector.ts Correctly reads include flags with false defaults, but receives no true values from the broken block mapping path.
apps/sim/tools/pinecone/search_vector.test.ts Covers tool body combinations only; misses block params and checkbox serialization.

Reviews (1): Last reviewed commit: "Pi: Fix Pinecone vector-search output op..." | Re-trigger Greptile

@BillLeoutsakosvl346
BillLeoutsakosvl346 deleted the pi/MKyZlhUw branch July 29, 2026 22:37
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