Index client hardcodes https://api.pinecone.io and ignores local host configuration
The Pinecone::Index class sets a fixed base URI to https://api.pinecone.io: https://github.com/ScotterC/pinecone/blob/302258a426c8a031d9e62e3ea9859d1fa8b47c3c/lib/pinecone/index.rb#L9
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.