-
Notifications
You must be signed in to change notification settings - Fork 20
Description
The Pinecone::Index class sets a fixed base URI to https://api.pinecone.io:
pinecone/lib/pinecone/index.rb
Line 9 in 302258a
| 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.