Skip to content

Make control plane base_uri configurable for Pinecone Local support#52

Merged
ScotterC merged 1 commit intomainfrom
feature/configurable-base-uri
Mar 18, 2026
Merged

Make control plane base_uri configurable for Pinecone Local support#52
ScotterC merged 1 commit intomainfrom
feature/configurable-base-uri

Conversation

@ScotterC
Copy link
Copy Markdown
Owner

@ScotterC ScotterC commented Mar 18, 2026

Summary

The control plane (Index, Collection) hardcoded https://api.pinecone.io, making it impossible to use Pinecone Local's database emulator for index management without monkey-patching.

This PR makes base_uri configurable with a default of https://api.pinecone.io — fully backward compatible for cloud users, and now usable with local containers.

The data plane (Vector) already supports http:// prefixes on host parameters, so no changes are needed there. Users just need to pass host: "http://dense-index:5081" instead of host: "dense-index:5081".

Usage

# Cloud (default, nothing changes)
Pinecone.configure do |config|
  config.api_key = "pc-real-key"
end

# Local development
Pinecone.configure do |config|
  config.api_key = "anything"
  config.base_uri = "http://localhost:5080"  # control plane
end
client.index(host: "http://localhost:5081")  # data plane (already worked)

Changes

  • Configuration#base_uri defaults to https://api.pinecone.io instead of raising
  • Index and Collection read base_uri from config instead of hardcoding
  • Removed define_singleton_method monkey-patch from test helpers

Closes #47, closes #51

Test plan

  • All specs pass against local Pinecone containers
  • StandardRB lint clean
  • Verify CI passes with container-based tests

🤖 Generated with Claude Code

The control plane (Index, Collection) hardcoded https://api.pinecone.io,
making local development with Pinecone Local containers impossible without
monkey-patching.

Now base_uri defaults to https://api.pinecone.io (backward compatible) and
can be set to any URL for the control plane. The data plane (Vector) is
unchanged — it already supports http:// prefixes on host parameters.

Closes #47

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ScotterC ScotterC force-pushed the feature/configurable-base-uri branch from de73e23 to 937cc90 Compare March 18, 2026 17:51
@ScotterC ScotterC changed the title Make base_uri configurable for Pinecone Local support Make control plane base_uri configurable for Pinecone Local support Mar 18, 2026
@ScotterC ScotterC marked this pull request as ready for review March 18, 2026 18:24
@ScotterC ScotterC merged commit d0ebed3 into main Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant