fix: port skill scripts to pinecone 9.1.0 - #12
Merged
Conversation
The published plugin ships scripts that do not work. Eight pinned `pinecone>=8.0.0`, which resolves to 9.1.0, and five were broken — chat.py did not even import. Anyone installing this plugin hits these. v9 removed the pinecone_plugins system and made the data plane keyword-only: - chat.py: import moves to `pinecone.models.assistant` - chat/context/upload: `pc.assistant.Assistant(...)` is gone; use the namespace form, `pc.assistants.chat(assistant_name=...)` etc. - sync.py: takes a handle via `pc.assistants.describe(name=...)`, which carries a client back-reference so its five existing asst.* calls are unchanged - list.py: `asst.list_files()` on the loop variable, which materializes. Deliberately not `pc.assistants.list_files()` — that returns a Paginator with no __len__, breaking three len() calls - context.py: snippet kind is now a msgspec tag, so getattr(snippet,'type') always returned the default; use isinstance - quickstart: `upsert_records` is keyword-only, and Hit renamed its wire fields so `hit['_id']`/`hit['_score']` KeyError Also fixes two pre-existing display bugs found by running against a live assistant: status colour-coding compared lowercase against an API that returns "Ready"/"Available", and the Region column always printed "unknown" because AssistantModel has no region field. All scripts now pin `pinecone==9.1.0` with `requires-python = ">=3.10"`, which 9.1.0 requires. This is a direct hand-patch rather than a sync, because the sync pipeline cannot deliver it yet. Identical changes are on the base repo, so the first full sync will carry the same content. This repo's cursor_plugin source tags and its own command syntax are untouched. Verified: no v8 patterns remain, all 9 compile, 8 of 9 render --help (quickstart_complete has no CLI). The equivalent base-repo change was exercised end-to-end against a live assistant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Ships the pinecone 9.1.0 script fixes. This repo has no release automation — no release.yml, no CHANGELOG — so the version is hand-maintained. It has sat at 1.0.0 since the first draft, through content changes as large as prefixing every skill and adding the full-text-search skill. Whether Cursor needs this to propagate is undocumented. The plugin schema makes version optional (required is just ["name"]) and marketplace entries pin only name + source with no version, ref, or SHA — which suggests source re-resolution rather than version comparison. But Cursor's docs describe refresh behaviour only for team marketplaces, not for official-marketplace installs. Bumping is the safe side of that unknown: it costs nothing, and if the client does gate updates on version, not bumping means installed users never receive a fix for scripts that currently do not run. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
The bundled scripts don't run against the current Pinecone SDK. Eight of nine pinned
pinecone>=8.0.0, which now resolves to 9.1.0; five were broken andchat.pyfailed at import.Fixes
chat.pyfrom pinecone_plugins...→ModuleNotFoundErrorfrom pinecone.models.assistant import Messagechat,context,uploadpc.assistant.Assistant(...)→AttributeErrorpc.assistants.chat(assistant_name=…)etc.sync.pypc.assistants.describe(name=…)list.pyasst.list_files()on the loop variablecontext.pygetattr(snippet,'type')always"text"isinstance— the kind is a msgspec tag in v9upsert.py,quickstart_complete.pyupsert_records(namespace, records)→TypeErrorquickstart_complete.pyhit['_id']/hit['_score']→KeyErrorhit['id']/hit['score']Two notes on choices:
list.pyusesasst.list_files(), notpc.assistants.list_files()— the latter returns aPaginatorwith no__len__, which would break threelen()calls.upsert_recordsis keyword-only, not reordered. Positional throws regardless of argument order.Also fixes two display bugs: status colour-coding compared lowercase against an API returning
Ready/Available, and theRegioncolumn always printedunknown(AssistantModelhas noregionfield).Pins
All nine now pin
pinecone==9.1.0withrequires-python = ">=3.10", which 9.1.0 requires. The previous floating pin is how this broke without a commit here.Version bumped to
1.0.1.Verification
No v8 patterns remain; all 9 compile; 8 of 9 render
--help(quickstart_complete.pyhas no CLI). Exercised end-to-end against a live assistant: create → upload →list --files→ chat with citations → context → sync, plus an idempotent re-sync.Heads-up for reviewers: neither the keyword-only change nor the
Hitfield rename appears in the v9 migration guide's breaking-changes list, anddocs.pinecone.io/guides/assistant/chat-with-assistantstill documents the removedpinecone_pluginspatterns.sdk.pinecone.iomatches the installed package.🤖 Generated with Claude Code