Skip to content

Release v10.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 17:43
· 20 commits to main since this release

Version 10.1.0 lets a document index embed text for you. It targets the same 2026-07 API as 10.0.0 and removes or renames nothing.

What's new

  • Pinecone can embed your text: mark a string field embed=True or sparse_embed=True. (docs, f32f4e2)

    from pinecone import EmbedQuery, Pinecone, SchemaBuilder
    
    # Reads the API key from the PINECONE_API_KEY environment variable.
    pc = Pinecone()
    
    # Declare a string field that Pinecone embeds for you.
    schema = SchemaBuilder().add_string_field("body", embed=True).build()
    pc.indexes.create(name="articles", schema=schema)
    index = pc.index("articles")
    
    # Write plain-text documents; Pinecone embeds each body.
    index.documents.upsert(
        namespace="en",
        documents=[
            {"_id": "a1", "body": "Aqueducts carried water by gravity"},
            {"_id": "a2", "body": "The Colosseum seated 50,000 people"},
            {"_id": "a3", "body": "Hypocausts heated the public baths"},
            {"_id": "a4", "body": "Roman roads were built in layers"},
        ],
    )
    
    # Search with plain text; Pinecone embeds the query too.
    results = index.documents.search(
        namespace="en",
        top_k=2,
        score_by=[
            EmbedQuery(field="body", query="how did Rome move water"),
        ],
    )
    for doc in results.matches:
        print(doc.id, doc.score)
    • Send at most 96 documents per upsert or update; the default batch_upsert size of 50 fits.
    • An EmbedQuery or SparseEmbedQuery must be the only clause in score_by.
    • Choose the model with FieldEmbedConfig or FieldSparseEmbedConfig; skip storing text with store_text=False.
    • Responses report embedding tokens in usage.embed_total_tokens. (6ff91fd)
  • documents.batch_upsert splits a batch the server rejects as too large, instead of failing it. (8f1f96c)

  • documents.fetch takes a limit of up to 10,000 for filtered fetches. (6ea0da1)

  • HTTP 413 raises PayloadTooLargeError, a subclass of ApiError. (445d520)

  • Python 3.15 is supported, with prebuilt wheels. (04e7125)

Behavior changes

These are subtle changes that clarify or fix how the SDK handles error cases and invalid input. For a working integration the real-world impact should be minimal. The 10.0 to 10.1 upgrade docs shows before and after for each.

Calls that succeeded on 10.0.0

  • To wait for a write, poll documents.search, not documents.fetch; only search reports is_reconciled. (recipe, 203cf92)
  • Unknown keys in a dict score_by clause raise PineconeValueError; deleting them leaves results unchanged. (70a44c5)
  • Some ValueErrors are now PineconeTypeError; catch PineconeError or TypeError. (481b7f9)
  • Documents methods need a dict filter=; call .to_dict() on a filter-builder Condition. (01a6ef3)
  • A plain-http:// index host warns, because it sends your API key unencrypted. (8478ce1)
  • Some error messages and reprs changed; update code that matches their text. (919daba)

Invalid input now fails before the request is sent

  • A zero, negative, or NaN timeout or total_timeout raises PineconeValueError. (0c95d26)
  • A bare string where a list belongs raises PineconeTypeError instead of splitting into characters. (5c815cc)
  • A malformed score_by, top_k, or limit raises PineconeTypeError. (dc490db)
  • A negative wait timeout on indexes.create or indexes.delete raises; -1 still skips waiting. (04fc0c6)
  • A non-string name or ID in a URL raises PineconeTypeError; pass str(...). (481b7f9)
  • An API key with whitespace or non-ASCII characters fails when the client is built. (10fde13)
  • Schema field names over 64 UTF-8 bytes raise in pc.indexes.create(schema={...}). (86583ac)

Security

Fixes

  • 9.x import paths such as pinecone.db_data and pinecone.exceptions work again. (570f591)
  • BatchResult, BatchError, and Condition import from pinecone. (970b229)
  • Single-field clauses accept fields=["name"]. (c94296f)
  • A SparseValues object works as a document field value. (4404dfe)
  • DenseVectorQuery and SparseVectorQuery accept NumPy arrays. (9ee5fa3)
  • A mixed-case schema metric, such as "Cosine", is lowercased before it is sent. (de7d145)
  • IndexModel.dimension, .metric, and .vector_type work for an embed field's dense vector. (6dc91ef)
  • An additional_headers entry replaces the SDK's same-named header, whatever its case. (2c23e7d)
  • EmbedConfig.to_dict() keeps dimension. (bc48c1c)
  • admin.projects.delete_with_cleanup() deletes every page of backups, so the project delete succeeds. (e55f503)
  • The async examples in AGENTS.md now await AsyncPinecone.index(host=...). (fb7d5d3)
  • The PyPI "Documentation" link points at https://sdk.pinecone.io/python/. (6a18c5b)

Upgrading

pip install --upgrade pinecone
# or
uv add 'pinecone>=10.1,<11'

Migrating to V10 still covers upgrades from 9.x. Coming from 10.0? See Upgrading from 10.0 to 10.1.

Full Changelog: v10.0.0...v10.1.0