Skip to content

[Bug] Incorrect typing in IndexAsyncio.query method for filter parameter. #461

Open

Description

@DevParapalli

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

Not necessarily, but I encountered it while converting my code to use v6

Describe the bug
Filter parameter is typed to accept only {'$eq':'value'} rather than {'key':{'$eq':'value'}}

Error information
No errors, just a typing issue.

Steps to reproduce the issue locally

async def vdb_entity_query(vector: list[float], namespace: str, entity: str, top_k: int = 1):
    async with PineconeAsyncio(os.getenv("PINECONE_API_KEY")).IndexAsyncio(host=__HOST_ADDR__) as index:
        return await index.query(
            vector=vector,
            top_k=top_k,
            namespace=namespace,
            include_metadata=True,
            include_values=False,
            filter={"entity":{"$eq": entity}}, 
        )

Environment

  • OS Version: Microsoft Windows 11 Enterprise 10.0.22000 Build 22000
  • Python version: 3.12.9
  • Python SDK version: 6.0.1

Additional context
I do not like red squiggly lines under my code.

Activity

  1. added
    bug
    on Feb 21, 2025
  2. added
    status:needs-triage
    on Feb 21, 2025
  3. markos-goupvote commented on Aug 28, 2025

    @markos-goupvote

    pinecone==7.2.0

    Same issue here

    # what query method is satisfied with
    filter: FilterTypedDict = {"$ne": "something"}
    results = index.query(
        vector=embedding,
        top_k=search_top_k,
        include_metadata=True,
        filter=filter,
    )       
    

    When in reality this what is required

    Image
  4. added a commit that references this issue on Feb 8, 2026
    0f9033d
  5. added a commit that references this issue on Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugstatus:needs-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions