Skip to content

Index client hardcodes https://api.pinecone.io and ignores local host configuration #47

@cfgv

Description

@cfgv

The Pinecone::Index class sets a fixed base URI to https://api.pinecone.io:

self.class.base_uri "https://api.pinecone.io"

This means all control plane operations (list_indexes, describe_index, create_index, etc.) are always executed against Pinecone Cloud.
As a result, when running Pinecone Local (Docker), these calls fail with:

"Invalid API Key"

because Pinecone Local ignores API keys and does not use the cloud control plane.

Proposed Solution

Refactor Index to use a configurable base URL, e.g.:

self.class.base_uri Pinecone.configuration.base_url
# or
self.class.base_uri base_uri

Pinecone.configuration.base_url could resolve as:

"https://api.pinecone.io" by default.

"http://#{host}" when host is provided in configuration (e.g. localhost:5081).

Additionally, skip the Authorization header when pointing to Pinecone Local.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions