diff --git a/pinecone/control/pinecone.py b/pinecone/control/pinecone.py index 00a37ac83..55860549c 100644 --- a/pinecone/control/pinecone.py +++ b/pinecone/control/pinecone.py @@ -524,9 +524,9 @@ def Index(self, name: str = '', host: str = '', **kwargs): if host != '': # Use host url if it is provided - return Index(api_key=self.config.api_key, host=normalize_host(host), pool_threads=pt, **kwargs) + return Index(api_key=self.config.api_key, host=normalize_host(host), pool_threads=pt, openapi_config=self.config.openapi_config, **kwargs) if name != '': # Otherwise, get host url from describe_index using the index name index_host = self.index_host_store.get_host(self.index_api, self.config, name) - return Index(api_key=self.config.api_key, host=index_host, pool_threads=pt, **kwargs) + return Index(api_key=self.config.api_key, host=index_host, pool_threads=pt, openapi_config=self.config.openapi_config, **kwargs) diff --git a/pinecone/data/index.py b/pinecone/data/index.py index 6befe5eb7..d38bed44c 100644 --- a/pinecone/data/index.py +++ b/pinecone/data/index.py @@ -78,7 +78,7 @@ def __init__( **kwargs ): self._config = ConfigBuilder.build(api_key=api_key, host=host, **kwargs) - + self._config.openapi_config.host = host api_client = ApiClient(configuration=self._config.openapi_config, pool_threads=pool_threads)