Skip to content

Final V1 Tweaks#98

Merged
austin-denoble merged 2 commits into
mainfrom
adenoble/last-v1-tweaks
Jun 16, 2026
Merged

Final V1 Tweaks#98
austin-denoble merged 2 commits into
mainfrom
adenoble/last-v1-tweaks

Conversation

@austin-denoble

@austin-denoble austin-denoble commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Problem

A few rough edges in the CLI's JSON input handling ahead of V1:

  • pc index record search had an implicit default of 10 for --top-k, which required awkward internal bookkeeping (topKExplicit, a second-pass JSON probe) to correctly distinguish "flag not passed" from "flag passed as zero" when merging --body input with per-field flags.
  • Record and vector upsert commands exposed both --file and --body pointing at the same value, with --file as the primary — despite the flag accepting inline JSON and stdin in addition to file paths.
  • --sparse-indices in pc index vector query and pc index vector update described itself as an "inline JSON array" without specifying the element type, unlike pc index record search which already documented int32.

Solution

pc index record search: Remove the default from --top-k (now 0, marked required in help). Since 0 uniformly means "not provided," the body merge no longer needs explicit/default tracking — req.Query.TopK == 0 is sufficient. Body parsing switches from argio.ReadAll + manual json.NewDecoder to argio.DecodeJSONArg[pinecone.SearchRecordsRequest], consistent with how pc index vector query handles --body.

Record and vector upsert: Promote --body as the documented primary flag. --file is retained as a hidden alias for backwards compatibility and will be removed after V1.

pc index vector query and pc index vector update: Clarify --sparse-indices flag description to specify uint32 array, making the element type visible and consistent with the int32 array already documented in pc index record search.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

  • just test-unit passes
  • pc index record search without --top-k or a --body containing top_k returns a validation error
  • pc index record search --top-k 5 ... and pc index record search --body '{"query":{"top_k":5,...}}' both work as before
  • pc index record upsert --file and pc index vector upsert --file still work (hidden alias)
  • pc index vector query --sparse-indices and pc index vector update --sparse-indices help text shows uint32 array

@austin-denoble austin-denoble merged commit a754fe1 into main Jun 16, 2026
9 checks passed
@austin-denoble austin-denoble deleted the adenoble/last-v1-tweaks branch June 16, 2026 06:19
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