Skip to content

[Bug] updating by metadata filter not works: returns pinecone API error "id is a required field" #637

@M1ha-Shvn

Description

@M1ha-Shvn

Is this a new bug?

  • [+] I believe this is a new bug
  • [+] I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Describe the bug
I can not update vectors in pinecone by metadata filter. Python part goes fine, but pinecone API throws an exception, that ID is required. Seems some parameters are not passed correctly?

Exception:

Traceback (most recent call last):
  File "/opt/.pycharm_helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
           ^^^^^^
  File "<input>", line 1, in <module>
  File "/app/pip/lib/python3.11/site-packages/pinecone/utils/error_handling.py", line 42, in inner_func
    raise e from e
  File "/app/pip/lib/python3.11/site-packages/pinecone/utils/error_handling.py", line 27, in inner_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/db_data/index.py", line 1337, in update
    result = self._vector_api.update_vector(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/endpoint.py", line 102, in __call__
    return self.callable(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/core/openapi/db_data/api/vector_operations_api.py", line 722, in __update_vector
    UpdateResponse | ApplyResult[UpdateResponse], self.call_with_http_info(**kwargs)
                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/endpoint.py", line 134, in call_with_http_info
    return self.api_client.call_api(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/api_client.py", line 320, in call_api
    return self.__call_api(
           ^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/api_client.py", line 185, in __call_api
    raise e
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/api_client.py", line 173, in __call_api
    response_data = self.request(
                    ^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/api_client.py", line 400, in request
    return self.rest_client.POST(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/rest_utils.py", line 146, in POST
    return self.request(
           ^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/rest_urllib3.py", line 270, in request
    return raise_exceptions_or_return(r)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/pip/lib/python3.11/site-packages/pinecone/openapi_support/rest_utils.py", line 49, in raise_exceptions_or_return
    raise PineconeApiException(http_resp=r)
pinecone.exceptions.exceptions.PineconeApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'content-type': 'application/json', 'date': 'Fri, 10 Apr 2026 12:08:42 GMT', 'x-envoy-upstream-service-time': '2', 'content-length': '56', 'server': 'envoy', 'connection': 'close'})
HTTP response body: {"code":3,"message":"ID must not be empty","details":[]}

Steps to reproduce the issue locally
Call code:

pinecone = Pinecone(... some credentials ...)
index = pinecone.Index(name="my_index")
response = index.update(set_metadata={"header_1": "A/B tests", "extra": True}, filter={"article_id": {"$eq": "184"}}, namespace=namespace, dry_run=True)

Get the error from API.
Environment

  • OS Version: python:3.11.10-slim based docker container
  • Python SDK version: 8.1.1
  • Python version: 3.11.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus:needs-triageAn issue that needs to be triaged by the Pinecone team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions