From 1c60a03bf2d98a58eaf9e8da89a20fab9d886de0 Mon Sep 17 00:00:00 2001 From: Austin DeNoble Date: Thu, 12 Feb 2026 11:47:28 -0500 Subject: [PATCH] make sure NewIndexConnection uses index.private_host if it's available --- internal/pkg/utils/sdk/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/pkg/utils/sdk/client.go b/internal/pkg/utils/sdk/client.go index 0d8e4567..8a666caa 100644 --- a/internal/pkg/utils/sdk/client.go +++ b/internal/pkg/utils/sdk/client.go @@ -157,8 +157,14 @@ func NewIndexConnection(ctx context.Context, pc *pinecone.Client, indexName stri return nil, pcio.Errorf("failed to describe index: %w", err) } + // Use private_host for BYOC if it exists + host := index.Host + if index.PrivateHost != nil { + host = *index.PrivateHost + } + ic, err := pc.Index(pinecone.NewIndexConnParams{ - Host: index.Host, + Host: host, Namespace: namespace, }) if err != nil {