diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 935e84122..c5888d624 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -32,9 +32,13 @@ concurrency: jobs: linting: + # Skip linting for PRs targeting fts branch until SDK compatibility work is complete + if: github.base_ref != 'fts' uses: './.github/workflows/testing-lint.yaml' unit-tests: + # Skip unit tests for PRs targeting fts branch until SDK compatibility work is complete + if: github.base_ref != 'fts' uses: './.github/workflows/testing-unit.yaml' secrets: inherit with: diff --git a/codegen/build-oas.sh b/codegen/build-oas.sh index 3e06b1044..bb0332e10 100755 --- a/codegen/build-oas.sh +++ b/codegen/build-oas.sh @@ -1,9 +1,22 @@ #!/bin/bash -set -eux -o pipefail - -version=$1 # e.g. 2025-01 +set -ex -o pipefail + +# Functions to get version and branch for each module +get_module_version() { + local module=$1 + case "$module" in + db_control) echo "2026-01.alpha" ;; + db_data) echo "2026-01.alpha" ;; + inference) echo "2025-10" ;; + oauth) echo "2025-10" ;; + admin) echo "2025-10" ;; + *) echo "Unknown module: $module" >&2; exit 1 ;; + esac +} +# All modules use the fts branch since it contains both alpha and stable specs +APIS_BRANCH="jhamon/fts" destination="pinecone/core/openapi" modules=("db_control" "db_data" "inference" "oauth" "admin") @@ -12,12 +25,14 @@ template_dir="codegen/python-oas-templates/templates5.2.0" build_dir="build" -update_apis_repo() { - echo "Updating apis repo" +checkout_and_build_apis() { + local branch=$1 + + echo "Checking out and building apis repo on branch: $branch" pushd codegen/apis - git fetch - git checkout main - git pull + git fetch origin + git checkout "$branch" + git pull origin "$branch" just clean just build popd @@ -61,6 +76,7 @@ verify_directory_exists() { generate_client() { local module_name=$1 + local version=$2 oas_file="codegen/apis/_build/${version}/${module_name}_${version}.oas.yaml" package_name="pinecone.${py_module_name}.openapi.${module_name}" @@ -242,54 +258,77 @@ clean_oas_underscore_manipulation() { db_data_destination="${destination}/db_data" - # echo "Cleaning up upsert_record.py" - sed -i '' \ - -e "s/'id'/'_id'/g" \ - -e 's/self.id/self._id/g' \ - -e 's/id (/_id (/g' \ - -e 's/= id/= _id/g' \ - -e 's/id,/_id,/g' \ - -e "s/'vector\'/'_vector'/g" \ - -e "s/'embed\'/'_embed'/g" \ - -e 's/vector (/_vector (/g' \ - -e 's/embed (/_embed (/g' \ - "${db_data_destination}/model/upsert_record.py" - - # echo "Cleaning up hit.py" - sed -i '' \ - -e "s/'id'/'_id'/g" \ - -e "s/'score'/'_score'/g" \ - -e 's/ id, score,/ _id, _score,/g' \ - -e 's/id (/_id (/g' \ - -e 's/score (/_score (/g' \ - -e 's/self.id/self._id/g' \ - -e 's/self.score/self._score/g' \ - -e 's/= id/= _id/g' \ - -e 's/= score/= _score/g' \ - "${db_data_destination}/model/hit.py" + # Only run if the files exist (they may not in alpha spec) + if [ -f "${db_data_destination}/model/upsert_record.py" ]; then + sed -i '' \ + -e "s/'id'/'_id'/g" \ + -e 's/self.id/self._id/g' \ + -e 's/id (/_id (/g' \ + -e 's/= id/= _id/g' \ + -e 's/id,/_id,/g' \ + -e "s/'vector\'/'_vector'/g" \ + -e "s/'embed\'/'_embed'/g" \ + -e 's/vector (/_vector (/g' \ + -e 's/embed (/_embed (/g' \ + "${db_data_destination}/model/upsert_record.py" + fi + + if [ -f "${db_data_destination}/model/hit.py" ]; then + sed -i '' \ + -e "s/'id'/'_id'/g" \ + -e "s/'score'/'_score'/g" \ + -e 's/ id, score,/ _id, _score,/g' \ + -e 's/id (/_id (/g' \ + -e 's/score (/_score (/g' \ + -e 's/self.id/self._id/g' \ + -e 's/self.score/self._score/g' \ + -e 's/= id/= _id/g' \ + -e 's/= score/= _score/g' \ + "${db_data_destination}/model/hit.py" + fi } -update_apis_repo +# Update templates repo (same for all modules) update_templates_repo -verify_spec_version $version -rm -rf "${destination}" +# Checkout and build apis repo (same branch for all modules) +checkout_and_build_apis "$APIS_BRANCH" + +# Create destination directory if it doesn't exist mkdir -p "${destination}" +# Track which versions have been verified +processed_versions="" + for module in "${modules[@]}"; do - generate_client $module + version=$(get_module_version "$module") + + # Verify spec version exists if we haven't already + case "$processed_versions" in + *"$version"*) ;; # Already verified + *) + verify_spec_version "$version" + processed_versions="$processed_versions $version" + ;; + esac + + # Generate client for this module + generate_client "$module" "$version" done + clean_oas_underscore_manipulation -# This also exists in the generated module code, but we need to reference it -# in the pinecone.openapi_support package as well without creating a circular -# dependency. +# Write api_version.py using db_data version (for gRPC compatibility) +# The db_data version is used since gRPC is data plane only +db_data_version=$(get_module_version "db_data") version_file="pinecone/openapi_support/api_version.py" echo "# This file is generated by codegen/build-oas.sh" > $version_file echo "# Do not edit this file manually." >> $version_file +echo "# For REST APIs, use the API_VERSION from each module's __init__.py" >> $version_file +echo "# This version is used by gRPC clients (data plane only)" >> $version_file echo "" >> $version_file -echo "API_VERSION = '${version}'" >> $version_file +echo "API_VERSION = '${db_data_version}'" >> $version_file echo "APIS_REPO_SHA = '$(git rev-parse :codegen/apis)'" >> $version_file # Even though we want to generate multiple packages, we diff --git a/pinecone/core/openapi/admin/api/api_keys_api.py b/pinecone/core/openapi/admin/api/api_keys_api.py index 13210a2a8..97558ecba 100644 --- a/pinecone/core/openapi/admin/api/api_keys_api.py +++ b/pinecone/core/openapi/admin/api/api_keys_api.py @@ -11,7 +11,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -95,9 +95,7 @@ def __create_api_key( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id kwargs["create_api_key_request"] = create_api_key_request - return cast( - APIKeyWithSecret | ApplyResult[APIKeyWithSecret], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.create_api_key = _Endpoint( settings={ @@ -184,7 +182,7 @@ def __delete_api_key( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_api_key = _Endpoint( settings={ @@ -263,7 +261,7 @@ def __fetch_api_key( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id - return cast(APIKey | ApplyResult[APIKey], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.fetch_api_key = _Endpoint( settings={ @@ -342,10 +340,7 @@ def __list_project_api_keys( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast( - ListApiKeysResponse | ApplyResult[ListApiKeysResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.list_project_api_keys = _Endpoint( settings={ @@ -427,7 +422,7 @@ def __update_api_key( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id kwargs["update_api_key_request"] = update_api_key_request - return cast(APIKey | ApplyResult[APIKey], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.update_api_key = _Endpoint( settings={ @@ -518,7 +513,7 @@ async def __create_api_key( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id kwargs["create_api_key_request"] = create_api_key_request - return cast(APIKeyWithSecret, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_api_key = _AsyncioEndpoint( settings={ @@ -595,7 +590,7 @@ async def __delete_api_key( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_api_key = _AsyncioEndpoint( settings={ @@ -664,7 +659,7 @@ async def __fetch_api_key( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id - return cast(APIKey, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.fetch_api_key = _AsyncioEndpoint( settings={ @@ -733,7 +728,7 @@ async def __list_project_api_keys( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast(ListApiKeysResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_project_api_keys = _AsyncioEndpoint( settings={ @@ -804,7 +799,7 @@ async def __update_api_key( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["api_key_id"] = api_key_id kwargs["update_api_key_request"] = update_api_key_request - return cast(APIKey, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.update_api_key = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/admin/api/organizations_api.py b/pinecone/core/openapi/admin/api/organizations_api.py index cdbc7a8d3..58437262b 100644 --- a/pinecone/core/openapi/admin/api/organizations_api.py +++ b/pinecone/core/openapi/admin/api/organizations_api.py @@ -11,7 +11,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -90,7 +90,7 @@ def __delete_organization( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_organization = _Endpoint( settings={ @@ -169,9 +169,7 @@ def __fetch_organization( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id - return cast( - Organization | ApplyResult[Organization], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.fetch_organization = _Endpoint( settings={ @@ -245,9 +243,7 @@ def __list_organizations( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - OrganizationList | ApplyResult[OrganizationList], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.list_organizations = _Endpoint( settings={ @@ -326,9 +322,7 @@ def __update_organization( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id kwargs["update_organization_request"] = update_organization_request - return cast( - Organization | ApplyResult[Organization], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.update_organization = _Endpoint( settings={ @@ -421,7 +415,7 @@ async def __delete_organization( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_organization = _AsyncioEndpoint( settings={ @@ -490,7 +484,7 @@ async def __fetch_organization( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id - return cast(Organization, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.fetch_organization = _AsyncioEndpoint( settings={ @@ -557,7 +551,7 @@ async def __list_organizations( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(OrganizationList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_organizations = _AsyncioEndpoint( settings={ @@ -629,7 +623,7 @@ async def __update_organization( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["organization_id"] = organization_id kwargs["update_organization_request"] = update_organization_request - return cast(Organization, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.update_organization = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/admin/api/projects_api.py b/pinecone/core/openapi/admin/api/projects_api.py index 1d1849ddf..d535b4a1d 100644 --- a/pinecone/core/openapi/admin/api/projects_api.py +++ b/pinecone/core/openapi/admin/api/projects_api.py @@ -11,7 +11,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -91,7 +91,7 @@ def __create_project( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_project_request"] = create_project_request - return cast(Project | ApplyResult[Project], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.create_project = _Endpoint( settings={ @@ -173,7 +173,7 @@ def __delete_project( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_project = _Endpoint( settings={ @@ -252,7 +252,7 @@ def __fetch_project( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast(Project | ApplyResult[Project], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.fetch_project = _Endpoint( settings={ @@ -326,7 +326,7 @@ def __list_projects( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ProjectList | ApplyResult[ProjectList], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.list_projects = _Endpoint( settings={ @@ -405,7 +405,7 @@ def __update_project( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id kwargs["update_project_request"] = update_project_request - return cast(Project | ApplyResult[Project], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.update_project = _Endpoint( settings={ @@ -494,7 +494,7 @@ async def __create_project( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_project_request"] = create_project_request - return cast(Project, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_project = _AsyncioEndpoint( settings={ @@ -566,7 +566,7 @@ async def __delete_project( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_project = _AsyncioEndpoint( settings={ @@ -635,7 +635,7 @@ async def __fetch_project( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id - return cast(Project, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.fetch_project = _AsyncioEndpoint( settings={ @@ -700,7 +700,7 @@ async def __list_projects(self, x_pinecone_api_version="2025-10", **kwargs) -> P """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ProjectList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_projects = _AsyncioEndpoint( settings={ @@ -768,7 +768,7 @@ async def __update_project( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["project_id"] = project_id kwargs["update_project_request"] = update_project_request - return cast(Project, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.update_project = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/admin/model/api_key_with_secret.py b/pinecone/core/openapi/admin/model/api_key_with_secret.py index 5f4afa2ab..fd1f52fef 100644 --- a/pinecone/core/openapi/admin/model/api_key_with_secret.py +++ b/pinecone/core/openapi/admin/model/api_key_with_secret.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.admin.model.api_key import APIKey - def lazy_import(): from pinecone.core.openapi.admin.model.api_key import APIKey diff --git a/pinecone/core/openapi/admin/model/error_response.py b/pinecone/core/openapi/admin/model/error_response.py index e0684b5c8..4d72a24a4 100644 --- a/pinecone/core/openapi/admin/model/error_response.py +++ b/pinecone/core/openapi/admin/model/error_response.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.admin.model.error_response_error import ErrorResponseError - def lazy_import(): from pinecone.core.openapi.admin.model.error_response_error import ErrorResponseError diff --git a/pinecone/core/openapi/admin/model/list_api_keys_response.py b/pinecone/core/openapi/admin/model/list_api_keys_response.py index 3b83213f8..8caf47e1e 100644 --- a/pinecone/core/openapi/admin/model/list_api_keys_response.py +++ b/pinecone/core/openapi/admin/model/list_api_keys_response.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.admin.model.api_key import APIKey - def lazy_import(): from pinecone.core.openapi.admin.model.api_key import APIKey diff --git a/pinecone/core/openapi/admin/model/organization_list.py b/pinecone/core/openapi/admin/model/organization_list.py index ad7141554..bc7d26b93 100644 --- a/pinecone/core/openapi/admin/model/organization_list.py +++ b/pinecone/core/openapi/admin/model/organization_list.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.admin.model.organization import Organization - def lazy_import(): from pinecone.core.openapi.admin.model.organization import Organization diff --git a/pinecone/core/openapi/admin/model/project_list.py b/pinecone/core/openapi/admin/model/project_list.py index 4811ef4d0..e856f7a7a 100644 --- a/pinecone/core/openapi/admin/model/project_list.py +++ b/pinecone/core/openapi/admin/model/project_list.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.admin.model.project import Project - def lazy_import(): from pinecone.core.openapi.admin.model.project import Project diff --git a/pinecone/core/openapi/db_control/__init__.py b/pinecone/core/openapi/db_control/__init__.py index 52fc459de..59d823f15 100644 --- a/pinecone/core/openapi/db_control/__init__.py +++ b/pinecone/core/openapi/db_control/__init__.py @@ -3,11 +3,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -27,4 +27,4 @@ from pinecone.openapi_support.exceptions import PineconeApiKeyError from pinecone.openapi_support.exceptions import PineconeApiException -API_VERSION = "2025-10" +API_VERSION = "2026-01.alpha" diff --git a/pinecone/core/openapi/db_control/api/manage_indexes_api.py b/pinecone/core/openapi/db_control/api/manage_indexes_api.py index 8190a4559..fe8233aef 100644 --- a/pinecone/core/openapi/db_control/api/manage_indexes_api.py +++ b/pinecone/core/openapi/db_control/api/manage_indexes_api.py @@ -1,17 +1,17 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -67,22 +67,22 @@ def __configure_index( self, index_name, configure_index_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> IndexModel | ApplyResult[IndexModel]: """Configure an index # noqa: E501 - Configure an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). # noqa: E501 + Configure an existing index. Supports partial updates - only include the fields you want to modify. You can update schema fields, read capacity (for serverless), deployment settings (limited), deletion protection, and tags. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.configure_index(index_name, configure_index_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.configure_index(index_name, configure_index_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: index_name (str): The name of the index to configure. - configure_index_request (ConfigureIndexRequest): The desired pod size and replica configuration for the index. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + configure_index_request (ConfigureIndexRequest): The desired configuration updates for the index. + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -111,7 +111,7 @@ def __configure_index( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name kwargs["configure_index_request"] = configure_index_request - return cast(IndexModel | ApplyResult[IndexModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.configure_index = _Endpoint( settings={ @@ -157,7 +157,7 @@ def __create_backup( self, index_name, create_backup_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> BackupModel | ApplyResult[BackupModel]: """Create a backup of an index # noqa: E501 @@ -166,13 +166,13 @@ def __create_backup( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_backup(index_name, create_backup_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_backup(index_name, create_backup_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: index_name (str): Name of the index to backup create_backup_request (CreateBackupRequest): The desired configuration for the backup. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -201,7 +201,7 @@ def __create_backup( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name kwargs["create_backup_request"] = create_backup_request - return cast(BackupModel | ApplyResult[BackupModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.create_backup = _Endpoint( settings={ @@ -246,7 +246,7 @@ def __create_backup( def __create_collection( self, create_collection_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> CollectionModel | ApplyResult[CollectionModel]: """Create a collection # noqa: E501 @@ -255,12 +255,12 @@ def __create_collection( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_collection(create_collection_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_collection(create_collection_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: create_collection_request (CreateCollectionRequest): The desired configuration for the collection. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -288,9 +288,7 @@ def __create_collection( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_collection_request"] = create_collection_request - return cast( - CollectionModel | ApplyResult[CollectionModel], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.create_collection = _Endpoint( settings={ @@ -330,21 +328,21 @@ def __create_collection( def __create_index( self, create_index_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> IndexModel | ApplyResult[IndexModel]: """Create an index # noqa: E501 - Create a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). # noqa: E501 + Create a Pinecone index. This is where you specify the schema defining field-level capabilities, deployment configuration, and other index settings. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_index(create_index_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_index(create_index_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: create_index_request (CreateIndexRequest): The desired configuration for the index. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -372,7 +370,7 @@ def __create_index( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_index_request"] = create_index_request - return cast(IndexModel | ApplyResult[IndexModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.create_index = _Endpoint( settings={ @@ -412,21 +410,21 @@ def __create_index( def __create_index_for_model( self, create_index_for_model_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> IndexModel | ApplyResult[IndexModel]: """Create an index with integrated embedding # noqa: E501 - Create an index with integrated embedding. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2025-10/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2025-10/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). # noqa: E501 + Create an index with integrated embedding using semantic_text field type. This endpoint is a convenience method that creates an index with a semantic_text field configured. You can also achieve the same result using the create_index endpoint with a schema containing a semantic_text field. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2026-01/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2026-01/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_index_for_model(create_index_for_model_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_index_for_model(create_index_for_model_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: create_index_for_model_request (CreateIndexForModelRequest): The desired configuration for the index and associated embedding model. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -454,7 +452,7 @@ def __create_index_for_model( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_index_for_model_request"] = create_index_for_model_request - return cast(IndexModel | ApplyResult[IndexModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.create_index_for_model = _Endpoint( settings={ @@ -495,7 +493,7 @@ def __create_index_from_backup_operation( self, backup_id, create_index_from_backup_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> CreateIndexFromBackupResponse | ApplyResult[CreateIndexFromBackupResponse]: """Create an index from a backup # noqa: E501 @@ -504,13 +502,13 @@ def __create_index_from_backup_operation( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_index_from_backup_operation(backup_id, create_index_from_backup_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_index_from_backup_operation(backup_id, create_index_from_backup_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: backup_id (str): The ID of the backup to create an index from. create_index_from_backup_request (CreateIndexFromBackupRequest): The desired configuration for the index created from a backup. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -539,10 +537,7 @@ def __create_index_from_backup_operation( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id kwargs["create_index_from_backup_request"] = create_index_from_backup_request - return cast( - CreateIndexFromBackupResponse | ApplyResult[CreateIndexFromBackupResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.create_index_from_backup_operation = _Endpoint( settings={ @@ -589,7 +584,10 @@ def __create_index_from_backup_operation( ) def __delete_backup( - self, backup_id, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, + backup_id, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, ) -> None: """Delete a backup # noqa: E501 @@ -597,12 +595,12 @@ def __delete_backup( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_backup(backup_id, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.delete_backup(backup_id, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: backup_id (str): The ID of the backup to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -630,7 +628,7 @@ def __delete_backup( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_backup = _Endpoint( settings={ @@ -667,7 +665,7 @@ def __delete_backup( def __delete_collection( self, collection_name, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> None: """Delete a collection # noqa: E501 @@ -676,12 +674,12 @@ def __delete_collection( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_collection(collection_name, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.delete_collection(collection_name, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: collection_name (str): The name of the collection. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -709,7 +707,7 @@ def __delete_collection( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["collection_name"] = collection_name - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_collection = _Endpoint( settings={ @@ -746,7 +744,7 @@ def __delete_collection( def __delete_index( self, index_name, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> None: """Delete an index # noqa: E501 @@ -755,12 +753,12 @@ def __delete_index( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_index(index_name, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.delete_index(index_name, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: index_name (str): The name of the index to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -788,7 +786,7 @@ def __delete_index( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.delete_index = _Endpoint( settings={ @@ -823,7 +821,10 @@ def __delete_index( ) def __describe_backup( - self, backup_id, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, + backup_id, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, ) -> BackupModel | ApplyResult[BackupModel]: """Describe a backup # noqa: E501 @@ -831,12 +832,12 @@ def __describe_backup( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_backup(backup_id, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_backup(backup_id, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: backup_id (str): The ID of the backup to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -864,7 +865,7 @@ def __describe_backup( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id - return cast(BackupModel | ApplyResult[BackupModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.describe_backup = _Endpoint( settings={ @@ -901,7 +902,7 @@ def __describe_backup( def __describe_collection( self, collection_name, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> CollectionModel | ApplyResult[CollectionModel]: """Describe a collection # noqa: E501 @@ -910,12 +911,12 @@ def __describe_collection( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_collection(collection_name, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_collection(collection_name, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: collection_name (str): The name of the collection to be described. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -943,9 +944,7 @@ def __describe_collection( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["collection_name"] = collection_name - return cast( - CollectionModel | ApplyResult[CollectionModel], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.describe_collection = _Endpoint( settings={ @@ -982,7 +981,7 @@ def __describe_collection( def __describe_index( self, index_name, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> IndexModel | ApplyResult[IndexModel]: """Describe an index # noqa: E501 @@ -991,12 +990,12 @@ def __describe_index( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_index(index_name, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_index(index_name, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: index_name (str): The name of the index to be described. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1024,7 +1023,7 @@ def __describe_index( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(IndexModel | ApplyResult[IndexModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.describe_index = _Endpoint( settings={ @@ -1059,7 +1058,10 @@ def __describe_index( ) def __describe_restore_job( - self, job_id, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, + job_id, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, ) -> RestoreJobModel | ApplyResult[RestoreJobModel]: """Describe a restore job # noqa: E501 @@ -1067,12 +1069,12 @@ def __describe_restore_job( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_restore_job(job_id, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_restore_job(job_id, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: job_id (str): The ID of the restore job to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1100,9 +1102,7 @@ def __describe_restore_job( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["job_id"] = job_id - return cast( - RestoreJobModel | ApplyResult[RestoreJobModel], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.describe_restore_job = _Endpoint( settings={ @@ -1137,7 +1137,7 @@ def __describe_restore_job( ) def __list_collections( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> CollectionList | ApplyResult[CollectionList]: """List collections # noqa: E501 @@ -1145,11 +1145,11 @@ def __list_collections( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_collections(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_collections(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1176,9 +1176,7 @@ def __list_collections( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - CollectionList | ApplyResult[CollectionList], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.list_collections = _Endpoint( settings={ @@ -1212,7 +1210,7 @@ def __list_collections( def __list_index_backups( self, index_name, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> BackupList | ApplyResult[BackupList]: """List backups for an index # noqa: E501 @@ -1221,12 +1219,12 @@ def __list_index_backups( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_index_backups(index_name, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_index_backups(index_name, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: index_name (str): Name of the backed up index - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -1256,7 +1254,7 @@ def __list_index_backups( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(BackupList | ApplyResult[BackupList], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.list_index_backups = _Endpoint( settings={ @@ -1303,7 +1301,7 @@ def __list_index_backups( ) def __list_indexes( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> IndexList | ApplyResult[IndexList]: """List indexes # noqa: E501 @@ -1311,11 +1309,11 @@ def __list_indexes( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_indexes(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_indexes(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1342,7 +1340,7 @@ def __list_indexes( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(IndexList | ApplyResult[IndexList], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.list_indexes = _Endpoint( settings={ @@ -1374,7 +1372,7 @@ def __list_indexes( ) def __list_project_backups( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> BackupList | ApplyResult[BackupList]: """List backups for all indexes in a project # noqa: E501 @@ -1382,11 +1380,11 @@ def __list_project_backups( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_project_backups(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_project_backups(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -1415,7 +1413,7 @@ def __list_project_backups( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(BackupList | ApplyResult[BackupList], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.list_project_backups = _Endpoint( settings={ @@ -1459,7 +1457,7 @@ def __list_project_backups( ) def __list_restore_jobs( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> RestoreJobList | ApplyResult[RestoreJobList]: """List restore jobs # noqa: E501 @@ -1467,11 +1465,11 @@ def __list_restore_jobs( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_restore_jobs(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_restore_jobs(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -1500,9 +1498,7 @@ def __list_restore_jobs( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - RestoreJobList | ApplyResult[RestoreJobList], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.list_restore_jobs = _Endpoint( settings={ @@ -1558,17 +1554,21 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client async def __configure_index( - self, index_name, configure_index_request, x_pinecone_api_version="2025-10", **kwargs + self, + index_name, + configure_index_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs, ) -> IndexModel: """Configure an index # noqa: E501 - Configure an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection. It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then [create a new pod-based index with a different pod type](http://docs.pinecone.io/guides/indexes/pods/create-a-pod-based-index#create-a-pod-index-from-a-collection) from the collection. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). # noqa: E501 + Configure an existing index. Supports partial updates - only include the fields you want to modify. You can update schema fields, read capacity (for serverless), deployment settings (limited), deletion protection, and tags. For guidance and examples, see [Configure an index](http://docs.pinecone.io/guides/indexes/pods/manage-pod-based-indexes). # noqa: E501 Args: index_name (str): The name of the index to configure. - configure_index_request (ConfigureIndexRequest): The desired pod size and replica configuration for the index. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + configure_index_request (ConfigureIndexRequest): The desired configuration updates for the index. + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1594,7 +1594,7 @@ async def __configure_index( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name kwargs["configure_index_request"] = configure_index_request - return cast(IndexModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.configure_index = _AsyncioEndpoint( settings={ @@ -1637,7 +1637,11 @@ async def __configure_index( ) async def __create_backup( - self, index_name, create_backup_request, x_pinecone_api_version="2025-10", **kwargs + self, + index_name, + create_backup_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs, ) -> BackupModel: """Create a backup of an index # noqa: E501 @@ -1647,7 +1651,7 @@ async def __create_backup( Args: index_name (str): Name of the index to backup create_backup_request (CreateBackupRequest): The desired configuration for the backup. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1673,7 +1677,7 @@ async def __create_backup( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name kwargs["create_backup_request"] = create_backup_request - return cast(BackupModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_backup = _AsyncioEndpoint( settings={ @@ -1716,7 +1720,7 @@ async def __create_backup( ) async def __create_collection( - self, create_collection_request, x_pinecone_api_version="2025-10", **kwargs + self, create_collection_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> CollectionModel: """Create a collection # noqa: E501 @@ -1725,7 +1729,7 @@ async def __create_collection( Args: create_collection_request (CreateCollectionRequest): The desired configuration for the collection. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1750,7 +1754,7 @@ async def __create_collection( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_collection_request"] = create_collection_request - return cast(CollectionModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_collection = _AsyncioEndpoint( settings={ @@ -1788,16 +1792,16 @@ async def __create_collection( ) async def __create_index( - self, create_index_request, x_pinecone_api_version="2025-10", **kwargs + self, create_index_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> IndexModel: """Create an index # noqa: E501 - Create a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). # noqa: E501 + Create a Pinecone index. This is where you specify the schema defining field-level capabilities, deployment configuration, and other index settings. For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index). # noqa: E501 Args: create_index_request (CreateIndexRequest): The desired configuration for the index. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1822,7 +1826,7 @@ async def __create_index( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_index_request"] = create_index_request - return cast(IndexModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_index = _AsyncioEndpoint( settings={ @@ -1860,16 +1864,16 @@ async def __create_index( ) async def __create_index_for_model( - self, create_index_for_model_request, x_pinecone_api_version="2025-10", **kwargs + self, create_index_for_model_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> IndexModel: """Create an index with integrated embedding # noqa: E501 - Create an index with integrated embedding. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2025-10/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2025-10/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). # noqa: E501 + Create an index with integrated embedding using semantic_text field type. This endpoint is a convenience method that creates an index with a semantic_text field configured. You can also achieve the same result using the create_index endpoint with a schema containing a semantic_text field. With this type of index, you provide source text, and Pinecone uses a [hosted embedding model](https://docs.pinecone.io/guides/index-data/create-an-index#embedding-models) to convert the text automatically during [upsert](https://docs.pinecone.io/reference/api/2026-01/data-plane/upsert_records) and [search](https://docs.pinecone.io/reference/api/2026-01/data-plane/search_records). For guidance and examples, see [Create an index](https://docs.pinecone.io/guides/index-data/create-an-index#integrated-embedding). # noqa: E501 Args: create_index_for_model_request (CreateIndexForModelRequest): The desired configuration for the index and associated embedding model. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1894,7 +1898,7 @@ async def __create_index_for_model( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_index_for_model_request"] = create_index_for_model_request - return cast(IndexModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_index_for_model = _AsyncioEndpoint( settings={ @@ -1935,7 +1939,7 @@ async def __create_index_from_backup_operation( self, backup_id, create_index_from_backup_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs, ) -> CreateIndexFromBackupResponse: """Create an index from a backup # noqa: E501 @@ -1946,7 +1950,7 @@ async def __create_index_from_backup_operation( Args: backup_id (str): The ID of the backup to create an index from. create_index_from_backup_request (CreateIndexFromBackupRequest): The desired configuration for the index created from a backup. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1972,7 +1976,7 @@ async def __create_index_from_backup_operation( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id kwargs["create_index_from_backup_request"] = create_index_from_backup_request - return cast(CreateIndexFromBackupResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_index_from_backup_operation = _AsyncioEndpoint( settings={ @@ -2019,7 +2023,7 @@ async def __create_index_from_backup_operation( ) async def __delete_backup( - self, backup_id, x_pinecone_api_version="2025-10", **kwargs + self, backup_id, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> None: """Delete a backup # noqa: E501 @@ -2028,7 +2032,7 @@ async def __delete_backup( Args: backup_id (str): The ID of the backup to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2053,7 +2057,7 @@ async def __delete_backup( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_backup = _AsyncioEndpoint( settings={ @@ -2088,7 +2092,7 @@ async def __delete_backup( ) async def __delete_collection( - self, collection_name, x_pinecone_api_version="2025-10", **kwargs + self, collection_name, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> None: """Delete a collection # noqa: E501 @@ -2097,7 +2101,7 @@ async def __delete_collection( Args: collection_name (str): The name of the collection. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2122,7 +2126,7 @@ async def __delete_collection( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["collection_name"] = collection_name - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_collection = _AsyncioEndpoint( settings={ @@ -2157,7 +2161,7 @@ async def __delete_collection( ) async def __delete_index( - self, index_name, x_pinecone_api_version="2025-10", **kwargs + self, index_name, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> None: """Delete an index # noqa: E501 @@ -2166,7 +2170,7 @@ async def __delete_index( Args: index_name (str): The name of the index to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2191,7 +2195,7 @@ async def __delete_index( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_index = _AsyncioEndpoint( settings={ @@ -2226,7 +2230,7 @@ async def __delete_index( ) async def __describe_backup( - self, backup_id, x_pinecone_api_version="2025-10", **kwargs + self, backup_id, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> BackupModel: """Describe a backup # noqa: E501 @@ -2235,7 +2239,7 @@ async def __describe_backup( Args: backup_id (str): The ID of the backup to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2260,7 +2264,7 @@ async def __describe_backup( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["backup_id"] = backup_id - return cast(BackupModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_backup = _AsyncioEndpoint( settings={ @@ -2295,7 +2299,7 @@ async def __describe_backup( ) async def __describe_collection( - self, collection_name, x_pinecone_api_version="2025-10", **kwargs + self, collection_name, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> CollectionModel: """Describe a collection # noqa: E501 @@ -2304,7 +2308,7 @@ async def __describe_collection( Args: collection_name (str): The name of the collection to be described. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2329,7 +2333,7 @@ async def __describe_collection( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["collection_name"] = collection_name - return cast(CollectionModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_collection = _AsyncioEndpoint( settings={ @@ -2364,7 +2368,7 @@ async def __describe_collection( ) async def __describe_index( - self, index_name, x_pinecone_api_version="2025-10", **kwargs + self, index_name, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> IndexModel: """Describe an index # noqa: E501 @@ -2373,7 +2377,7 @@ async def __describe_index( Args: index_name (str): The name of the index to be described. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2398,7 +2402,7 @@ async def __describe_index( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(IndexModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_index = _AsyncioEndpoint( settings={ @@ -2433,7 +2437,7 @@ async def __describe_index( ) async def __describe_restore_job( - self, job_id, x_pinecone_api_version="2025-10", **kwargs + self, job_id, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> RestoreJobModel: """Describe a restore job # noqa: E501 @@ -2442,7 +2446,7 @@ async def __describe_restore_job( Args: job_id (str): The ID of the restore job to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2467,7 +2471,7 @@ async def __describe_restore_job( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["job_id"] = job_id - return cast(RestoreJobModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_restore_job = _AsyncioEndpoint( settings={ @@ -2502,7 +2506,7 @@ async def __describe_restore_job( ) async def __list_collections( - self, x_pinecone_api_version="2025-10", **kwargs + self, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> CollectionList: """List collections # noqa: E501 @@ -2510,7 +2514,7 @@ async def __list_collections( Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2534,7 +2538,7 @@ async def __list_collections( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(CollectionList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_collections = _AsyncioEndpoint( settings={ @@ -2566,7 +2570,7 @@ async def __list_collections( ) async def __list_index_backups( - self, index_name, x_pinecone_api_version="2025-10", **kwargs + self, index_name, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> BackupList: """List backups for an index # noqa: E501 @@ -2575,7 +2579,7 @@ async def __list_index_backups( Args: index_name (str): Name of the backed up index - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -2602,7 +2606,7 @@ async def __list_index_backups( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["index_name"] = index_name - return cast(BackupList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_index_backups = _AsyncioEndpoint( settings={ @@ -2648,14 +2652,16 @@ async def __list_index_backups( callable=__list_index_backups, ) - async def __list_indexes(self, x_pinecone_api_version="2025-10", **kwargs) -> IndexList: + async def __list_indexes( + self, x_pinecone_api_version="2026-01.alpha", **kwargs + ) -> IndexList: """List indexes # noqa: E501 List all indexes in a project. # noqa: E501 Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -2679,7 +2685,7 @@ async def __list_indexes(self, x_pinecone_api_version="2025-10", **kwargs) -> In """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(IndexList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_indexes = _AsyncioEndpoint( settings={ @@ -2711,7 +2717,7 @@ async def __list_indexes(self, x_pinecone_api_version="2025-10", **kwargs) -> In ) async def __list_project_backups( - self, x_pinecone_api_version="2025-10", **kwargs + self, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> BackupList: """List backups for all indexes in a project # noqa: E501 @@ -2719,7 +2725,7 @@ async def __list_project_backups( Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -2745,7 +2751,7 @@ async def __list_project_backups( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(BackupList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_project_backups = _AsyncioEndpoint( settings={ @@ -2789,7 +2795,7 @@ async def __list_project_backups( ) async def __list_restore_jobs( - self, x_pinecone_api_version="2025-10", **kwargs + self, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> RestoreJobList: """List restore jobs # noqa: E501 @@ -2797,7 +2803,7 @@ async def __list_restore_jobs( Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): The number of results to return per page. [optional] if omitted the server will use the default value of 10. @@ -2823,7 +2829,7 @@ async def __list_restore_jobs( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(RestoreJobList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_restore_jobs = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/db_control/model/backup_list.py b/pinecone/core/openapi/db_control/model/backup_list.py index 49633da76..bb76a1c91 100644 --- a/pinecone/core/openapi/db_control/model/backup_list.py +++ b/pinecone/core/openapi/db_control/model/backup_list.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model import BackupModel - from pinecone.core.openapi.db_control.model.pagination_response import PaginationResponse - def lazy_import(): from pinecone.core.openapi.db_control.model.backup_model import BackupModel diff --git a/pinecone/core/openapi/db_control/model/backup_model.py b/pinecone/core/openapi/db_control/model/backup_model.py index f41e5f439..d32b1a798 100644 --- a/pinecone/core/openapi/db_control/model/backup_model.py +++ b/pinecone/core/openapi/db_control/model/backup_model.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,19 +26,13 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema from pinecone.core.openapi.db_control.model.index_tags import IndexTags + from pinecone.core.openapi.db_control.model.schema import Schema - globals()["BackupModelSchema"] = BackupModelSchema globals()["IndexTags"] = IndexTags + globals()["Schema"] = Schema from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -75,9 +69,7 @@ class BackupModel(ModelNormal): allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} - validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { - ("dimension",): {"inclusive_maximum": 20000, "inclusive_minimum": 1} - } + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} @cached_class_property def additional_properties_type(cls): @@ -110,9 +102,7 @@ def openapi_types(cls): "region": (str,), # noqa: E501 "name": (str,), # noqa: E501 "description": (str,), # noqa: E501 - "dimension": (int,), # noqa: E501 - "metric": (str,), # noqa: E501 - "schema": (BackupModelSchema,), # noqa: E501 + "schema": (Schema,), # noqa: E501 "record_count": (int,), # noqa: E501 "namespace_count": (int,), # noqa: E501 "size_bytes": (int,), # noqa: E501 @@ -133,8 +123,6 @@ def discriminator(cls): "region": "region", # noqa: E501 "name": "name", # noqa: E501 "description": "description", # noqa: E501 - "dimension": "dimension", # noqa: E501 - "metric": "metric", # noqa: E501 "schema": "schema", # noqa: E501 "record_count": "record_count", # noqa: E501 "namespace_count": "namespace_count", # noqa: E501 @@ -214,9 +202,7 @@ def _from_openapi_data( _visited_composed_classes = (Animal,) name (str): Optional user-defined name for the backup. [optional] # noqa: E501 description (str): Optional description providing context for the backup. [optional] # noqa: E501 - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 record_count (int): Total number of records in the backup. [optional] # noqa: E501 namespace_count (int): Number of namespaces in the backup. [optional] # noqa: E501 size_bytes (int): Size of the backup in bytes. [optional] # noqa: E501 @@ -329,9 +315,7 @@ def __init__( _visited_composed_classes = (Animal,) name (str): Optional user-defined name for the backup. [optional] # noqa: E501 description (str): Optional description providing context for the backup. [optional] # noqa: E501 - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 record_count (int): Total number of records in the backup. [optional] # noqa: E501 namespace_count (int): Number of namespaces in the backup. [optional] # noqa: E501 size_bytes (int): Size of the backup in bytes. [optional] # noqa: E501 diff --git a/pinecone/core/openapi/db_control/model/byoc_deployment.py b/pinecone/core/openapi/db_control/model/byoc_deployment.py new file mode 100644 index 000000000..064860bcf --- /dev/null +++ b/pinecone/core/openapi/db_control/model/byoc_deployment.py @@ -0,0 +1,301 @@ +""" +Pinecone Control Plane API + +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 + +This file is @generated using OpenAPI. + +The version of the OpenAPI document: 2026-01.alpha +Contact: support@pinecone.io +""" + +from pinecone.openapi_support.model_utils import ( # noqa: F401 + PineconeApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + OpenApiModel, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from pinecone.openapi_support.exceptions import PineconeApiAttributeError + + +from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar +from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property + +T = TypeVar("T", bound="ByocDeployment") + + +class ByocDeployment(ModelNormal): + """NOTE: This class is @generated using OpenAPI. + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + _data_store: Dict[str, Any] + _check_type: bool + + allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} + + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} + + @cached_class_property + def additional_properties_type(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, dict, float, int, list, str, none_type) # noqa: E501 + + _nullable = False + + @cached_class_property + def openapi_types(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "deployment_type": (str,), # noqa: E501 + "environment": (str,), # noqa: E501 + "cloud": (str,), # noqa: E501 + "region": (str,), # noqa: E501 + } + + @cached_class_property + def discriminator(cls): + return None + + attribute_map: Dict[str, str] = { + "deployment_type": "deployment_type", # noqa: E501 + "environment": "environment", # noqa: E501 + "cloud": "cloud", # noqa: E501 + "region": "region", # noqa: E501 + } + + read_only_vars: Set[str] = set([]) + + _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} + + def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: + """Create a new instance of ByocDeployment. + + This method is overridden to provide proper type inference for mypy. + The actual instance creation logic (including discriminator handling) + is handled by the parent class's __new__ method. + """ + # Call parent's __new__ with all arguments to preserve discriminator logic + instance: T = super().__new__(cls, *args, **kwargs) + return instance + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls: Type[T], deployment_type, environment, *args, **kwargs) -> T: # noqa: E501 + """ByocDeployment - a model defined in OpenAPI + + Args: + deployment_type (str): Identifies this as a BYOC (Bring Your Own Cloud) deployment configuration. + environment (str): The environment where the index is hosted in your cloud account. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. [optional] # noqa: E501 + region (str): The region where the index is hosted. [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) + _enforce_validations = kwargs.pop("_enforce_validations", False) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.deployment_type = deployment_type + self.environment = environment + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set( + [ + "_enforce_allowed_values", + "_enforce_validations", + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ] + ) + + @convert_js_args_to_python_args + def __init__(self, deployment_type, environment, *args, **kwargs) -> None: # noqa: E501 + """ByocDeployment - a model defined in OpenAPI + + Args: + deployment_type (str): Identifies this as a BYOC (Bring Your Own Cloud) deployment configuration. + environment (str): The environment where the index is hosted in your cloud account. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. [optional] # noqa: E501 + region (str): The region where the index is hosted. [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) + _enforce_validations = kwargs.pop("_enforce_validations", True) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.deployment_type = deployment_type + self.environment = environment + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes." + ) diff --git a/pinecone/core/openapi/db_control/model/collection_list.py b/pinecone/core/openapi/db_control/model/collection_list.py index 2b495fea5..17ad9f1d0 100644 --- a/pinecone/core/openapi/db_control/model/collection_list.py +++ b/pinecone/core/openapi/db_control/model/collection_list.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.collection_model import CollectionModel - def lazy_import(): from pinecone.core.openapi.db_control.model.collection_model import CollectionModel diff --git a/pinecone/core/openapi/db_control/model/collection_model.py b/pinecone/core/openapi/db_control/model/collection_model.py index 3ebbb8f07..794767648 100644 --- a/pinecone/core/openapi/db_control/model/collection_model.py +++ b/pinecone/core/openapi/db_control/model/collection_model.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/configure_index_request.py b/pinecone/core/openapi/db_control/model/configure_index_request.py index 8d2241e09..e11df38ba 100644 --- a/pinecone/core/openapi/db_control/model/configure_index_request.py +++ b/pinecone/core/openapi/db_control/model/configure_index_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,23 +26,17 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.configure_index_request_embed import ( - ConfigureIndexRequestEmbed, - ) - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - def lazy_import(): - from pinecone.core.openapi.db_control.model.configure_index_request_embed import ( - ConfigureIndexRequestEmbed, - ) + from pinecone.core.openapi.db_control.model.deployment import Deployment from pinecone.core.openapi.db_control.model.index_tags import IndexTags + from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity + from pinecone.core.openapi.db_control.model.schema import Schema - globals()["ConfigureIndexRequestEmbed"] = ConfigureIndexRequestEmbed + globals()["Deployment"] = Deployment globals()["IndexTags"] = IndexTags + globals()["ReadCapacity"] = ReadCapacity + globals()["Schema"] = Schema from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -104,10 +98,11 @@ def openapi_types(cls): """ lazy_import() return { - "spec": (dict,), # noqa: E501 + "schema": (Schema,), # noqa: E501 + "deployment": (Deployment,), # noqa: E501 + "read_capacity": (ReadCapacity,), # noqa: E501 "deletion_protection": (str,), # noqa: E501 "tags": (IndexTags,), # noqa: E501 - "embed": (ConfigureIndexRequestEmbed,), # noqa: E501 } @cached_class_property @@ -115,10 +110,11 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "spec": "spec", # noqa: E501 + "schema": "schema", # noqa: E501 + "deployment": "deployment", # noqa: E501 + "read_capacity": "read_capacity", # noqa: E501 "deletion_protection": "deletion_protection", # noqa: E501 "tags": "tags", # noqa: E501 - "embed": "embed", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -172,10 +168,11 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - spec (dict): The spec object defines how the index should be deployed. Only some attributes of an index's spec may be updated. In general, you can modify settings related to scaling and configuration but you cannot change the cloud or region where the index is hosted. [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 + deployment (Deployment): [optional] # noqa: E501 + read_capacity (ReadCapacity): [optional] # noqa: E501 deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - embed (ConfigureIndexRequestEmbed): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -265,10 +262,11 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - spec (dict): The spec object defines how the index should be deployed. Only some attributes of an index's spec may be updated. In general, you can modify settings related to scaling and configuration but you cannot change the cloud or region where the index is hosted. [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 + deployment (Deployment): [optional] # noqa: E501 + read_capacity (ReadCapacity): [optional] # noqa: E501 deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - embed (ConfigureIndexRequestEmbed): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_control/model/configure_index_request_embed.py b/pinecone/core/openapi/db_control/model/configure_index_request_embed.py deleted file mode 100644 index 1195d80f2..000000000 --- a/pinecone/core/openapi/db_control/model/configure_index_request_embed.py +++ /dev/null @@ -1,293 +0,0 @@ -""" -Pinecone Control Plane API - -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - -This file is @generated using OpenAPI. - -The version of the OpenAPI document: 2025-10 -Contact: support@pinecone.io -""" - -from pinecone.openapi_support.model_utils import ( # noqa: F401 - PineconeApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - OpenApiModel, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) -from pinecone.openapi_support.exceptions import PineconeApiAttributeError - - -from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar -from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property - -T = TypeVar("T", bound="ConfigureIndexRequestEmbed") - - -class ConfigureIndexRequestEmbed(ModelNormal): - """NOTE: This class is @generated using OpenAPI. - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - _data_store: Dict[str, Any] - _check_type: bool - - allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} - - validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} - - @cached_class_property - def additional_properties_type(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - return (bool, dict, float, int, list, str, none_type) # noqa: E501 - - _nullable = False - - @cached_class_property - def openapi_types(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - return { - "model": (str,), # noqa: E501 - "field_map": (Dict[str, Any],), # noqa: E501 - "read_parameters": (Dict[str, Any],), # noqa: E501 - "write_parameters": (Dict[str, Any],), # noqa: E501 - } - - @cached_class_property - def discriminator(cls): - return None - - attribute_map: Dict[str, str] = { - "model": "model", # noqa: E501 - "field_map": "field_map", # noqa: E501 - "read_parameters": "read_parameters", # noqa: E501 - "write_parameters": "write_parameters", # noqa: E501 - } - - read_only_vars: Set[str] = set([]) - - _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} - - def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ConfigureIndexRequestEmbed. - - This method is overridden to provide proper type inference for mypy. - The actual instance creation logic (including discriminator handling) - is handled by the parent class's __new__ method. - """ - # Call parent's __new__ with all arguments to preserve discriminator logic - instance: T = super().__new__(cls, *args, **kwargs) - return instance - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 - """ConfigureIndexRequestEmbed - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - model (str): The name of the embedding model to use with the index. The index dimension and model dimension must match, and the index similarity metric must be supported by the model. The index embedding model cannot be changed once set. [optional] # noqa: E501 - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that will be embedded. [optional] # noqa: E501 - read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 - write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) - _enforce_validations = kwargs.pop("_enforce_validations", False) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set( - [ - "_enforce_allowed_values", - "_enforce_validations", - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, *args, **kwargs) -> None: # noqa: E501 - """ConfigureIndexRequestEmbed - a model defined in OpenAPI - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - model (str): The name of the embedding model to use with the index. The index dimension and model dimension must match, and the index similarity metric must be supported by the model. The index embedding model cannot be changed once set. [optional] # noqa: E501 - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that will be embedded. [optional] # noqa: E501 - read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 - write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) - _enforce_validations = kwargs.pop("_enforce_validations", True) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise PineconeApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes." - ) diff --git a/pinecone/core/openapi/db_control/model/create_backup_request.py b/pinecone/core/openapi/db_control/model/create_backup_request.py index cbdde388e..99fddd4c5 100644 --- a/pinecone/core/openapi/db_control/model/create_backup_request.py +++ b/pinecone/core/openapi/db_control/model/create_backup_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/create_collection_request.py b/pinecone/core/openapi/db_control/model/create_collection_request.py index 164e0a3d2..c89b8e9f2 100644 --- a/pinecone/core/openapi/db_control/model/create_collection_request.py +++ b/pinecone/core/openapi/db_control/model/create_collection_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/create_index_for_model_request.py b/pinecone/core/openapi/db_control/model/create_index_for_model_request.py index 42dc820d5..4257e515f 100644 --- a/pinecone/core/openapi/db_control/model/create_index_for_model_request.py +++ b/pinecone/core/openapi/db_control/model/create_index_for_model_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,29 +26,19 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.create_index_for_model_request_embed import ( - CreateIndexForModelRequestEmbed, - ) - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity - def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema from pinecone.core.openapi.db_control.model.create_index_for_model_request_embed import ( CreateIndexForModelRequestEmbed, ) from pinecone.core.openapi.db_control.model.index_tags import IndexTags from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity + from pinecone.core.openapi.db_control.model.schema import Schema - globals()["BackupModelSchema"] = BackupModelSchema globals()["CreateIndexForModelRequestEmbed"] = CreateIndexForModelRequestEmbed globals()["IndexTags"] = IndexTags globals()["ReadCapacity"] = ReadCapacity + globals()["Schema"] = Schema from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -118,7 +108,7 @@ def openapi_types(cls): "embed": (CreateIndexForModelRequestEmbed,), # noqa: E501 "deletion_protection": (str,), # noqa: E501 "tags": (IndexTags,), # noqa: E501 - "schema": (BackupModelSchema,), # noqa: E501 + "schema": (Schema,), # noqa: E501 "read_capacity": (ReadCapacity,), # noqa: E501 } @@ -158,7 +148,7 @@ def _from_openapi_data(cls: Type[T], name, cloud, region, embed, *args, **kwargs """CreateIndexForModelRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. region (str): The region where you would like your index to be created. embed (CreateIndexForModelRequestEmbed): @@ -196,7 +186,7 @@ def _from_openapi_data(cls: Type[T], name, cloud, region, embed, *args, **kwargs _visited_composed_classes = (Animal,) deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 read_capacity (ReadCapacity): [optional] # noqa: E501 """ @@ -261,7 +251,7 @@ def __init__(self, name, cloud, region, embed, *args, **kwargs) -> None: # noqa """CreateIndexForModelRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. region (str): The region where you would like your index to be created. embed (CreateIndexForModelRequestEmbed): @@ -299,7 +289,7 @@ def __init__(self, name, cloud, region, embed, *args, **kwargs) -> None: # noqa _visited_composed_classes = (Animal,) deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + schema (Schema): [optional] # noqa: E501 read_capacity (ReadCapacity): [optional] # noqa: E501 """ diff --git a/pinecone/core/openapi/db_control/model/create_index_for_model_request_embed.py b/pinecone/core/openapi/db_control/model/create_index_for_model_request_embed.py index 8e5d7b1a7..ed387fd31 100644 --- a/pinecone/core/openapi/db_control/model/create_index_for_model_request_embed.py +++ b/pinecone/core/openapi/db_control/model/create_index_for_model_request_embed.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -85,9 +85,8 @@ def openapi_types(cls): """ return { "model": (str,), # noqa: E501 - "field_map": (Dict[str, Any],), # noqa: E501 + "field_map": ({str: (str,)},), # noqa: E501 "metric": (str,), # noqa: E501 - "dimension": (int,), # noqa: E501 "read_parameters": (Dict[str, Any],), # noqa: E501 "write_parameters": (Dict[str, Any],), # noqa: E501 } @@ -100,7 +99,6 @@ def discriminator(cls): "model": "model", # noqa: E501 "field_map": "field_map", # noqa: E501 "metric": "metric", # noqa: E501 - "dimension": "dimension", # noqa: E501 "read_parameters": "read_parameters", # noqa: E501 "write_parameters": "write_parameters", # noqa: E501 } @@ -127,7 +125,7 @@ def _from_openapi_data(cls: Type[T], model, field_map, *args, **kwargs) -> T: # Args: model (str): The name of the embedding model to use for the index. - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that will be embedded. + field_map ({str: (str,)}): Identifies the name of the text field from your document model that will be embedded. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -160,8 +158,7 @@ def _from_openapi_data(cls: Type[T], model, field_map, *args, **kwargs) -> T: # Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - dimension (int): The dimension of embedding vectors produced for the index. [optional] # noqa: E501 + metric (str): The similarity metric for the embedding vectors. [optional] # noqa: E501 read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 """ @@ -226,7 +223,7 @@ def __init__(self, model, field_map, *args, **kwargs) -> None: # noqa: E501 Args: model (str): The name of the embedding model to use for the index. - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that will be embedded. + field_map ({str: (str,)}): Identifies the name of the text field from your document model that will be embedded. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -259,8 +256,7 @@ def __init__(self, model, field_map, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - dimension (int): The dimension of embedding vectors produced for the index. [optional] # noqa: E501 + metric (str): The similarity metric for the embedding vectors. [optional] # noqa: E501 read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 """ diff --git a/pinecone/core/openapi/db_control/model/create_index_from_backup_request.py b/pinecone/core/openapi/db_control/model/create_index_from_backup_request.py index 9139cffe1..6dcc582a4 100644 --- a/pinecone/core/openapi/db_control/model/create_index_from_backup_request.py +++ b/pinecone/core/openapi/db_control/model/create_index_from_backup_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - def lazy_import(): from pinecone.core.openapi.db_control.model.index_tags import IndexTags @@ -135,7 +130,7 @@ def _from_openapi_data(cls: Type[T], name, *args, **kwargs) -> T: # noqa: E501 """CreateIndexFromBackupRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -230,7 +225,7 @@ def __init__(self, name, *args, **kwargs) -> None: # noqa: E501 """CreateIndexFromBackupRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/pinecone/core/openapi/db_control/model/create_index_from_backup_response.py b/pinecone/core/openapi/db_control/model/create_index_from_backup_response.py index d90ee4982..f2422f5d9 100644 --- a/pinecone/core/openapi/db_control/model/create_index_from_backup_response.py +++ b/pinecone/core/openapi/db_control/model/create_index_from_backup_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/create_index_request.py b/pinecone/core/openapi/db_control/model/create_index_request.py index dcbfc2e51..e67ae0f59 100644 --- a/pinecone/core/openapi/db_control/model/create_index_request.py +++ b/pinecone/core/openapi/db_control/model/create_index_request.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,19 +26,17 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.index_spec import IndexSpec - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - def lazy_import(): - from pinecone.core.openapi.db_control.model.index_spec import IndexSpec + from pinecone.core.openapi.db_control.model.deployment import Deployment from pinecone.core.openapi.db_control.model.index_tags import IndexTags + from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity + from pinecone.core.openapi.db_control.model.schema import Schema - globals()["IndexSpec"] = IndexSpec + globals()["Deployment"] = Deployment globals()["IndexTags"] = IndexTags + globals()["ReadCapacity"] = ReadCapacity + globals()["Schema"] = Schema from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -76,8 +74,7 @@ class CreateIndexRequest(ModelNormal): allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { - ("name",): {"max_length": 45, "min_length": 1}, - ("dimension",): {"inclusive_maximum": 20000, "inclusive_minimum": 1}, + ("name",): {"max_length": 45, "min_length": 1} } @cached_class_property @@ -103,13 +100,13 @@ def openapi_types(cls): """ lazy_import() return { + "schema": (Schema,), # noqa: E501 "name": (str,), # noqa: E501 - "spec": (IndexSpec,), # noqa: E501 - "dimension": (int,), # noqa: E501 - "metric": (str,), # noqa: E501 + "deployment": (Deployment,), # noqa: E501 + "read_capacity": (ReadCapacity,), # noqa: E501 "deletion_protection": (str,), # noqa: E501 "tags": (IndexTags,), # noqa: E501 - "vector_type": (str,), # noqa: E501 + "source_collection": (str,), # noqa: E501 } @cached_class_property @@ -117,13 +114,13 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { + "schema": "schema", # noqa: E501 "name": "name", # noqa: E501 - "spec": "spec", # noqa: E501 - "dimension": "dimension", # noqa: E501 - "metric": "metric", # noqa: E501 + "deployment": "deployment", # noqa: E501 + "read_capacity": "read_capacity", # noqa: E501 "deletion_protection": "deletion_protection", # noqa: E501 "tags": "tags", # noqa: E501 - "vector_type": "vector_type", # noqa: E501 + "source_collection": "source_collection", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -143,12 +140,11 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], name, spec, *args, **kwargs) -> T: # noqa: E501 + def _from_openapi_data(cls: Type[T], schema, *args, **kwargs) -> T: # noqa: E501 """CreateIndexRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. - spec (IndexSpec): + schema (Schema): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -181,11 +177,12 @@ def _from_openapi_data(cls: Type[T], name, spec, *args, **kwargs) -> T: # noqa: Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. [optional] # noqa: E501 + deployment (Deployment): [optional] # noqa: E501 + read_capacity (ReadCapacity): [optional] # noqa: E501 deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. [optional] if omitted the server will use the default value of "dense". # noqa: E501 + source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -215,8 +212,7 @@ def _from_openapi_data(cls: Type[T], name, spec, *args, **kwargs) -> T: # noqa: self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.name = name - self.spec = spec + self.schema = schema for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -243,12 +239,11 @@ def _from_openapi_data(cls: Type[T], name, spec, *args, **kwargs) -> T: # noqa: ) @convert_js_args_to_python_args - def __init__(self, name, spec, *args, **kwargs) -> None: # noqa: E501 + def __init__(self, schema, *args, **kwargs) -> None: # noqa: E501 """CreateIndexRequest - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. - spec (IndexSpec): + schema (Schema): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -281,11 +276,12 @@ def __init__(self, name, spec, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. [optional] # noqa: E501 + deployment (Deployment): [optional] # noqa: E501 + read_capacity (ReadCapacity): [optional] # noqa: E501 deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. [optional] if omitted the server will use the default value of "dense". # noqa: E501 + source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -313,8 +309,7 @@ def __init__(self, name, spec, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.name = name - self.spec = spec + self.schema = schema for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/serverless_spec.py b/pinecone/core/openapi/db_control/model/deployment.py similarity index 60% rename from pinecone/core/openapi/db_control/model/serverless_spec.py rename to pinecone/core/openapi/db_control/model/deployment.py index 239ac69ad..fc7849cf5 100644 --- a/pinecone/core/openapi/db_control/model/serverless_spec.py +++ b/pinecone/core/openapi/db_control/model/deployment.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,28 +26,28 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity - def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity + from pinecone.core.openapi.db_control.model.byoc_deployment import ByocDeployment + from pinecone.core.openapi.db_control.model.pod_deployment import PodDeployment + from pinecone.core.openapi.db_control.model.pod_deployment_metadata_config import ( + PodDeploymentMetadataConfig, + ) + from pinecone.core.openapi.db_control.model.serverless_deployment import ServerlessDeployment - globals()["BackupModelSchema"] = BackupModelSchema - globals()["ReadCapacity"] = ReadCapacity + globals()["ByocDeployment"] = ByocDeployment + globals()["PodDeployment"] = PodDeployment + globals()["PodDeploymentMetadataConfig"] = PodDeploymentMetadataConfig + globals()["ServerlessDeployment"] = ServerlessDeployment from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="ServerlessSpec") +T = TypeVar("T", bound="Deployment") -class ServerlessSpec(ModelNormal): +class Deployment(ModelComposed): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -75,7 +75,11 @@ class ServerlessSpec(ModelNormal): allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} - validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { + ("replicas",): {"inclusive_minimum": 1}, + ("shards",): {"inclusive_minimum": 1}, + ("pods",): {"inclusive_minimum": 1}, + } @cached_class_property def additional_properties_type(cls): @@ -100,50 +104,55 @@ def openapi_types(cls): """ lazy_import() return { + "deployment_type": (str,), # noqa: E501 + "replicas": (int,), # noqa: E501 + "shards": (int,), # noqa: E501 + "pods": (int,), # noqa: E501 + "source_collection": (str,), # noqa: E501 + "metadata_config": (PodDeploymentMetadataConfig,), # noqa: E501 "cloud": (str,), # noqa: E501 "region": (str,), # noqa: E501 - "read_capacity": (ReadCapacity,), # noqa: E501 - "source_collection": (str,), # noqa: E501 - "schema": (BackupModelSchema,), # noqa: E501 + "environment": (str,), # noqa: E501 + "pod_type": (str,), # noqa: E501 } @cached_class_property def discriminator(cls): - return None + lazy_import() + val = { + "ByocDeployment": ByocDeployment, + "PodDeployment": PodDeployment, + "ServerlessDeployment": ServerlessDeployment, + "byoc": ByocDeployment, + "pod": PodDeployment, + "serverless": ServerlessDeployment, + } + if not val: + return None + return {"deployment_type": val} attribute_map: Dict[str, str] = { + "deployment_type": "deployment_type", # noqa: E501 + "replicas": "replicas", # noqa: E501 + "shards": "shards", # noqa: E501 + "pods": "pods", # noqa: E501 + "source_collection": "source_collection", # noqa: E501 + "metadata_config": "metadata_config", # noqa: E501 "cloud": "cloud", # noqa: E501 "region": "region", # noqa: E501 - "read_capacity": "read_capacity", # noqa: E501 - "source_collection": "source_collection", # noqa: E501 - "schema": "schema", # noqa: E501 + "environment": "environment", # noqa: E501 + "pod_type": "pod_type", # noqa: E501 } read_only_vars: Set[str] = set([]) - _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} - - def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ServerlessSpec. - - This method is overridden to provide proper type inference for mypy. - The actual instance creation logic (including discriminator handling) - is handled by the parent class's __new__ method. - """ - # Call parent's __new__ with all arguments to preserve discriminator logic - instance: T = super().__new__(cls, *args, **kwargs) - return instance - @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], cloud, region, *args, **kwargs) -> T: # noqa: E501 - """ServerlessSpec - a model defined in OpenAPI - - Args: - cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. - region (str): The region where you would like your index to be created. + def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 + """Deployment - a model defined in OpenAPI Keyword Args: + deployment_type (str): Identifies this as a BYOC (Bring Your Own Cloud) deployment configuration. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -174,13 +183,17 @@ def _from_openapi_data(cls: Type[T], cloud, region, *args, **kwargs) -> T: # no Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - read_capacity (ReadCapacity): [optional] # noqa: E501 + replicas (int): The number of replicas. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. [optional] if omitted the server will use the default value of 1. # noqa: E501 + shards (int): The number of shards. Shards determine the storage capacity of an index, with each shard providing storage based on the pod type. [optional] if omitted the server will use the default value of 1. # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`. [optional] if omitted the server will use the default value of 1. # noqa: E501 source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + metadata_config (PodDeploymentMetadataConfig): [optional] # noqa: E501 + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. [optional] # noqa: E501 + region (str): The region where the index is hosted. [optional] # noqa: E501 + environment (str): The environment where the index is hosted in your cloud account. [optional] # noqa: E501 + pod_type (str): The pod type and size to use for the index. Possible values include: `p1.x1`, `p1.x2`, `p1.x4`, `p1.x8`, `s1.x1`, `s1.x2`, `s1.x4`, `s1.x8`. [optional] # noqa: E501 """ - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) - _enforce_validations = kwargs.pop("_enforce_validations", False) _check_type = kwargs.pop("_check_type", True) _spec_property_naming = kwargs.pop("_spec_property_naming", False) _path_to_item = kwargs.pop("_path_to_item", ()) @@ -198,26 +211,36 @@ def _from_openapi_data(cls: Type[T], cloud, region, *args, **kwargs) -> T: # no ) self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.cloud = cloud - self.region = region + constant_args = { + "_check_type": _check_type, + "_path_to_item": _path_to_item, + "_spec_property_naming": _spec_property_naming, + "_configuration": _configuration, + "_visited_composed_classes": self._visited_composed_classes, + } + composed_info = validate_get_composed_info(constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): if ( - var_name not in self.attribute_map + var_name in discarded_args and self._configuration is not None and self._configuration.discard_unknown_keys - and self.additional_properties_type is None + and self._additional_properties_model_instances ): # discard variable. continue setattr(self, var_name, var_value) + return self required_properties = set( @@ -230,18 +253,18 @@ def _from_openapi_data(cls: Type[T], cloud, region, *args, **kwargs) -> T: # no "_path_to_item", "_configuration", "_visited_composed_classes", + "_composed_instances", + "_var_name_to_model_instances", + "_additional_properties_model_instances", ] ) @convert_js_args_to_python_args - def __init__(self, cloud, region, *args, **kwargs) -> None: # noqa: E501 - """ServerlessSpec - a model defined in OpenAPI - - Args: - cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. - region (str): The region where you would like your index to be created. + def __init__(self, *args, **kwargs) -> None: # noqa: E501 + """Deployment - a model defined in OpenAPI Keyword Args: + deployment_type (str): Identifies this as a BYOC (Bring Your Own Cloud) deployment configuration. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -272,9 +295,15 @@ def __init__(self, cloud, region, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - read_capacity (ReadCapacity): [optional] # noqa: E501 + replicas (int): The number of replicas. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. [optional] if omitted the server will use the default value of 1. # noqa: E501 + shards (int): The number of shards. Shards determine the storage capacity of an index, with each shard providing storage based on the pod type. [optional] if omitted the server will use the default value of 1. # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`. [optional] if omitted the server will use the default value of 1. # noqa: E501 source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 + metadata_config (PodDeploymentMetadataConfig): [optional] # noqa: E501 + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. [optional] # noqa: E501 + region (str): The region where the index is hosted. [optional] # noqa: E501 + environment (str): The environment where the index is hosted in your cloud account. [optional] # noqa: E501 + pod_type (str): The pod type and size to use for the index. Possible values include: `p1.x1`, `p1.x2`, `p1.x4`, `p1.x8`, `s1.x1`, `s1.x2`, `s1.x4`, `s1.x8`. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -302,14 +331,25 @@ def __init__(self, cloud, region, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.cloud = cloud - self.region = region + constant_args = { + "_check_type": _check_type, + "_path_to_item": _path_to_item, + "_spec_property_naming": _spec_property_naming, + "_configuration": _configuration, + "_visited_composed_classes": self._visited_composed_classes, + } + composed_info = validate_get_composed_info(constant_args, kwargs, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + discarded_args = composed_info[3] + for var_name, var_value in kwargs.items(): if ( - var_name not in self.attribute_map + var_name in discarded_args and self._configuration is not None and self._configuration.discard_unknown_keys - and self.additional_properties_type is None + and self._additional_properties_model_instances ): # discard variable. continue @@ -319,3 +359,19 @@ def __init__(self, cloud, region, *args, **kwargs) -> None: # noqa: E501 f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes." ) + + @cached_property + def _composed_schemas(): # type: ignore + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error beause the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + lazy_import() + return { + "anyOf": [], + "allOf": [], + "oneOf": [ByocDeployment, PodDeployment, ServerlessDeployment], + } diff --git a/pinecone/core/openapi/db_control/model/error_response.py b/pinecone/core/openapi/db_control/model/error_response.py index 781a9f48f..dc2e9703e 100644 --- a/pinecone/core/openapi/db_control/model/error_response.py +++ b/pinecone/core/openapi/db_control/model/error_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.error_response_error import ErrorResponseError - def lazy_import(): from pinecone.core.openapi.db_control.model.error_response_error import ErrorResponseError diff --git a/pinecone/core/openapi/db_control/model/error_response_error.py b/pinecone/core/openapi/db_control/model/error_response_error.py index 16fc54343..ec605d03a 100644 --- a/pinecone/core/openapi/db_control/model/error_response_error.py +++ b/pinecone/core/openapi/db_control/model/error_response_error.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/index_list.py b/pinecone/core/openapi/db_control/model/index_list.py index ff4ea930c..20884210d 100644 --- a/pinecone/core/openapi/db_control/model/index_list.py +++ b/pinecone/core/openapi/db_control/model/index_list.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.index_model import IndexModel - def lazy_import(): from pinecone.core.openapi.db_control.model.index_model import IndexModel diff --git a/pinecone/core/openapi/db_control/model/index_model.py b/pinecone/core/openapi/db_control/model/index_model.py index 4afd6f848..8273c9222 100644 --- a/pinecone/core/openapi/db_control/model/index_model.py +++ b/pinecone/core/openapi/db_control/model/index_model.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,22 +26,19 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.index_model_status import IndexModelStatus - from pinecone.core.openapi.db_control.model.index_tags import IndexTags - from pinecone.core.openapi.db_control.model.model_index_embed import ModelIndexEmbed - def lazy_import(): + from pinecone.core.openapi.db_control.model.deployment import Deployment from pinecone.core.openapi.db_control.model.index_model_status import IndexModelStatus from pinecone.core.openapi.db_control.model.index_tags import IndexTags - from pinecone.core.openapi.db_control.model.model_index_embed import ModelIndexEmbed + from pinecone.core.openapi.db_control.model.read_capacity_response import ReadCapacityResponse + from pinecone.core.openapi.db_control.model.schema import Schema + globals()["Deployment"] = Deployment globals()["IndexModelStatus"] = IndexModelStatus globals()["IndexTags"] = IndexTags - globals()["ModelIndexEmbed"] = ModelIndexEmbed + globals()["ReadCapacityResponse"] = ReadCapacityResponse + globals()["Schema"] = Schema from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -79,8 +76,7 @@ class IndexModel(ModelNormal): allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { - ("name",): {"max_length": 45, "min_length": 1}, - ("dimension",): {"inclusive_maximum": 20000, "inclusive_minimum": 1}, + ("name",): {"max_length": 45, "min_length": 1} } @cached_class_property @@ -107,16 +103,15 @@ def openapi_types(cls): lazy_import() return { "name": (str,), # noqa: E501 - "metric": (str,), # noqa: E501 + "schema": (Schema,), # noqa: E501 + "deployment": (Deployment,), # noqa: E501 "host": (str,), # noqa: E501 - "spec": (Dict[str, Any],), # noqa: E501 + "deletion_protection": (str,), # noqa: E501 "status": (IndexModelStatus,), # noqa: E501 - "vector_type": (str,), # noqa: E501 - "dimension": (int,), # noqa: E501 + "read_capacity": (ReadCapacityResponse,), # noqa: E501 "private_host": (str,), # noqa: E501 - "deletion_protection": (str,), # noqa: E501 "tags": (IndexTags,), # noqa: E501 - "embed": (ModelIndexEmbed,), # noqa: E501 + "source_collection": (str,), # noqa: E501 } @cached_class_property @@ -125,16 +120,15 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "name": "name", # noqa: E501 - "metric": "metric", # noqa: E501 + "schema": "schema", # noqa: E501 + "deployment": "deployment", # noqa: E501 "host": "host", # noqa: E501 - "spec": "spec", # noqa: E501 + "deletion_protection": "deletion_protection", # noqa: E501 "status": "status", # noqa: E501 - "vector_type": "vector_type", # noqa: E501 - "dimension": "dimension", # noqa: E501 + "read_capacity": "read_capacity", # noqa: E501 "private_host": "private_host", # noqa: E501 - "deletion_protection": "deletion_protection", # noqa: E501 "tags": "tags", # noqa: E501 - "embed": "embed", # noqa: E501 + "source_collection": "source_collection", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -154,18 +148,20 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], name, metric, host, spec, status, *args, **kwargs) -> T: # noqa: E501 + def _from_openapi_data( + cls: Type[T], name, schema, deployment, host, status, *args, **kwargs + ) -> T: # noqa: E501 """IndexModel - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. + schema (Schema): + deployment (Deployment): host (str): The URL address where the index is hosted. - spec (Dict[str, Any]): The spec object defines how the index should be deployed. status (IndexModelStatus): Keyword Args: - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. defaults to "dense" # noqa: E501 + deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. defaults to "disabled" # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -196,14 +192,13 @@ def _from_openapi_data(cls: Type[T], name, metric, host, spec, status, *args, ** Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 + read_capacity (ReadCapacityResponse): [optional] # noqa: E501 private_host (str): The private endpoint URL of an index. [optional] # noqa: E501 - deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - embed (ModelIndexEmbed): [optional] # noqa: E501 + source_collection (str): The name of the collection used as the source for the index, if any. [optional] # noqa: E501 """ - vector_type = kwargs.get("vector_type", "dense") + deletion_protection = kwargs.get("deletion_protection", "disabled") _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) _enforce_validations = kwargs.pop("_enforce_validations", False) _check_type = kwargs.pop("_check_type", True) @@ -232,11 +227,11 @@ def _from_openapi_data(cls: Type[T], name, metric, host, spec, status, *args, ** self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.name = name - self.metric = metric + self.schema = schema + self.deployment = deployment self.host = host - self.spec = spec + self.deletion_protection = deletion_protection self.status = status - self.vector_type = vector_type for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -263,18 +258,18 @@ def _from_openapi_data(cls: Type[T], name, metric, host, spec, status, *args, ** ) @convert_js_args_to_python_args - def __init__(self, name, metric, host, spec, status, *args, **kwargs) -> None: # noqa: E501 + def __init__(self, name, schema, deployment, host, status, *args, **kwargs) -> None: # noqa: E501 """IndexModel - a model defined in OpenAPI Args: - name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the `vector_type` is `dense`, the metric defaults to 'cosine'. Possible values: `cosine`, `euclidean`, or `dotproduct`. + name (str): The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'. If not provided, a name will be auto-generated. + schema (Schema): + deployment (Deployment): host (str): The URL address where the index is hosted. - spec (Dict[str, Any]): The spec object defines how the index should be deployed. status (IndexModelStatus): Keyword Args: - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. defaults to "dense" # noqa: E501 + deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. defaults to "disabled" # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -305,14 +300,13 @@ def __init__(self, name, metric, host, spec, status, *args, **kwargs) -> None: Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 + read_capacity (ReadCapacityResponse): [optional] # noqa: E501 private_host (str): The private endpoint URL of an index. [optional] # noqa: E501 - deletion_protection (str): Whether [deletion protection](http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection) is enabled/disabled for the index. Possible values: `disabled` or `enabled`. [optional] if omitted the server will use the default value of "disabled". # noqa: E501 tags (IndexTags): [optional] # noqa: E501 - embed (ModelIndexEmbed): [optional] # noqa: E501 + source_collection (str): The name of the collection used as the source for the index, if any. [optional] # noqa: E501 """ - vector_type = kwargs.get("vector_type", "dense") + deletion_protection = kwargs.get("deletion_protection", "disabled") _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) _enforce_validations = kwargs.pop("_enforce_validations", True) _check_type = kwargs.pop("_check_type", True) @@ -339,11 +333,11 @@ def __init__(self, name, metric, host, spec, status, *args, **kwargs) -> None: self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.name = name - self.metric = metric + self.schema = schema + self.deployment = deployment self.host = host - self.spec = spec + self.deletion_protection = deletion_protection self.status = status - self.vector_type = vector_type for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/index_model_status.py b/pinecone/core/openapi/db_control/model/index_model_status.py index 3d4b20fec..c15c83390 100644 --- a/pinecone/core/openapi/db_control/model/index_model_status.py +++ b/pinecone/core/openapi/db_control/model/index_model_status.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/index_tags.py b/pinecone/core/openapi/db_control/model/index_tags.py index a87b1ff03..544011ef6 100644 --- a/pinecone/core/openapi/db_control/model/index_tags.py +++ b/pinecone/core/openapi/db_control/model/index_tags.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/pagination_response.py b/pinecone/core/openapi/db_control/model/pagination_response.py index 945b6e2e7..ea4723483 100644 --- a/pinecone/core/openapi/db_control/model/pagination_response.py +++ b/pinecone/core/openapi/db_control/model/pagination_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/pod_spec.py b/pinecone/core/openapi/db_control/model/pod_deployment.py similarity index 82% rename from pinecone/core/openapi/db_control/model/pod_spec.py rename to pinecone/core/openapi/db_control/model/pod_deployment.py index dcb7d6544..8818bf286 100644 --- a/pinecone/core/openapi/db_control/model/pod_spec.py +++ b/pinecone/core/openapi/db_control/model/pod_deployment.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,29 +26,22 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.pod_spec_metadata_config import ( - PodSpecMetadataConfig, - ) - def lazy_import(): - from pinecone.core.openapi.db_control.model.pod_spec_metadata_config import ( - PodSpecMetadataConfig, + from pinecone.core.openapi.db_control.model.pod_deployment_metadata_config import ( + PodDeploymentMetadataConfig, ) - globals()["PodSpecMetadataConfig"] = PodSpecMetadataConfig + globals()["PodDeploymentMetadataConfig"] = PodDeploymentMetadataConfig from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="PodSpec") +T = TypeVar("T", bound="PodDeployment") -class PodSpec(ModelNormal): +class PodDeployment(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -105,13 +98,14 @@ def openapi_types(cls): """ lazy_import() return { + "deployment_type": (str,), # noqa: E501 "environment": (str,), # noqa: E501 "pod_type": (str,), # noqa: E501 "replicas": (int,), # noqa: E501 "shards": (int,), # noqa: E501 "pods": (int,), # noqa: E501 - "metadata_config": (PodSpecMetadataConfig,), # noqa: E501 "source_collection": (str,), # noqa: E501 + "metadata_config": (PodDeploymentMetadataConfig,), # noqa: E501 } @cached_class_property @@ -119,13 +113,14 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { + "deployment_type": "deployment_type", # noqa: E501 "environment": "environment", # noqa: E501 "pod_type": "pod_type", # noqa: E501 "replicas": "replicas", # noqa: E501 "shards": "shards", # noqa: E501 "pods": "pods", # noqa: E501 - "metadata_config": "metadata_config", # noqa: E501 "source_collection": "source_collection", # noqa: E501 + "metadata_config": "metadata_config", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -133,7 +128,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of PodSpec. + """Create a new instance of PodDeployment. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -145,14 +140,17 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa: E501 - """PodSpec - a model defined in OpenAPI + def _from_openapi_data( + cls: Type[T], deployment_type, environment, pod_type, *args, **kwargs + ) -> T: # noqa: E501 + """PodDeployment - a model defined in OpenAPI Args: + deployment_type (str): Identifies this as a pod-based deployment configuration. environment (str): The environment where the index is hosted. + pod_type (str): The pod type and size to use for the index. Possible values include: `p1.x1`, `p1.x2`, `p1.x4`, `p1.x8`, `s1.x1`, `s1.x2`, `s1.x4`, `s1.x8`. Keyword Args: - pod_type (str): The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. defaults to "p1.x1" # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -183,14 +181,13 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. [optional] if omitted the server will use the default value of 1. # noqa: E501 - shards (int): The number of shards. Shards split your data across multiple pods so you can fit more data into an index. [optional] if omitted the server will use the default value of 1. # noqa: E501 - pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.' [optional] if omitted the server will use the default value of 1. # noqa: E501 - metadata_config (PodSpecMetadataConfig): [optional] # noqa: E501 + replicas (int): The number of replicas. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. [optional] if omitted the server will use the default value of 1. # noqa: E501 + shards (int): The number of shards. Shards determine the storage capacity of an index, with each shard providing storage based on the pod type. [optional] if omitted the server will use the default value of 1. # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`. [optional] if omitted the server will use the default value of 1. # noqa: E501 source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 + metadata_config (PodDeploymentMetadataConfig): [optional] # noqa: E501 """ - pod_type = kwargs.get("pod_type", "p1.x1") _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) _enforce_validations = kwargs.pop("_enforce_validations", False) _check_type = kwargs.pop("_check_type", True) @@ -218,6 +215,7 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.deployment_type = deployment_type self.environment = environment self.pod_type = pod_type for var_name, var_value in kwargs.items(): @@ -246,14 +244,15 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa ) @convert_js_args_to_python_args - def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 - """PodSpec - a model defined in OpenAPI + def __init__(self, deployment_type, environment, pod_type, *args, **kwargs) -> None: # noqa: E501 + """PodDeployment - a model defined in OpenAPI Args: + deployment_type (str): Identifies this as a pod-based deployment configuration. environment (str): The environment where the index is hosted. + pod_type (str): The pod type and size to use for the index. Possible values include: `p1.x1`, `p1.x2`, `p1.x4`, `p1.x8`, `s1.x1`, `s1.x2`, `s1.x4`, `s1.x8`. Keyword Args: - pod_type (str): The type of pod to use. One of `s1`, `p1`, or `p2` appended with `.` and one of `x1`, `x2`, `x4`, or `x8`. defaults to "p1.x1" # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -284,14 +283,13 @@ def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - replicas (int): The number of replicas. Replicas duplicate your index. They provide higher availability and throughput. Replicas can be scaled up or down as your needs change. [optional] if omitted the server will use the default value of 1. # noqa: E501 - shards (int): The number of shards. Shards split your data across multiple pods so you can fit more data into an index. [optional] if omitted the server will use the default value of 1. # noqa: E501 - pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`.' [optional] if omitted the server will use the default value of 1. # noqa: E501 - metadata_config (PodSpecMetadataConfig): [optional] # noqa: E501 + replicas (int): The number of replicas. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. [optional] if omitted the server will use the default value of 1. # noqa: E501 + shards (int): The number of shards. Shards determine the storage capacity of an index, with each shard providing storage based on the pod type. [optional] if omitted the server will use the default value of 1. # noqa: E501 + pods (int): The number of pods to be used in the index. This should be equal to `shards` x `replicas`. [optional] if omitted the server will use the default value of 1. # noqa: E501 source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 + metadata_config (PodDeploymentMetadataConfig): [optional] # noqa: E501 """ - pod_type = kwargs.get("pod_type", "p1.x1") _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) _enforce_validations = kwargs.pop("_enforce_validations", True) _check_type = kwargs.pop("_check_type", True) @@ -317,6 +315,7 @@ def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.deployment_type = deployment_type self.environment = environment self.pod_type = pod_type for var_name, var_value in kwargs.items(): diff --git a/pinecone/core/openapi/db_control/model/pod_spec_metadata_config.py b/pinecone/core/openapi/db_control/model/pod_deployment_metadata_config.py similarity index 96% rename from pinecone/core/openapi/db_control/model/pod_spec_metadata_config.py rename to pinecone/core/openapi/db_control/model/pod_deployment_metadata_config.py index 3fdf1753b..a344199f8 100644 --- a/pinecone/core/openapi/db_control/model/pod_spec_metadata_config.py +++ b/pinecone/core/openapi/db_control/model/pod_deployment_metadata_config.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -30,10 +30,10 @@ from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="PodSpecMetadataConfig") +T = TypeVar("T", bound="PodDeploymentMetadataConfig") -class PodSpecMetadataConfig(ModelNormal): +class PodDeploymentMetadataConfig(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -100,7 +100,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of PodSpecMetadataConfig. + """Create a new instance of PodDeploymentMetadataConfig. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -113,7 +113,7 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 - """PodSpecMetadataConfig - a model defined in OpenAPI + """PodDeploymentMetadataConfig - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -203,7 +203,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs) -> None: # noqa: E501 - """PodSpecMetadataConfig - a model defined in OpenAPI + """PodDeploymentMetadataConfig - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/pinecone/core/openapi/db_control/model/read_capacity.py b/pinecone/core/openapi/db_control/model/read_capacity.py index 98e972ca2..9d9100411 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity.py +++ b/pinecone/core/openapi/db_control/model/read_capacity.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,33 +26,20 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec import ( - ReadCapacityDedicatedSpec, - ) - from pinecone.core.openapi.db_control.model.read_capacity_on_demand_spec import ( - ReadCapacityOnDemandSpec, - ) - def lazy_import(): - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec import ( ReadCapacityDedicatedSpec, ) + from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response_scaling import ( + ReadCapacityDedicatedSpecResponseScaling, + ) from pinecone.core.openapi.db_control.model.read_capacity_on_demand_spec import ( ReadCapacityOnDemandSpec, ) - globals()["ReadCapacityDedicatedConfig"] = ReadCapacityDedicatedConfig globals()["ReadCapacityDedicatedSpec"] = ReadCapacityDedicatedSpec + globals()["ReadCapacityDedicatedSpecResponseScaling"] = ReadCapacityDedicatedSpecResponseScaling globals()["ReadCapacityOnDemandSpec"] = ReadCapacityOnDemandSpec @@ -116,7 +103,8 @@ def openapi_types(cls): lazy_import() return { "mode": (str,), # noqa: E501 - "dedicated": (ReadCapacityDedicatedConfig,), # noqa: E501 + "node_type": (str,), # noqa: E501 + "scaling": (ReadCapacityDedicatedSpecResponseScaling,), # noqa: E501 } @cached_class_property @@ -134,7 +122,8 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "mode": "mode", # noqa: E501 - "dedicated": "dedicated", # noqa: E501 + "node_type": "node_type", # noqa: E501 + "scaling": "scaling", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -145,7 +134,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 """ReadCapacity - a model defined in OpenAPI Keyword Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -176,7 +165,8 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dedicated (ReadCapacityDedicatedConfig): [optional] # noqa: E501 + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. [optional] # noqa: E501 + scaling (ReadCapacityDedicatedSpecResponseScaling): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -249,7 +239,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 """ReadCapacity - a model defined in OpenAPI Keyword Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -280,7 +270,8 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - dedicated (ReadCapacityDedicatedConfig): [optional] # noqa: E501 + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. [optional] # noqa: E501 + scaling (ReadCapacityDedicatedSpecResponseScaling): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -338,7 +329,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 ) @cached_property - def _composed_schemas(): + def _composed_schemas(): # type: ignore # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run # when we invoke this method. If we kept this at the class diff --git a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_config.py b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_config.py deleted file mode 100644 index 48f9648c0..000000000 --- a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_config.py +++ /dev/null @@ -1,310 +0,0 @@ -""" -Pinecone Control Plane API - -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - -This file is @generated using OpenAPI. - -The version of the OpenAPI document: 2025-10 -Contact: support@pinecone.io -""" - -from pinecone.openapi_support.model_utils import ( # noqa: F401 - PineconeApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - OpenApiModel, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) -from pinecone.openapi_support.exceptions import PineconeApiAttributeError - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.scaling_config_manual import ScalingConfigManual - - -def lazy_import(): - from pinecone.core.openapi.db_control.model.scaling_config_manual import ScalingConfigManual - - globals()["ScalingConfigManual"] = ScalingConfigManual - - -from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar -from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property - -T = TypeVar("T", bound="ReadCapacityDedicatedConfig") - - -class ReadCapacityDedicatedConfig(ModelNormal): - """NOTE: This class is @generated using OpenAPI. - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - _data_store: Dict[str, Any] - _check_type: bool - - allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} - - validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} - - @cached_class_property - def additional_properties_type(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, dict, float, int, list, str, none_type) # noqa: E501 - - _nullable = False - - @cached_class_property - def openapi_types(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - "node_type": (str,), # noqa: E501 - "scaling": (str,), # noqa: E501 - "manual": (ScalingConfigManual,), # noqa: E501 - } - - @cached_class_property - def discriminator(cls): - return None - - attribute_map: Dict[str, str] = { - "node_type": "node_type", # noqa: E501 - "scaling": "scaling", # noqa: E501 - "manual": "manual", # noqa: E501 - } - - read_only_vars: Set[str] = set([]) - - _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} - - def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ReadCapacityDedicatedConfig. - - This method is overridden to provide proper type inference for mypy. - The actual instance creation logic (including discriminator handling) - is handled by the parent class's __new__ method. - """ - # Call parent's __new__ with all arguments to preserve discriminator logic - instance: T = super().__new__(cls, *args, **kwargs) - return instance - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], node_type, scaling, *args, **kwargs) -> T: # noqa: E501 - """ReadCapacityDedicatedConfig - a model defined in OpenAPI - - Args: - node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. - scaling (str): The type of scaling strategy to use. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - manual (ScalingConfigManual): [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) - _enforce_validations = kwargs.pop("_enforce_validations", False) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.node_type = node_type - self.scaling = scaling - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set( - [ - "_enforce_allowed_values", - "_enforce_validations", - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, node_type, scaling, *args, **kwargs) -> None: # noqa: E501 - """ReadCapacityDedicatedConfig - a model defined in OpenAPI - - Args: - node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. - scaling (str): The type of scaling strategy to use. - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - manual (ScalingConfigManual): [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) - _enforce_validations = kwargs.pop("_enforce_validations", True) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.node_type = node_type - self.scaling = scaling - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise PineconeApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes." - ) diff --git a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec.py b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec.py index 6a77424ce..3592e8c09 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,20 +26,13 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) - def lazy_import(): - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, + from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response_scaling import ( + ReadCapacityDedicatedSpecResponseScaling, ) - globals()["ReadCapacityDedicatedConfig"] = ReadCapacityDedicatedConfig + globals()["ReadCapacityDedicatedSpecResponseScaling"] = ReadCapacityDedicatedSpecResponseScaling from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -102,7 +95,8 @@ def openapi_types(cls): lazy_import() return { "mode": (str,), # noqa: E501 - "dedicated": (ReadCapacityDedicatedConfig,), # noqa: E501 + "node_type": (str,), # noqa: E501 + "scaling": (ReadCapacityDedicatedSpecResponseScaling,), # noqa: E501 } @cached_class_property @@ -111,7 +105,8 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "mode": "mode", # noqa: E501 - "dedicated": "dedicated", # noqa: E501 + "node_type": "node_type", # noqa: E501 + "scaling": "scaling", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -131,12 +126,13 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], mode, dedicated, *args, **kwargs) -> T: # noqa: E501 + def _from_openapi_data(cls: Type[T], mode, node_type, scaling, *args, **kwargs) -> T: # noqa: E501 """ReadCapacityDedicatedSpec - a model defined in OpenAPI Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. - dedicated (ReadCapacityDedicatedConfig): + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. + scaling (ReadCapacityDedicatedSpecResponseScaling): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -199,7 +195,8 @@ def _from_openapi_data(cls: Type[T], mode, dedicated, *args, **kwargs) -> T: # self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.mode = mode - self.dedicated = dedicated + self.node_type = node_type + self.scaling = scaling for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -226,12 +223,13 @@ def _from_openapi_data(cls: Type[T], mode, dedicated, *args, **kwargs) -> T: # ) @convert_js_args_to_python_args - def __init__(self, mode, dedicated, *args, **kwargs) -> None: # noqa: E501 + def __init__(self, mode, node_type, scaling, *args, **kwargs) -> None: # noqa: E501 """ReadCapacityDedicatedSpec - a model defined in OpenAPI Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. - dedicated (ReadCapacityDedicatedConfig): + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. + scaling (ReadCapacityDedicatedSpecResponseScaling): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -292,7 +290,8 @@ def __init__(self, mode, dedicated, *args, **kwargs) -> None: # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.mode = mode - self.dedicated = dedicated + self.node_type = node_type + self.scaling = scaling for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response.py b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response.py index 299450d04..77de2ab97 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,22 +26,14 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) - from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus - def lazy_import(): - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, + from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response_scaling import ( + ReadCapacityDedicatedSpecResponseScaling, ) from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus - globals()["ReadCapacityDedicatedConfig"] = ReadCapacityDedicatedConfig + globals()["ReadCapacityDedicatedSpecResponseScaling"] = ReadCapacityDedicatedSpecResponseScaling globals()["ReadCapacityStatus"] = ReadCapacityStatus @@ -98,7 +90,8 @@ def openapi_types(cls): lazy_import() return { "mode": (str,), # noqa: E501 - "dedicated": (ReadCapacityDedicatedConfig,), # noqa: E501 + "node_type": (str,), # noqa: E501 + "scaling": (ReadCapacityDedicatedSpecResponseScaling,), # noqa: E501 "status": (ReadCapacityStatus,), # noqa: E501 } @@ -108,7 +101,8 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "mode": "mode", # noqa: E501 - "dedicated": "dedicated", # noqa: E501 + "node_type": "node_type", # noqa: E501 + "scaling": "scaling", # noqa: E501 "status": "status", # noqa: E501 } @@ -129,12 +123,13 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], mode, dedicated, status, *args, **kwargs) -> T: # noqa: E501 + def _from_openapi_data(cls: Type[T], mode, node_type, scaling, status, *args, **kwargs) -> T: # noqa: E501 """ReadCapacityDedicatedSpecResponse - a model defined in OpenAPI Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. - dedicated (ReadCapacityDedicatedConfig): + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. + scaling (ReadCapacityDedicatedSpecResponseScaling): status (ReadCapacityStatus): Keyword Args: @@ -198,7 +193,8 @@ def _from_openapi_data(cls: Type[T], mode, dedicated, status, *args, **kwargs) - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.mode = mode - self.dedicated = dedicated + self.node_type = node_type + self.scaling = scaling self.status = status for var_name, var_value in kwargs.items(): if ( @@ -226,12 +222,13 @@ def _from_openapi_data(cls: Type[T], mode, dedicated, status, *args, **kwargs) - ) @convert_js_args_to_python_args - def __init__(self, mode, dedicated, status, *args, **kwargs) -> None: # noqa: E501 + def __init__(self, mode, node_type, scaling, status, *args, **kwargs) -> None: # noqa: E501 """ReadCapacityDedicatedSpecResponse - a model defined in OpenAPI Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. - dedicated (ReadCapacityDedicatedConfig): + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. + scaling (ReadCapacityDedicatedSpecResponseScaling): status (ReadCapacityStatus): Keyword Args: @@ -293,7 +290,8 @@ def __init__(self, mode, dedicated, status, *args, **kwargs) -> None: # noqa: E self._visited_composed_classes = _visited_composed_classes + (self.__class__,) self.mode = mode - self.dedicated = dedicated + self.node_type = node_type + self.scaling = scaling self.status = status for var_name, var_value in kwargs.items(): if ( diff --git a/pinecone/core/openapi/db_control/model/scaling_config_manual.py b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response_scaling.py similarity index 89% rename from pinecone/core/openapi/db_control/model/scaling_config_manual.py rename to pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response_scaling.py index 75d02ea42..649f196a0 100644 --- a/pinecone/core/openapi/db_control/model/scaling_config_manual.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_dedicated_spec_response_scaling.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -30,10 +30,10 @@ from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="ScalingConfigManual") +T = TypeVar("T", bound="ReadCapacityDedicatedSpecResponseScaling") -class ScalingConfigManual(ModelNormal): +class ReadCapacityDedicatedSpecResponseScaling(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -87,6 +87,7 @@ def openapi_types(cls): and the value is attribute type. """ return { + "strategy": (str,), # noqa: E501 "replicas": (int,), # noqa: E501 "shards": (int,), # noqa: E501 } @@ -96,6 +97,7 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { + "strategy": "strategy", # noqa: E501 "replicas": "replicas", # noqa: E501 "shards": "shards", # noqa: E501 } @@ -105,7 +107,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ScalingConfigManual. + """Create a new instance of ReadCapacityDedicatedSpecResponseScaling. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -117,12 +119,13 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], replicas, shards, *args, **kwargs) -> T: # noqa: E501 - """ScalingConfigManual - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], strategy, replicas, shards, *args, **kwargs) -> T: # noqa: E501 + """ReadCapacityDedicatedSpecResponseScaling - a model defined in OpenAPI Args: - replicas (int): The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused. - shards (int): The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage. + strategy (str): The scaling strategy type. + replicas (int): The number of replicas to use. + shards (int): The number of shards to use. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -184,6 +187,7 @@ def _from_openapi_data(cls: Type[T], replicas, shards, *args, **kwargs) -> T: # self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.strategy = strategy self.replicas = replicas self.shards = shards for var_name, var_value in kwargs.items(): @@ -212,12 +216,13 @@ def _from_openapi_data(cls: Type[T], replicas, shards, *args, **kwargs) -> T: # ) @convert_js_args_to_python_args - def __init__(self, replicas, shards, *args, **kwargs) -> None: # noqa: E501 - """ScalingConfigManual - a model defined in OpenAPI + def __init__(self, strategy, replicas, shards, *args, **kwargs) -> None: # noqa: E501 + """ReadCapacityDedicatedSpecResponseScaling - a model defined in OpenAPI Args: - replicas (int): The number of replicas to use. Replicas duplicate the compute resources and data of an index, allowing higher query throughput and availability. Setting replicas to 0 disables the index but can be used to reduce costs while usage is paused. - shards (int): The number of shards to use. Shards determine the storage capacity of an index, with each shard providing 250 GB of storage. + strategy (str): The scaling strategy type. + replicas (int): The number of replicas to use. + shards (int): The number of shards to use. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -277,6 +282,7 @@ def __init__(self, replicas, shards, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.strategy = strategy self.replicas = replicas self.shards = shards for var_name, var_value in kwargs.items(): diff --git a/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec.py b/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec.py index 4bfd4f92f..18abcc9b5 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec_response.py b/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec_response.py index 6b49936f7..ad5172550 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec_response.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_on_demand_spec_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus - def lazy_import(): from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus diff --git a/pinecone/core/openapi/db_control/model/read_capacity_response.py b/pinecone/core/openapi/db_control/model/read_capacity_response.py index d1dc889a7..c2f1cacb9 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_response.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_response.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,35 +26,21 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response import ( - ReadCapacityDedicatedSpecResponse, - ) - from pinecone.core.openapi.db_control.model.read_capacity_on_demand_spec_response import ( - ReadCapacityOnDemandSpecResponse, - ) - from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus - def lazy_import(): - from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, - ) from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response import ( ReadCapacityDedicatedSpecResponse, ) + from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response_scaling import ( + ReadCapacityDedicatedSpecResponseScaling, + ) from pinecone.core.openapi.db_control.model.read_capacity_on_demand_spec_response import ( ReadCapacityOnDemandSpecResponse, ) from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus - globals()["ReadCapacityDedicatedConfig"] = ReadCapacityDedicatedConfig globals()["ReadCapacityDedicatedSpecResponse"] = ReadCapacityDedicatedSpecResponse + globals()["ReadCapacityDedicatedSpecResponseScaling"] = ReadCapacityDedicatedSpecResponseScaling globals()["ReadCapacityOnDemandSpecResponse"] = ReadCapacityOnDemandSpecResponse globals()["ReadCapacityStatus"] = ReadCapacityStatus @@ -120,7 +106,8 @@ def openapi_types(cls): return { "mode": (str,), # noqa: E501 "status": (ReadCapacityStatus,), # noqa: E501 - "dedicated": (ReadCapacityDedicatedConfig,), # noqa: E501 + "node_type": (str,), # noqa: E501 + "scaling": (ReadCapacityDedicatedSpecResponseScaling,), # noqa: E501 } @cached_class_property @@ -139,7 +126,8 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "mode": "mode", # noqa: E501 "status": "status", # noqa: E501 - "dedicated": "dedicated", # noqa: E501 + "node_type": "node_type", # noqa: E501 + "scaling": "scaling", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -150,7 +138,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 """ReadCapacityResponse - a model defined in OpenAPI Keyword Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -182,7 +170,8 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) status (ReadCapacityStatus): [optional] # noqa: E501 - dedicated (ReadCapacityDedicatedConfig): [optional] # noqa: E501 + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. [optional] # noqa: E501 + scaling (ReadCapacityDedicatedSpecResponseScaling): [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -255,7 +244,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 """ReadCapacityResponse - a model defined in OpenAPI Keyword Args: - mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `dedicated.node_type`, and `dedicated.scaling` must be specified. + mode (str): The mode of the index. Possible values: `OnDemand` or `Dedicated`. Defaults to `OnDemand`. If set to `Dedicated`, `node_type`, and `scaling` must be specified. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -287,7 +276,8 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) status (ReadCapacityStatus): [optional] # noqa: E501 - dedicated (ReadCapacityDedicatedConfig): [optional] # noqa: E501 + node_type (str): The type of machines to use. Available options: `b1` and `t1`. `t1` includes increased processing power and memory. [optional] # noqa: E501 + scaling (ReadCapacityDedicatedSpecResponseScaling): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -345,7 +335,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 ) @cached_property - def _composed_schemas(): + def _composed_schemas(): # type: ignore # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run # when we invoke this method. If we kept this at the class diff --git a/pinecone/core/openapi/db_control/model/read_capacity_status.py b/pinecone/core/openapi/db_control/model/read_capacity_status.py index 735a64ad5..a5ebc715e 100644 --- a/pinecone/core/openapi/db_control/model/read_capacity_status.py +++ b/pinecone/core/openapi/db_control/model/read_capacity_status.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -122,7 +122,7 @@ def _from_openapi_data(cls: Type[T], state, *args, **kwargs) -> T: # noqa: E501 """ReadCapacityStatus - a model defined in OpenAPI Args: - state (str): The `state` describes the overall status of factors relating to the read capacity of an index. Available values: - `Ready` is the state most of the time - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2025-10/control-plane/configure_index) - `Migrating` if the index is being migrated to a new `node_type` - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. + state (str): The `state` describes the overall status of factors relating to the read capacity of an index. Available values: - `Ready` is the state most of the time - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2026-01/control-plane/configure_index) - `Migrating` if the index is being migrated to a new `node_type` - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -218,7 +218,7 @@ def __init__(self, state, *args, **kwargs) -> None: # noqa: E501 """ReadCapacityStatus - a model defined in OpenAPI Args: - state (str): The `state` describes the overall status of factors relating to the read capacity of an index. Available values: - `Ready` is the state most of the time - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2025-10/control-plane/configure_index) - `Migrating` if the index is being migrated to a new `node_type` - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. + state (str): The `state` describes the overall status of factors relating to the read capacity of an index. Available values: - `Ready` is the state most of the time - `Scaling` if the number of replicas or shards has been recently updated by calling the [configure index endpoint](https://docs.pinecone.io/reference/api/2026-01/control-plane/configure_index) - `Migrating` if the index is being migrated to a new `node_type` - `Error` if there is an error with the read capacity configuration. In that case, see `error_message` for more details. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types diff --git a/pinecone/core/openapi/db_control/model/restore_job_list.py b/pinecone/core/openapi/db_control/model/restore_job_list.py index e1a4d21a5..00c1b152e 100644 --- a/pinecone/core/openapi/db_control/model/restore_job_list.py +++ b/pinecone/core/openapi/db_control/model/restore_job_list.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.pagination_response import PaginationResponse - from pinecone.core.openapi.db_control.model.restore_job_model import RestoreJobModel - def lazy_import(): from pinecone.core.openapi.db_control.model.pagination_response import PaginationResponse diff --git a/pinecone/core/openapi/db_control/model/restore_job_model.py b/pinecone/core/openapi/db_control/model/restore_job_model.py index d278d0b6c..96ccd2fc5 100644 --- a/pinecone/core/openapi/db_control/model/restore_job_model.py +++ b/pinecone/core/openapi/db_control/model/restore_job_model.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/serverless.py b/pinecone/core/openapi/db_control/model/schema.py similarity index 91% rename from pinecone/core/openapi/db_control/model/serverless.py rename to pinecone/core/openapi/db_control/model/schema.py index 283f2b74e..9a5b9e4df 100644 --- a/pinecone/core/openapi/db_control/model/serverless.py +++ b/pinecone/core/openapi/db_control/model/schema.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,25 +26,20 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.serverless_spec import ServerlessSpec - def lazy_import(): - from pinecone.core.openapi.db_control.model.serverless_spec import ServerlessSpec + from pinecone.core.openapi.db_control.model.schema_fields import SchemaFields - globals()["ServerlessSpec"] = ServerlessSpec + globals()["SchemaFields"] = SchemaFields from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="Serverless") +T = TypeVar("T", bound="Schema") -class Serverless(ModelNormal): +class Schema(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -97,7 +92,7 @@ def openapi_types(cls): """ lazy_import() return { - "serverless": (ServerlessSpec,) # noqa: E501 + "fields": ({str: (SchemaFields,)},) # noqa: E501 } @cached_class_property @@ -105,7 +100,7 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "serverless": "serverless" # noqa: E501 + "fields": "fields" # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -113,7 +108,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of Serverless. + """Create a new instance of Schema. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -125,11 +120,11 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], serverless, *args, **kwargs) -> T: # noqa: E501 - """Serverless - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], fields, *args, **kwargs) -> T: # noqa: E501 + """Schema - a model defined in OpenAPI Args: - serverless (ServerlessSpec): + fields ({str: (SchemaFields,)}): A map of field names to their configuration. Each field name must be unique and valid according to field naming conventions. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -191,7 +186,7 @@ def _from_openapi_data(cls: Type[T], serverless, *args, **kwargs) -> T: # noqa: self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.serverless = serverless + self.fields = fields for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -218,11 +213,11 @@ def _from_openapi_data(cls: Type[T], serverless, *args, **kwargs) -> T: # noqa: ) @convert_js_args_to_python_args - def __init__(self, serverless, *args, **kwargs) -> None: # noqa: E501 - """Serverless - a model defined in OpenAPI + def __init__(self, fields, *args, **kwargs) -> None: # noqa: E501 + """Schema - a model defined in OpenAPI Args: - serverless (ServerlessSpec): + fields ({str: (SchemaFields,)}): A map of field names to their configuration. Each field name must be unique and valid according to field naming conventions. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -282,7 +277,7 @@ def __init__(self, serverless, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.serverless = serverless + self.fields = fields for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/model_index_embed.py b/pinecone/core/openapi/db_control/model/schema_fields.py similarity index 74% rename from pinecone/core/openapi/db_control/model/model_index_embed.py rename to pinecone/core/openapi/db_control/model/schema_fields.py index cf9ab54e1..4db01ea35 100644 --- a/pinecone/core/openapi/db_control/model/model_index_embed.py +++ b/pinecone/core/openapi/db_control/model/schema_fields.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -30,10 +30,10 @@ from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="ModelIndexEmbed") +T = TypeVar("T", bound="SchemaFields") -class ModelIndexEmbed(ModelNormal): +class SchemaFields(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -86,11 +86,14 @@ def openapi_types(cls): and the value is attribute type. """ return { - "model": (str,), # noqa: E501 - "metric": (str,), # noqa: E501 + "type": (str,), # noqa: E501 + "description": (str,), # noqa: E501 + "filterable": (bool,), # noqa: E501 + "full_text_searchable": (bool,), # noqa: E501 "dimension": (int,), # noqa: E501 - "vector_type": (str,), # noqa: E501 - "field_map": (Dict[str, Any],), # noqa: E501 + "metric": (str,), # noqa: E501 + "model": (str,), # noqa: E501 + "field_map": ({str: (str,)},), # noqa: E501 "read_parameters": (Dict[str, Any],), # noqa: E501 "write_parameters": (Dict[str, Any],), # noqa: E501 } @@ -100,10 +103,13 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "model": "model", # noqa: E501 - "metric": "metric", # noqa: E501 + "type": "type", # noqa: E501 + "description": "description", # noqa: E501 + "filterable": "filterable", # noqa: E501 + "full_text_searchable": "full_text_searchable", # noqa: E501 "dimension": "dimension", # noqa: E501 - "vector_type": "vector_type", # noqa: E501 + "metric": "metric", # noqa: E501 + "model": "model", # noqa: E501 "field_map": "field_map", # noqa: E501 "read_parameters": "read_parameters", # noqa: E501 "write_parameters": "write_parameters", # noqa: E501 @@ -114,7 +120,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ModelIndexEmbed. + """Create a new instance of SchemaFields. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -126,11 +132,11 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], model, *args, **kwargs) -> T: # noqa: E501 - """ModelIndexEmbed - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], type, *args, **kwargs) -> T: # noqa: E501 + """SchemaFields - a model defined in OpenAPI Args: - model (str): The name of the embedding model used to create the index. + type (str): The data type of the field. Can be a base type (string, integer) or a vector type (dense_vector, sparse_vector, semantic_text). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -163,12 +169,15 @@ def _from_openapi_data(cls: Type[T], model, *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. [optional] if omitted the server will use the default value of "dense". # noqa: E501 - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that is embedded. [optional] # noqa: E501 - read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 - write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 + description (str): A description of the field. [optional] # noqa: E501 + filterable (bool): Whether the field is filterable. If true, the field is indexed and can be used in query filters. Only applicable for base types (string, integer). [optional] # noqa: E501 + full_text_searchable (bool): Whether the field is full-text searchable. If true, the field is indexed for lexical search. Only applicable for string type fields. [optional] # noqa: E501 + dimension (int): The dimension of the dense vectors. Required when type is dense_vector. [optional] # noqa: E501 + metric (str): The distance metric to be used for similarity search. Required when type is dense_vector or sparse_vector. Optional when type is semantic_text (may be included in responses). For dense_vector: cosine, euclidean, or dotproduct. For sparse_vector: must be dotproduct. For semantic_text: typically cosine. [optional] # noqa: E501 + model (str): The name of the embedding model to use. Required when type is semantic_text. [optional] # noqa: E501 + field_map ({str: (str,)}): Identifies the name of the text field from your document model that will be embedded. Maps the field name in your documents to the field name used for embedding. Only applicable when type is semantic_text. [optional] # noqa: E501 + read_parameters (Dict[str, Any]): The read parameters for the embedding model used during queries. Only applicable when type is semantic_text. [optional] # noqa: E501 + write_parameters (Dict[str, Any]): The write parameters for the embedding model used during indexing. Only applicable when type is semantic_text. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -198,7 +207,7 @@ def _from_openapi_data(cls: Type[T], model, *args, **kwargs) -> T: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.model = model + self.type = type for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -225,11 +234,11 @@ def _from_openapi_data(cls: Type[T], model, *args, **kwargs) -> T: # noqa: E501 ) @convert_js_args_to_python_args - def __init__(self, model, *args, **kwargs) -> None: # noqa: E501 - """ModelIndexEmbed - a model defined in OpenAPI + def __init__(self, type, *args, **kwargs) -> None: # noqa: E501 + """SchemaFields - a model defined in OpenAPI Args: - model (str): The name of the embedding model used to create the index. + type (str): The data type of the field. Can be a base type (string, integer) or a vector type (dense_vector, sparse_vector, semantic_text). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -262,12 +271,15 @@ def __init__(self, model, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - metric (str): The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If not specified, the metric will be defaulted according to the model. Cannot be updated once set. Possible values: `cosine`, `euclidean`, or `dotproduct`. [optional] # noqa: E501 - dimension (int): The dimensions of the vectors to be inserted in the index. [optional] # noqa: E501 - vector_type (str): The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified. [optional] if omitted the server will use the default value of "dense". # noqa: E501 - field_map (Dict[str, Any]): Identifies the name of the text field from your document model that is embedded. [optional] # noqa: E501 - read_parameters (Dict[str, Any]): The read parameters for the embedding model. [optional] # noqa: E501 - write_parameters (Dict[str, Any]): The write parameters for the embedding model. [optional] # noqa: E501 + description (str): A description of the field. [optional] # noqa: E501 + filterable (bool): Whether the field is filterable. If true, the field is indexed and can be used in query filters. Only applicable for base types (string, integer). [optional] # noqa: E501 + full_text_searchable (bool): Whether the field is full-text searchable. If true, the field is indexed for lexical search. Only applicable for string type fields. [optional] # noqa: E501 + dimension (int): The dimension of the dense vectors. Required when type is dense_vector. [optional] # noqa: E501 + metric (str): The distance metric to be used for similarity search. Required when type is dense_vector or sparse_vector. Optional when type is semantic_text (may be included in responses). For dense_vector: cosine, euclidean, or dotproduct. For sparse_vector: must be dotproduct. For semantic_text: typically cosine. [optional] # noqa: E501 + model (str): The name of the embedding model to use. Required when type is semantic_text. [optional] # noqa: E501 + field_map ({str: (str,)}): Identifies the name of the text field from your document model that will be embedded. Maps the field name in your documents to the field name used for embedding. Only applicable when type is semantic_text. [optional] # noqa: E501 + read_parameters (Dict[str, Any]): The read parameters for the embedding model used during queries. Only applicable when type is semantic_text. [optional] # noqa: E501 + write_parameters (Dict[str, Any]): The write parameters for the embedding model used during indexing. Only applicable when type is semantic_text. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -295,7 +307,7 @@ def __init__(self, model, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.model = model + self.type = type for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/backup_model_schema.py b/pinecone/core/openapi/db_control/model/serverless_deployment.py similarity index 88% rename from pinecone/core/openapi/db_control/model/backup_model_schema.py rename to pinecone/core/openapi/db_control/model/serverless_deployment.py index 157d5ec36..709a6b9b1 100644 --- a/pinecone/core/openapi/db_control/model/backup_model_schema.py +++ b/pinecone/core/openapi/db_control/model/serverless_deployment.py @@ -1,11 +1,11 @@ """ Pinecone Control Plane API -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors and documents. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,29 +26,14 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema_fields import ( - BackupModelSchemaFields, - ) - - -def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema_fields import ( - BackupModelSchemaFields, - ) - - globals()["BackupModelSchemaFields"] = BackupModelSchemaFields - from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="BackupModelSchema") +T = TypeVar("T", bound="ServerlessDeployment") -class BackupModelSchema(ModelNormal): +class ServerlessDeployment(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -84,7 +69,6 @@ def additional_properties_type(cls): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return (bool, dict, float, int, list, str, none_type) # noqa: E501 _nullable = False @@ -99,9 +83,10 @@ def openapi_types(cls): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - "fields": ({str: (BackupModelSchemaFields,)},) # noqa: E501 + "deployment_type": (str,), # noqa: E501 + "cloud": (str,), # noqa: E501 + "region": (str,), # noqa: E501 } @cached_class_property @@ -109,7 +94,9 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "fields": "fields" # noqa: E501 + "deployment_type": "deployment_type", # noqa: E501 + "cloud": "cloud", # noqa: E501 + "region": "region", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -117,7 +104,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of BackupModelSchema. + """Create a new instance of ServerlessDeployment. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -129,11 +116,13 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], fields, *args, **kwargs) -> T: # noqa: E501 - """BackupModelSchema - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], deployment_type, cloud, region, *args, **kwargs) -> T: # noqa: E501 + """ServerlessDeployment - a model defined in OpenAPI Args: - fields ({str: (BackupModelSchemaFields,)}): A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. + deployment_type (str): Identifies this as a serverless deployment configuration. + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. + region (str): The region where the index is hosted. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -195,7 +184,9 @@ def _from_openapi_data(cls: Type[T], fields, *args, **kwargs) -> T: # noqa: E50 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.fields = fields + self.deployment_type = deployment_type + self.cloud = cloud + self.region = region for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -222,11 +213,13 @@ def _from_openapi_data(cls: Type[T], fields, *args, **kwargs) -> T: # noqa: E50 ) @convert_js_args_to_python_args - def __init__(self, fields, *args, **kwargs) -> None: # noqa: E501 - """BackupModelSchema - a model defined in OpenAPI + def __init__(self, deployment_type, cloud, region, *args, **kwargs) -> None: # noqa: E501 + """ServerlessDeployment - a model defined in OpenAPI Args: - fields ({str: (BackupModelSchemaFields,)}): A map of metadata field names to their configuration. The field name must be a valid metadata field name. The field name must be unique. + deployment_type (str): Identifies this as a serverless deployment configuration. + cloud (str): The public cloud where the index is hosted. Possible values: `gcp`, `aws`, or `azure`. + region (str): The region where the index is hosted. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -286,7 +279,9 @@ def __init__(self, fields, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.fields = fields + self.deployment_type = deployment_type + self.cloud = cloud + self.region = region for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_control/model/serverless_spec_response.py b/pinecone/core/openapi/db_control/model/serverless_spec_response.py deleted file mode 100644 index cbd4f69c3..000000000 --- a/pinecone/core/openapi/db_control/model/serverless_spec_response.py +++ /dev/null @@ -1,323 +0,0 @@ -""" -Pinecone Control Plane API - -Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 - -This file is @generated using OpenAPI. - -The version of the OpenAPI document: 2025-10 -Contact: support@pinecone.io -""" - -from pinecone.openapi_support.model_utils import ( # noqa: F401 - PineconeApiTypeError, - ModelComposed, - ModelNormal, - ModelSimple, - OpenApiModel, - cached_property, - change_keys_js_to_python, - convert_js_args_to_python_args, - date, - datetime, - file_type, - none_type, - validate_get_composed_info, -) -from pinecone.openapi_support.exceptions import PineconeApiAttributeError - -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.read_capacity_response import ReadCapacityResponse - - -def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - from pinecone.core.openapi.db_control.model.read_capacity_response import ReadCapacityResponse - - globals()["BackupModelSchema"] = BackupModelSchema - globals()["ReadCapacityResponse"] = ReadCapacityResponse - - -from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar -from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property - -T = TypeVar("T", bound="ServerlessSpecResponse") - - -class ServerlessSpecResponse(ModelNormal): - """NOTE: This class is @generated using OpenAPI. - - Do not edit the class manually. - - Attributes: - allowed_values (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - with a capitalized key describing the allowed value and an allowed - value. These dicts store the allowed enum values. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - discriminator_value_class_map (dict): A dict to go from the discriminator - variable value to the discriminator class name. - validations (dict): The key is the tuple path to the attribute - and the for var_name this is (var_name,). The value is a dict - that stores validations for max_length, min_length, max_items, - min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, - inclusive_minimum, and regex. - additional_properties_type (tuple): A tuple of classes accepted - as additional properties values. - """ - - _data_store: Dict[str, Any] - _check_type: bool - - allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} - - validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} - - @cached_class_property - def additional_properties_type(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - """ - lazy_import() - return (bool, dict, float, int, list, str, none_type) # noqa: E501 - - _nullable = False - - @cached_class_property - def openapi_types(cls): - """ - This must be a method because a model may have properties that are - of type self, this must run after the class is loaded - - Returns - openapi_types (dict): The key is attribute name - and the value is attribute type. - """ - lazy_import() - return { - "cloud": (str,), # noqa: E501 - "region": (str,), # noqa: E501 - "read_capacity": (ReadCapacityResponse,), # noqa: E501 - "source_collection": (str,), # noqa: E501 - "schema": (BackupModelSchema,), # noqa: E501 - } - - @cached_class_property - def discriminator(cls): - return None - - attribute_map: Dict[str, str] = { - "cloud": "cloud", # noqa: E501 - "region": "region", # noqa: E501 - "read_capacity": "read_capacity", # noqa: E501 - "source_collection": "source_collection", # noqa: E501 - "schema": "schema", # noqa: E501 - } - - read_only_vars: Set[str] = set([]) - - _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} - - def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ServerlessSpecResponse. - - This method is overridden to provide proper type inference for mypy. - The actual instance creation logic (including discriminator handling) - is handled by the parent class's __new__ method. - """ - # Call parent's __new__ with all arguments to preserve discriminator logic - instance: T = super().__new__(cls, *args, **kwargs) - return instance - - @classmethod - @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], cloud, region, read_capacity, *args, **kwargs) -> T: # noqa: E501 - """ServerlessSpecResponse - a model defined in OpenAPI - - Args: - cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. - region (str): The region where you would like your index to be created. - read_capacity (ReadCapacityResponse): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) - _enforce_validations = kwargs.pop("_enforce_validations", False) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - self = super(OpenApiModel, cls).__new__(cls) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.cloud = cloud - self.region = region - self.read_capacity = read_capacity - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - return self - - required_properties = set( - [ - "_enforce_allowed_values", - "_enforce_validations", - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", - ] - ) - - @convert_js_args_to_python_args - def __init__(self, cloud, region, read_capacity, *args, **kwargs) -> None: # noqa: E501 - """ServerlessSpecResponse - a model defined in OpenAPI - - Args: - cloud (str): The public cloud where you would like your index hosted. Possible values: `gcp`, `aws`, or `azure`. - region (str): The region where you would like your index to be created. - read_capacity (ReadCapacityResponse): - - Keyword Args: - _check_type (bool): if True, values for parameters in openapi_types - will be type checked and a TypeError will be - raised if the wrong type is input. - Defaults to True - _path_to_item (tuple/list): This is a list of keys or values to - drill down to the model in received_data - when deserializing a response - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _configuration (Configuration): the instance to use when - deserializing a file_type parameter. - If passed, type conversion is attempted - If omitted no type conversion is done. - _visited_composed_classes (tuple): This stores a tuple of - classes that we have traveled through so that - if we see that class again we will not use its - discriminator again. - When traveling through a discriminator, the - composed schema that is - is traveled through is added to this set. - For example if Animal has a discriminator - petType and we pass in "Dog", and the class Dog - allOf includes Animal, we move through Animal - once using the discriminator, and pick Dog. - Then in Dog, we will make an instance of the - Animal class but this time we won't travel - through its discriminator because we passed in - _visited_composed_classes = (Animal,) - source_collection (str): The name of the collection to be used as the source for the index. [optional] # noqa: E501 - schema (BackupModelSchema): [optional] # noqa: E501 - """ - - _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) - _enforce_validations = kwargs.pop("_enforce_validations", True) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) - - if args: - raise PineconeApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % (args, self.__class__.__name__), - path_to_item=_path_to_item, - valid_classes=(self.__class__,), - ) - - self._data_store = {} - self._enforce_allowed_values = _enforce_allowed_values - self._enforce_validations = _enforce_validations - self._check_type = _check_type - self._spec_property_naming = _spec_property_naming - self._path_to_item = _path_to_item - self._configuration = _configuration - self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - - self.cloud = cloud - self.region = region - self.read_capacity = read_capacity - for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): - # discard variable. - continue - setattr(self, var_name, var_value) - if var_name in self.read_only_vars: - raise PineconeApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes." - ) diff --git a/pinecone/core/openapi/db_control/models/__init__.py b/pinecone/core/openapi/db_control/models/__init__.py index 774a057e6..231884624 100644 --- a/pinecone/core/openapi/db_control/models/__init__.py +++ b/pinecone/core/openapi/db_control/models/__init__.py @@ -9,20 +9,12 @@ # import sys # sys.setrecursionlimit(n) -from pinecone.core.openapi.db_control.model.byoc import BYOC from pinecone.core.openapi.db_control.model.backup_list import BackupList from pinecone.core.openapi.db_control.model.backup_model import BackupModel -from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema -from pinecone.core.openapi.db_control.model.backup_model_schema_fields import ( - BackupModelSchemaFields, -) -from pinecone.core.openapi.db_control.model.byoc_spec import ByocSpec +from pinecone.core.openapi.db_control.model.byoc_deployment import ByocDeployment from pinecone.core.openapi.db_control.model.collection_list import CollectionList from pinecone.core.openapi.db_control.model.collection_model import CollectionModel from pinecone.core.openapi.db_control.model.configure_index_request import ConfigureIndexRequest -from pinecone.core.openapi.db_control.model.configure_index_request_embed import ( - ConfigureIndexRequestEmbed, -) from pinecone.core.openapi.db_control.model.create_backup_request import CreateBackupRequest from pinecone.core.openapi.db_control.model.create_collection_request import CreateCollectionRequest from pinecone.core.openapi.db_control.model.create_index_for_model_request import ( @@ -38,28 +30,28 @@ CreateIndexFromBackupResponse, ) from pinecone.core.openapi.db_control.model.create_index_request import CreateIndexRequest +from pinecone.core.openapi.db_control.model.deployment import Deployment from pinecone.core.openapi.db_control.model.error_response import ErrorResponse from pinecone.core.openapi.db_control.model.error_response_error import ErrorResponseError from pinecone.core.openapi.db_control.model.index_list import IndexList from pinecone.core.openapi.db_control.model.index_model import IndexModel from pinecone.core.openapi.db_control.model.index_model_status import IndexModelStatus -from pinecone.core.openapi.db_control.model.index_spec import IndexSpec from pinecone.core.openapi.db_control.model.index_tags import IndexTags -from pinecone.core.openapi.db_control.model.model_index_embed import ModelIndexEmbed from pinecone.core.openapi.db_control.model.pagination_response import PaginationResponse -from pinecone.core.openapi.db_control.model.pod_based import PodBased -from pinecone.core.openapi.db_control.model.pod_spec import PodSpec -from pinecone.core.openapi.db_control.model.pod_spec_metadata_config import PodSpecMetadataConfig -from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity -from pinecone.core.openapi.db_control.model.read_capacity_dedicated_config import ( - ReadCapacityDedicatedConfig, +from pinecone.core.openapi.db_control.model.pod_deployment import PodDeployment +from pinecone.core.openapi.db_control.model.pod_deployment_metadata_config import ( + PodDeploymentMetadataConfig, ) +from pinecone.core.openapi.db_control.model.read_capacity import ReadCapacity from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec import ( ReadCapacityDedicatedSpec, ) from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response import ( ReadCapacityDedicatedSpecResponse, ) +from pinecone.core.openapi.db_control.model.read_capacity_dedicated_spec_response_scaling import ( + ReadCapacityDedicatedSpecResponseScaling, +) from pinecone.core.openapi.db_control.model.read_capacity_on_demand_spec import ( ReadCapacityOnDemandSpec, ) @@ -70,7 +62,6 @@ from pinecone.core.openapi.db_control.model.read_capacity_status import ReadCapacityStatus from pinecone.core.openapi.db_control.model.restore_job_list import RestoreJobList from pinecone.core.openapi.db_control.model.restore_job_model import RestoreJobModel -from pinecone.core.openapi.db_control.model.scaling_config_manual import ScalingConfigManual -from pinecone.core.openapi.db_control.model.serverless import Serverless -from pinecone.core.openapi.db_control.model.serverless_spec import ServerlessSpec -from pinecone.core.openapi.db_control.model.serverless_spec_response import ServerlessSpecResponse +from pinecone.core.openapi.db_control.model.schema import Schema +from pinecone.core.openapi.db_control.model.schema_fields import SchemaFields +from pinecone.core.openapi.db_control.model.serverless_deployment import ServerlessDeployment diff --git a/pinecone/core/openapi/db_data/__init__.py b/pinecone/core/openapi/db_data/__init__.py index eb475f54e..f957f144d 100644 --- a/pinecone/core/openapi/db_data/__init__.py +++ b/pinecone/core/openapi/db_data/__init__.py @@ -7,7 +7,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -27,4 +27,4 @@ from pinecone.openapi_support.exceptions import PineconeApiKeyError from pinecone.openapi_support.exceptions import PineconeApiException -API_VERSION = "2025-10" +API_VERSION = "2026-01.alpha" diff --git a/pinecone/core/openapi/db_data/api/bulk_operations_api.py b/pinecone/core/openapi/db_data/api/bulk_operations_api.py index b1446c703..8accb256f 100644 --- a/pinecone/core/openapi/db_data/api/bulk_operations_api.py +++ b/pinecone/core/openapi/db_data/api/bulk_operations_api.py @@ -5,13 +5,13 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -47,7 +47,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client def __cancel_bulk_import( - self, id, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, id, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> Dict[str, Any] | ApplyResult[Dict[str, Any]]: """Cancel an import # noqa: E501 @@ -55,12 +55,12 @@ def __cancel_bulk_import( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.cancel_bulk_import(id, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.cancel_bulk_import(id, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: id (str): Unique identifier for the import operation. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -88,9 +88,7 @@ def __cancel_bulk_import( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["id"] = id - return cast( - Dict[str, Any] | ApplyResult[Dict[str, Any]], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.cancel_bulk_import = _Endpoint( settings={ @@ -122,7 +120,7 @@ def __cancel_bulk_import( ) def __describe_bulk_import( - self, id, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, id, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> ImportModel | ApplyResult[ImportModel]: """Describe an import # noqa: E501 @@ -130,12 +128,12 @@ def __describe_bulk_import( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_bulk_import(id, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_bulk_import(id, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: id (str): Unique identifier for the import operation. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -163,7 +161,7 @@ def __describe_bulk_import( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["id"] = id - return cast(ImportModel | ApplyResult[ImportModel], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.describe_bulk_import = _Endpoint( settings={ @@ -195,7 +193,7 @@ def __describe_bulk_import( ) def __list_bulk_imports( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> ListImportsResponse | ApplyResult[ListImportsResponse]: """List imports # noqa: E501 @@ -203,11 +201,11 @@ def __list_bulk_imports( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_bulk_imports(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_bulk_imports(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): Max number of operations to return per page. [optional] if omitted the server will use the default value of 100. @@ -236,10 +234,7 @@ def __list_bulk_imports( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - ListImportsResponse | ApplyResult[ListImportsResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.list_bulk_imports = _Endpoint( settings={ @@ -285,7 +280,7 @@ def __list_bulk_imports( def __start_bulk_import( self, start_import_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> StartImportResponse | ApplyResult[StartImportResponse]: """Start import # noqa: E501 @@ -294,12 +289,12 @@ def __start_bulk_import( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.start_bulk_import(start_import_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.start_bulk_import(start_import_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: start_import_request (StartImportRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -327,10 +322,7 @@ def __start_bulk_import( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["start_import_request"] = start_import_request - return cast( - StartImportResponse | ApplyResult[StartImportResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.start_bulk_import = _Endpoint( settings={ @@ -380,7 +372,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client async def __cancel_bulk_import( - self, id, x_pinecone_api_version="2025-10", **kwargs + self, id, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> Dict[str, Any]: """Cancel an import # noqa: E501 @@ -389,7 +381,7 @@ async def __cancel_bulk_import( Args: id (str): Unique identifier for the import operation. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -414,7 +406,7 @@ async def __cancel_bulk_import( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["id"] = id - return cast(Dict[str, Any], await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.cancel_bulk_import = _AsyncioEndpoint( settings={ @@ -446,7 +438,7 @@ async def __cancel_bulk_import( ) async def __describe_bulk_import( - self, id, x_pinecone_api_version="2025-10", **kwargs + self, id, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> ImportModel: """Describe an import # noqa: E501 @@ -455,7 +447,7 @@ async def __describe_bulk_import( Args: id (str): Unique identifier for the import operation. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -480,7 +472,7 @@ async def __describe_bulk_import( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["id"] = id - return cast(ImportModel, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_bulk_import = _AsyncioEndpoint( settings={ @@ -512,7 +504,7 @@ async def __describe_bulk_import( ) async def __list_bulk_imports( - self, x_pinecone_api_version="2025-10", **kwargs + self, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> ListImportsResponse: """List imports # noqa: E501 @@ -520,7 +512,7 @@ async def __list_bulk_imports( Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): Max number of operations to return per page. [optional] if omitted the server will use the default value of 100. @@ -546,7 +538,7 @@ async def __list_bulk_imports( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ListImportsResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_bulk_imports = _AsyncioEndpoint( settings={ @@ -590,7 +582,7 @@ async def __list_bulk_imports( ) async def __start_bulk_import( - self, start_import_request, x_pinecone_api_version="2025-10", **kwargs + self, start_import_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> StartImportResponse: """Start import # noqa: E501 @@ -599,7 +591,7 @@ async def __start_bulk_import( Args: start_import_request (StartImportRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -624,7 +616,7 @@ async def __start_bulk_import( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["start_import_request"] = start_import_request - return cast(StartImportResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.start_bulk_import = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/db_data/api/document_operations_api.py b/pinecone/core/openapi/db_data/api/document_operations_api.py new file mode 100644 index 000000000..96cc9c6ba --- /dev/null +++ b/pinecone/core/openapi/db_data/api/document_operations_api.py @@ -0,0 +1,405 @@ +""" +Pinecone Data Plane API + +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 + +This file is @generated using OpenAPI. + +The version of the OpenAPI document: 2026-01.alpha +Contact: support@pinecone.io +""" + +from __future__ import annotations + +from typing import TYPE_CHECKING +from multiprocessing.pool import ApplyResult + +from pinecone.openapi_support import ApiClient, AsyncioApiClient +from pinecone.openapi_support.endpoint_utils import ( + ExtraOpenApiKwargsTypedDict, + KwargsWithOpenApiKwargDefaultsTypedDict, +) +from pinecone.openapi_support.endpoint import Endpoint as _Endpoint, ExtraOpenApiKwargsTypedDict +from pinecone.openapi_support.asyncio_endpoint import AsyncioEndpoint as _AsyncioEndpoint +from pinecone.openapi_support.model_utils import ( # noqa: F401 + date, + datetime, + file_type, + none_type, + validate_and_convert_types, +) +from pinecone.core.openapi.db_data.model.document_search_request import DocumentSearchRequest +from pinecone.core.openapi.db_data.model.document_search_response import DocumentSearchResponse +from pinecone.core.openapi.db_data.model.document_upsert_request import DocumentUpsertRequest +from pinecone.core.openapi.db_data.model.document_upsert_response import DocumentUpsertResponse +from pinecone.core.openapi.db_data.model.rpc_status import RpcStatus + + +class DocumentOperationsApi: + """NOTE: This class is @generated using OpenAPI. + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def __search_documents( + self, + namespace, + document_search_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, + ) -> DocumentSearchResponse | ApplyResult[DocumentSearchResponse]: + """Search documents # noqa: E501 + + Search documents in a namespace using text search, vector search, or sparse vector search. Results can be filtered by metadata and ranked using the `score_by` parameter. For v0, a single query can only be ranked by: - Pure text query (multiple terms on the same field) - Pure vector query (one field) For guidance and examples, see [Search documents](https://docs.pinecone.io/guides/search/search-overview). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.search_documents(namespace, document_search_request, x_pinecone_api_version="2026-01.alpha", async_req=True) + >>> result = thread.get() + + Args: + namespace (str): The namespace to search. + document_search_request (DocumentSearchRequest): + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + async_req (bool): execute request asynchronously + + Returns: + DocumentSearchResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs = self._process_openapi_kwargs(kwargs) + kwargs["x_pinecone_api_version"] = x_pinecone_api_version + kwargs["namespace"] = namespace + kwargs["document_search_request"] = document_search_request + return self.call_with_http_info(**kwargs) + + self.search_documents = _Endpoint( + settings={ + "response_type": (DocumentSearchResponse,), + "auth": ["ApiKeyAuth"], + "endpoint_path": "/namespaces/{namespace}/documents/search", + "operation_id": "search_documents", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": ["x_pinecone_api_version", "namespace", "document_search_request"], + "required": ["x_pinecone_api_version", "namespace", "document_search_request"], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "x_pinecone_api_version": (str,), + "namespace": (str,), + "document_search_request": (DocumentSearchRequest,), + }, + "attribute_map": { + "x_pinecone_api_version": "X-Pinecone-Api-Version", + "namespace": "namespace", + }, + "location_map": { + "x_pinecone_api_version": "header", + "namespace": "path", + "document_search_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + callable=__search_documents, + ) + + def __upsert_documents( + self, + namespace, + document_upsert_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, + ) -> DocumentUpsertResponse | ApplyResult[DocumentUpsertResponse]: + """Upsert documents # noqa: E501 + + Upsert flat JSON documents into a namespace. Documents are indexed based on the configured index schema. Vector fields can be user-specified (e.g., `my_vector`) or use the reserved `_values` key. Text fields are indexed based on schema configuration with `full_text_searchable: true`. For guidance and examples, see [Upsert documents](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.upsert_documents(namespace, document_upsert_request, x_pinecone_api_version="2026-01.alpha", async_req=True) + >>> result = thread.get() + + Args: + namespace (str): The namespace to upsert documents into. + document_upsert_request (DocumentUpsertRequest): + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + async_req (bool): execute request asynchronously + + Returns: + DocumentUpsertResponse + If the method is called asynchronously, returns the request + thread. + """ + kwargs = self._process_openapi_kwargs(kwargs) + kwargs["x_pinecone_api_version"] = x_pinecone_api_version + kwargs["namespace"] = namespace + kwargs["document_upsert_request"] = document_upsert_request + return self.call_with_http_info(**kwargs) + + self.upsert_documents = _Endpoint( + settings={ + "response_type": (DocumentUpsertResponse,), + "auth": ["ApiKeyAuth"], + "endpoint_path": "/namespaces/{namespace}/documents/upsert", + "operation_id": "upsert_documents", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": ["x_pinecone_api_version", "namespace", "document_upsert_request"], + "required": ["x_pinecone_api_version", "namespace", "document_upsert_request"], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "x_pinecone_api_version": (str,), + "namespace": (str,), + "document_upsert_request": (DocumentUpsertRequest,), + }, + "attribute_map": { + "x_pinecone_api_version": "X-Pinecone-Api-Version", + "namespace": "namespace", + }, + "location_map": { + "x_pinecone_api_version": "header", + "namespace": "path", + "document_upsert_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + callable=__upsert_documents, + ) + + +class AsyncioDocumentOperationsApi: + """NOTE: This class is @generated using OpenAPI + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = AsyncioApiClient() + self.api_client = api_client + + async def __search_documents( + self, + namespace, + document_search_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs, + ) -> DocumentSearchResponse: + """Search documents # noqa: E501 + + Search documents in a namespace using text search, vector search, or sparse vector search. Results can be filtered by metadata and ranked using the `score_by` parameter. For v0, a single query can only be ranked by: - Pure text query (multiple terms on the same field) - Pure vector query (one field) For guidance and examples, see [Search documents](https://docs.pinecone.io/guides/search/search-overview). # noqa: E501 + + + Args: + namespace (str): The namespace to search. + document_search_request (DocumentSearchRequest): + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + + Returns: + DocumentSearchResponse + """ + self._process_openapi_kwargs(kwargs) + kwargs["x_pinecone_api_version"] = x_pinecone_api_version + kwargs["namespace"] = namespace + kwargs["document_search_request"] = document_search_request + return await self.call_with_http_info(**kwargs) + + self.search_documents = _AsyncioEndpoint( + settings={ + "response_type": (DocumentSearchResponse,), + "auth": ["ApiKeyAuth"], + "endpoint_path": "/namespaces/{namespace}/documents/search", + "operation_id": "search_documents", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": ["x_pinecone_api_version", "namespace", "document_search_request"], + "required": ["x_pinecone_api_version", "namespace", "document_search_request"], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "x_pinecone_api_version": (str,), + "namespace": (str,), + "document_search_request": (DocumentSearchRequest,), + }, + "attribute_map": { + "x_pinecone_api_version": "X-Pinecone-Api-Version", + "namespace": "namespace", + }, + "location_map": { + "x_pinecone_api_version": "header", + "namespace": "path", + "document_search_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + callable=__search_documents, + ) + + async def __upsert_documents( + self, + namespace, + document_upsert_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs, + ) -> DocumentUpsertResponse: + """Upsert documents # noqa: E501 + + Upsert flat JSON documents into a namespace. Documents are indexed based on the configured index schema. Vector fields can be user-specified (e.g., `my_vector`) or use the reserved `_values` key. Text fields are indexed based on schema configuration with `full_text_searchable: true`. For guidance and examples, see [Upsert documents](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 + + + Args: + namespace (str): The namespace to upsert documents into. + document_upsert_request (DocumentUpsertRequest): + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + + Returns: + DocumentUpsertResponse + """ + self._process_openapi_kwargs(kwargs) + kwargs["x_pinecone_api_version"] = x_pinecone_api_version + kwargs["namespace"] = namespace + kwargs["document_upsert_request"] = document_upsert_request + return await self.call_with_http_info(**kwargs) + + self.upsert_documents = _AsyncioEndpoint( + settings={ + "response_type": (DocumentUpsertResponse,), + "auth": ["ApiKeyAuth"], + "endpoint_path": "/namespaces/{namespace}/documents/upsert", + "operation_id": "upsert_documents", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": ["x_pinecone_api_version", "namespace", "document_upsert_request"], + "required": ["x_pinecone_api_version", "namespace", "document_upsert_request"], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "x_pinecone_api_version": (str,), + "namespace": (str,), + "document_upsert_request": (DocumentUpsertRequest,), + }, + "attribute_map": { + "x_pinecone_api_version": "X-Pinecone-Api-Version", + "namespace": "namespace", + }, + "location_map": { + "x_pinecone_api_version": "header", + "namespace": "path", + "document_upsert_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + callable=__upsert_documents, + ) diff --git a/pinecone/core/openapi/db_data/api/namespace_operations_api.py b/pinecone/core/openapi/db_data/api/namespace_operations_api.py index 733bfa7c7..b2aa5c300 100644 --- a/pinecone/core/openapi/db_data/api/namespace_operations_api.py +++ b/pinecone/core/openapi/db_data/api/namespace_operations_api.py @@ -5,13 +5,13 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -48,7 +48,7 @@ def __init__(self, api_client=None) -> None: def __create_namespace( self, create_namespace_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> NamespaceDescription | ApplyResult[NamespaceDescription]: """Create a namespace # noqa: E501 @@ -57,12 +57,12 @@ def __create_namespace( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_namespace(create_namespace_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.create_namespace(create_namespace_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: create_namespace_request (CreateNamespaceRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -90,10 +90,7 @@ def __create_namespace( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_namespace_request"] = create_namespace_request - return cast( - NamespaceDescription | ApplyResult[NamespaceDescription], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.create_namespace = _Endpoint( settings={ @@ -131,7 +128,10 @@ def __create_namespace( ) def __delete_namespace( - self, namespace, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, + namespace, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, ) -> Dict[str, Any] | ApplyResult[Dict[str, Any]]: """Delete a namespace # noqa: E501 @@ -139,12 +139,12 @@ def __delete_namespace( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_namespace(namespace, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.delete_namespace(namespace, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: namespace (str): The namespace to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -172,9 +172,7 @@ def __delete_namespace( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace - return cast( - Dict[str, Any] | ApplyResult[Dict[str, Any]], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.delete_namespace = _Endpoint( settings={ @@ -209,7 +207,10 @@ def __delete_namespace( ) def __describe_namespace( - self, namespace, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, + namespace, + x_pinecone_api_version="2026-01.alpha", + **kwargs: ExtraOpenApiKwargsTypedDict, ) -> NamespaceDescription | ApplyResult[NamespaceDescription]: """Describe a namespace # noqa: E501 @@ -217,12 +218,12 @@ def __describe_namespace( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_namespace(namespace, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_namespace(namespace, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: namespace (str): The namespace to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -250,10 +251,7 @@ def __describe_namespace( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace - return cast( - NamespaceDescription | ApplyResult[NamespaceDescription], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.describe_namespace = _Endpoint( settings={ @@ -288,7 +286,7 @@ def __describe_namespace( ) def __list_namespaces_operation( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> ListNamespacesResponse | ApplyResult[ListNamespacesResponse]: """List namespaces # noqa: E501 @@ -296,11 +294,11 @@ def __list_namespaces_operation( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_namespaces_operation(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_namespaces_operation(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): Max number namespaces to return per page. [optional] @@ -330,10 +328,7 @@ def __list_namespaces_operation( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - ListNamespacesResponse | ApplyResult[ListNamespacesResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.list_namespaces_operation = _Endpoint( settings={ @@ -392,7 +387,7 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client async def __create_namespace( - self, create_namespace_request, x_pinecone_api_version="2025-10", **kwargs + self, create_namespace_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> NamespaceDescription: """Create a namespace # noqa: E501 @@ -401,7 +396,7 @@ async def __create_namespace( Args: create_namespace_request (CreateNamespaceRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -426,7 +421,7 @@ async def __create_namespace( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["create_namespace_request"] = create_namespace_request - return cast(NamespaceDescription, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.create_namespace = _AsyncioEndpoint( settings={ @@ -464,7 +459,7 @@ async def __create_namespace( ) async def __delete_namespace( - self, namespace, x_pinecone_api_version="2025-10", **kwargs + self, namespace, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> Dict[str, Any]: """Delete a namespace # noqa: E501 @@ -473,7 +468,7 @@ async def __delete_namespace( Args: namespace (str): The namespace to delete. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -498,7 +493,7 @@ async def __delete_namespace( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace - return cast(Dict[str, Any], await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_namespace = _AsyncioEndpoint( settings={ @@ -533,7 +528,7 @@ async def __delete_namespace( ) async def __describe_namespace( - self, namespace, x_pinecone_api_version="2025-10", **kwargs + self, namespace, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> NamespaceDescription: """Describe a namespace # noqa: E501 @@ -542,7 +537,7 @@ async def __describe_namespace( Args: namespace (str): The namespace to describe. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -567,7 +562,7 @@ async def __describe_namespace( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace - return cast(NamespaceDescription, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_namespace = _AsyncioEndpoint( settings={ @@ -602,7 +597,7 @@ async def __describe_namespace( ) async def __list_namespaces_operation( - self, x_pinecone_api_version="2025-10", **kwargs + self, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> ListNamespacesResponse: """List namespaces # noqa: E501 @@ -610,7 +605,7 @@ async def __list_namespaces_operation( Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: limit (int): Max number namespaces to return per page. [optional] @@ -637,7 +632,7 @@ async def __list_namespaces_operation( """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ListNamespacesResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_namespaces_operation = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/db_data/api/vector_operations_api.py b/pinecone/core/openapi/db_data/api/vector_operations_api.py index a317ca445..dad2db8e8 100644 --- a/pinecone/core/openapi/db_data/api/vector_operations_api.py +++ b/pinecone/core/openapi/db_data/api/vector_operations_api.py @@ -5,13 +5,13 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -63,21 +63,21 @@ def __init__(self, api_client=None) -> None: def __delete_vectors( self, delete_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> Dict[str, Any] | ApplyResult[Dict[str, Any]]: - """Delete vectors # noqa: E501 + """Delete records # noqa: E501 - Delete vectors by id from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). # noqa: E501 + Delete records by id or by metadata from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.delete_vectors(delete_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.delete_vectors(delete_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: delete_request (DeleteRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -105,9 +105,7 @@ def __delete_vectors( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["delete_request"] = delete_request - return cast( - Dict[str, Any] | ApplyResult[Dict[str, Any]], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.delete_vectors = _Endpoint( settings={ @@ -144,7 +142,7 @@ def __delete_vectors( def __describe_index_stats( self, describe_index_stats_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> IndexDescription | ApplyResult[IndexDescription]: """Get index stats # noqa: E501 @@ -153,12 +151,12 @@ def __describe_index_stats( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.describe_index_stats(describe_index_stats_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.describe_index_stats(describe_index_stats_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: describe_index_stats_request (DescribeIndexStatsRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -186,9 +184,7 @@ def __describe_index_stats( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["describe_index_stats_request"] = describe_index_stats_request - return cast( - IndexDescription | ApplyResult[IndexDescription], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.describe_index_stats = _Endpoint( settings={ @@ -226,23 +222,23 @@ def __describe_index_stats( ) def __fetch_vectors( - self, ids, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, ids, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> FetchResponse | ApplyResult[FetchResponse]: - """Fetch vectors # noqa: E501 + """Fetch records # noqa: E501 - Look up and return vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 + Look up and return records by ID from a single namespace. The returned records include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fetch_vectors(ids, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.fetch_vectors(ids, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: ids ([str]): The vector IDs to fetch. Does not accept values containing spaces. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: - namespace (str): The namespace to fetch vectors from. If not provided, the default namespace is used. [optional] + namespace (str): The namespace to fetch records from. If not provided, the default namespace is used. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -268,9 +264,7 @@ def __fetch_vectors( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["ids"] = ids - return cast( - FetchResponse | ApplyResult[FetchResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.fetch_vectors = _Endpoint( settings={ @@ -316,21 +310,21 @@ def __fetch_vectors( def __fetch_vectors_by_metadata( self, fetch_by_metadata_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> FetchByMetadataResponse | ApplyResult[FetchByMetadataResponse]: - """Fetch vectors by metadata # noqa: E501 + """Fetch records by metadata # noqa: E501 - Look up and return vectors by metadata filter from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 + Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.fetch_vectors_by_metadata(fetch_by_metadata_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.fetch_vectors_by_metadata(fetch_by_metadata_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: fetch_by_metadata_request (FetchByMetadataRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -358,10 +352,7 @@ def __fetch_vectors_by_metadata( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["fetch_by_metadata_request"] = fetch_by_metadata_request - return cast( - FetchByMetadataResponse | ApplyResult[FetchByMetadataResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.fetch_vectors_by_metadata = _Endpoint( settings={ @@ -399,19 +390,19 @@ def __fetch_vectors_by_metadata( ) def __list_vectors( - self, x_pinecone_api_version="2025-10", **kwargs: ExtraOpenApiKwargsTypedDict + self, x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict ) -> ListResponse | ApplyResult[ListResponse]: - """List vector IDs # noqa: E501 + """List record IDs # noqa: E501 - List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. # noqa: E501 + List the IDs of records in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.list_vectors(x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.list_vectors(x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: prefix (str): The vector IDs to fetch. Does not accept values containing spaces. [optional] @@ -442,9 +433,7 @@ def __list_vectors( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - ListResponse | ApplyResult[ListResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.list_vectors = _Endpoint( settings={ @@ -502,7 +491,7 @@ def __list_vectors( def __query_vectors( self, query_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> QueryResponse | ApplyResult[QueryResponse]: """Search with a vector # noqa: E501 @@ -511,12 +500,12 @@ def __query_vectors( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.query_vectors(query_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.query_vectors(query_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: query_request (QueryRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -544,9 +533,7 @@ def __query_vectors( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["query_request"] = query_request - return cast( - QueryResponse | ApplyResult[QueryResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.query_vectors = _Endpoint( settings={ @@ -584,7 +571,7 @@ def __search_records_namespace( self, namespace, search_records_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> SearchRecordsResponse | ApplyResult[SearchRecordsResponse]: """Search with text # noqa: E501 @@ -593,13 +580,13 @@ def __search_records_namespace( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.search_records_namespace(namespace, search_records_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.search_records_namespace(namespace, search_records_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: namespace (str): The namespace to search. search_records_request (SearchRecordsRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -628,10 +615,7 @@ def __search_records_namespace( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace kwargs["search_records_request"] = search_records_request - return cast( - SearchRecordsResponse | ApplyResult[SearchRecordsResponse], - self.call_with_http_info(**kwargs), - ) + return self.call_with_http_info(**kwargs) self.search_records_namespace = _Endpoint( settings={ @@ -676,21 +660,21 @@ def __search_records_namespace( def __update_vector( self, update_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> UpdateResponse | ApplyResult[UpdateResponse]: - """Update a vector # noqa: E501 + """Update a record # noqa: E501 - Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). # noqa: E501 + Update records by ID or by metadata in a namespace. Updating by ID changes the vector and/or metadata of a single record. Updating by metadata changes metadata across multiple records using a metadata filter. If a vector value is included, it will overwrite the previous value. If `set_metadata` is included, only the specified metadata fields are modified, and if a specified metadata field does not exist, it is added. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_vector(update_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.update_vector(update_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: update_request (UpdateRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -718,9 +702,7 @@ def __update_vector( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["update_request"] = update_request - return cast( - UpdateResponse | ApplyResult[UpdateResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.update_vector = _Endpoint( settings={ @@ -758,7 +740,7 @@ def __upsert_records_namespace( self, namespace, upsert_record, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> None: """Upsert text # noqa: E501 @@ -767,13 +749,13 @@ def __upsert_records_namespace( This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.upsert_records_namespace(namespace, upsert_record, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.upsert_records_namespace(namespace, upsert_record, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: namespace (str): The namespace to upsert records into. upsert_record ([UpsertRecord]): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -802,7 +784,7 @@ def __upsert_records_namespace( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace kwargs["upsert_record"] = upsert_record - return cast(None, self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.upsert_records_namespace = _Endpoint( settings={ @@ -847,21 +829,21 @@ def __upsert_records_namespace( def __upsert_vectors( self, upsert_request, - x_pinecone_api_version="2025-10", + x_pinecone_api_version="2026-01.alpha", **kwargs: ExtraOpenApiKwargsTypedDict, ) -> UpsertResponse | ApplyResult[UpsertResponse]: - """Upsert vectors # noqa: E501 + """Upsert records # noqa: E501 - Upsert vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 + Upsert records into a namespace. If a new value is upserted for an existing record ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.upsert_vectors(upsert_request, x_pinecone_api_version="2025-10", async_req=True) + >>> thread = api.upsert_vectors(upsert_request, x_pinecone_api_version="2026-01.alpha", async_req=True) >>> result = thread.get() Args: upsert_request (UpsertRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -889,9 +871,7 @@ def __upsert_vectors( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["upsert_request"] = upsert_request - return cast( - UpsertResponse | ApplyResult[UpsertResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.upsert_vectors = _Endpoint( settings={ @@ -938,16 +918,16 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client async def __delete_vectors( - self, delete_request, x_pinecone_api_version="2025-10", **kwargs + self, delete_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> Dict[str, Any]: - """Delete vectors # noqa: E501 + """Delete records # noqa: E501 - Delete vectors by id from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). # noqa: E501 + Delete records by id or by metadata from a single namespace. For guidance and examples, see [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data). # noqa: E501 Args: delete_request (DeleteRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -972,7 +952,7 @@ async def __delete_vectors( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["delete_request"] = delete_request - return cast(Dict[str, Any], await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.delete_vectors = _AsyncioEndpoint( settings={ @@ -1007,7 +987,7 @@ async def __delete_vectors( ) async def __describe_index_stats( - self, describe_index_stats_request, x_pinecone_api_version="2025-10", **kwargs + self, describe_index_stats_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> IndexDescription: """Get index stats # noqa: E501 @@ -1016,7 +996,7 @@ async def __describe_index_stats( Args: describe_index_stats_request (DescribeIndexStatsRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1041,7 +1021,7 @@ async def __describe_index_stats( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["describe_index_stats_request"] = describe_index_stats_request - return cast(IndexDescription, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.describe_index_stats = _AsyncioEndpoint( settings={ @@ -1079,19 +1059,19 @@ async def __describe_index_stats( ) async def __fetch_vectors( - self, ids, x_pinecone_api_version="2025-10", **kwargs + self, ids, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> FetchResponse: - """Fetch vectors # noqa: E501 + """Fetch records # noqa: E501 - Look up and return vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 + Look up and return records by ID from a single namespace. The returned records include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 Args: ids ([str]): The vector IDs to fetch. Does not accept values containing spaces. - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: - namespace (str): The namespace to fetch vectors from. If not provided, the default namespace is used. [optional] + namespace (str): The namespace to fetch records from. If not provided, the default namespace is used. [optional] _return_http_data_only (bool): response data without head status code and headers. Default is True. _preload_content (bool): if False, the urllib3.HTTPResponse object @@ -1114,7 +1094,7 @@ async def __fetch_vectors( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["ids"] = ids - return cast(FetchResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.fetch_vectors = _AsyncioEndpoint( settings={ @@ -1158,16 +1138,16 @@ async def __fetch_vectors( ) async def __fetch_vectors_by_metadata( - self, fetch_by_metadata_request, x_pinecone_api_version="2025-10", **kwargs + self, fetch_by_metadata_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> FetchByMetadataResponse: - """Fetch vectors by metadata # noqa: E501 + """Fetch records by metadata # noqa: E501 - Look up and return vectors by metadata filter from a single namespace. The returned vectors include the vector data and/or metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 + Look up and return records by metadata from a single namespace. The returned records include the vector data and metadata. For guidance and examples, see [Fetch data](https://docs.pinecone.io/guides/manage-data/fetch-data). # noqa: E501 Args: fetch_by_metadata_request (FetchByMetadataRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1192,7 +1172,7 @@ async def __fetch_vectors_by_metadata( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["fetch_by_metadata_request"] = fetch_by_metadata_request - return cast(FetchByMetadataResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.fetch_vectors_by_metadata = _AsyncioEndpoint( settings={ @@ -1229,14 +1209,16 @@ async def __fetch_vectors_by_metadata( callable=__fetch_vectors_by_metadata, ) - async def __list_vectors(self, x_pinecone_api_version="2025-10", **kwargs) -> ListResponse: - """List vector IDs # noqa: E501 + async def __list_vectors( + self, x_pinecone_api_version="2026-01.alpha", **kwargs + ) -> ListResponse: + """List record IDs # noqa: E501 - List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. # noqa: E501 + List the IDs of records in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix. Returns up to 100 IDs at a time by default in sorted order (bitwise \"C\" collation). If the `limit` parameter is set, `list` returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes a `pagination_token` that you can use to get the next batch of IDs. When the response does not include a `pagination_token`, there are no more IDs to return. For guidance and examples, see [List record IDs](https://docs.pinecone.io/guides/manage-data/list-record-ids). **Note:** `list` is supported only for serverless indexes. # noqa: E501 Args: - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: prefix (str): The vector IDs to fetch. Does not accept values containing spaces. [optional] @@ -1264,7 +1246,7 @@ async def __list_vectors(self, x_pinecone_api_version="2025-10", **kwargs) -> Li """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ListResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_vectors = _AsyncioEndpoint( settings={ @@ -1320,7 +1302,7 @@ async def __list_vectors(self, x_pinecone_api_version="2025-10", **kwargs) -> Li ) async def __query_vectors( - self, query_request, x_pinecone_api_version="2025-10", **kwargs + self, query_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> QueryResponse: """Search with a vector # noqa: E501 @@ -1329,7 +1311,7 @@ async def __query_vectors( Args: query_request (QueryRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1354,7 +1336,7 @@ async def __query_vectors( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["query_request"] = query_request - return cast(QueryResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.query_vectors = _AsyncioEndpoint( settings={ @@ -1389,7 +1371,11 @@ async def __query_vectors( ) async def __search_records_namespace( - self, namespace, search_records_request, x_pinecone_api_version="2025-10", **kwargs + self, + namespace, + search_records_request, + x_pinecone_api_version="2026-01.alpha", + **kwargs, ) -> SearchRecordsResponse: """Search with text # noqa: E501 @@ -1399,7 +1385,7 @@ async def __search_records_namespace( Args: namespace (str): The namespace to search. search_records_request (SearchRecordsRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1425,7 +1411,7 @@ async def __search_records_namespace( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace kwargs["search_records_request"] = search_records_request - return cast(SearchRecordsResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.search_records_namespace = _AsyncioEndpoint( settings={ @@ -1468,16 +1454,16 @@ async def __search_records_namespace( ) async def __update_vector( - self, update_request, x_pinecone_api_version="2025-10", **kwargs + self, update_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> UpdateResponse: - """Update a vector # noqa: E501 + """Update a record # noqa: E501 - Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a `set_metadata` is included, the values of the fields specified in it will be added or overwrite the previous value. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). # noqa: E501 + Update records by ID or by metadata in a namespace. Updating by ID changes the vector and/or metadata of a single record. Updating by metadata changes metadata across multiple records using a metadata filter. If a vector value is included, it will overwrite the previous value. If `set_metadata` is included, only the specified metadata fields are modified, and if a specified metadata field does not exist, it is added. For guidance and examples, see [Update data](https://docs.pinecone.io/guides/manage-data/update-data). # noqa: E501 Args: update_request (UpdateRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1502,7 +1488,7 @@ async def __update_vector( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["update_request"] = update_request - return cast(UpdateResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.update_vector = _AsyncioEndpoint( settings={ @@ -1537,7 +1523,7 @@ async def __update_vector( ) async def __upsert_records_namespace( - self, namespace, upsert_record, x_pinecone_api_version="2025-10", **kwargs + self, namespace, upsert_record, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> None: """Upsert text # noqa: E501 @@ -1547,7 +1533,7 @@ async def __upsert_records_namespace( Args: namespace (str): The namespace to upsert records into. upsert_record ([UpsertRecord]): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1573,7 +1559,7 @@ async def __upsert_records_namespace( kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["namespace"] = namespace kwargs["upsert_record"] = upsert_record - return cast(None, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.upsert_records_namespace = _AsyncioEndpoint( settings={ @@ -1616,16 +1602,16 @@ async def __upsert_records_namespace( ) async def __upsert_vectors( - self, upsert_request, x_pinecone_api_version="2025-10", **kwargs + self, upsert_request, x_pinecone_api_version="2026-01.alpha", **kwargs ) -> UpsertResponse: - """Upsert vectors # noqa: E501 + """Upsert records # noqa: E501 - Upsert vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 + Upsert records into a namespace. If a new value is upserted for an existing record ID, it will overwrite the previous value. For guidance, examples, and limits, see [Upsert data](https://docs.pinecone.io/guides/index-data/upsert-data). # noqa: E501 Args: upsert_request (UpsertRequest): - x_pinecone_api_version (str): Required date-based version header Defaults to "2025-10", must be one of ["2025-10"] + x_pinecone_api_version (str): Required date-based version header Defaults to "2026-01.alpha", must be one of ["2026-01.alpha"] Keyword Args: _return_http_data_only (bool): response data without head status @@ -1650,7 +1636,7 @@ async def __upsert_vectors( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["upsert_request"] = upsert_request - return cast(UpsertResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.upsert_vectors = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/db_data/apis/__init__.py b/pinecone/core/openapi/db_data/apis/__init__.py index a5caa981e..b0c728b1a 100644 --- a/pinecone/core/openapi/db_data/apis/__init__.py +++ b/pinecone/core/openapi/db_data/apis/__init__.py @@ -14,5 +14,6 @@ # Import APIs into API package: from pinecone.core.openapi.db_data.api.bulk_operations_api import BulkOperationsApi +from pinecone.core.openapi.db_data.api.document_operations_api import DocumentOperationsApi from pinecone.core.openapi.db_data.api.namespace_operations_api import NamespaceOperationsApi from pinecone.core.openapi.db_data.api.vector_operations_api import VectorOperationsApi diff --git a/pinecone/core/openapi/db_data/model/create_namespace_request.py b/pinecone/core/openapi/db_data/model/create_namespace_request.py index 56809af25..e1e212aba 100644 --- a/pinecone/core/openapi/db_data/model/create_namespace_request.py +++ b/pinecone/core/openapi/db_data/model/create_namespace_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,13 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.create_namespace_request_schema import ( - CreateNamespaceRequestSchema, - ) - def lazy_import(): from pinecone.core.openapi.db_data.model.create_namespace_request_schema import ( diff --git a/pinecone/core/openapi/db_data/model/create_namespace_request_schema.py b/pinecone/core/openapi/db_data/model/create_namespace_request_schema.py index e8dbfb59b..fff63b6aa 100644 --- a/pinecone/core/openapi/db_data/model/create_namespace_request_schema.py +++ b/pinecone/core/openapi/db_data/model/create_namespace_request_schema.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,13 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.create_namespace_request_schema_fields import ( - CreateNamespaceRequestSchemaFields, - ) - def lazy_import(): from pinecone.core.openapi.db_data.model.create_namespace_request_schema_fields import ( diff --git a/pinecone/core/openapi/db_data/model/create_namespace_request_schema_fields.py b/pinecone/core/openapi/db_data/model/create_namespace_request_schema_fields.py index 421885f12..59c89f8b8 100644 --- a/pinecone/core/openapi/db_data/model/create_namespace_request_schema_fields.py +++ b/pinecone/core/openapi/db_data/model/create_namespace_request_schema_fields.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/delete_request.py b/pinecone/core/openapi/db_data/model/delete_request.py index 2412ff7cd..15251cbd9 100644 --- a/pinecone/core/openapi/db_data/model/delete_request.py +++ b/pinecone/core/openapi/db_data/model/delete_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -154,7 +154,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 _visited_composed_classes = (Animal,) ids ([str]): Vectors to delete. [optional] # noqa: E501 delete_all (bool): This indicates that all vectors in the index namespace should be deleted. [optional] if omitted the server will use the default value of False. # noqa: E501 - namespace (str): The namespace to delete vectors from, if applicable. [optional] # noqa: E501 + namespace (str): The namespace to delete records from, if applicable. [optional] # noqa: E501 filter (Dict[str, Any]): If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data#delete-records-by-metadata). [optional] # noqa: E501 """ @@ -247,7 +247,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 _visited_composed_classes = (Animal,) ids ([str]): Vectors to delete. [optional] # noqa: E501 delete_all (bool): This indicates that all vectors in the index namespace should be deleted. [optional] if omitted the server will use the default value of False. # noqa: E501 - namespace (str): The namespace to delete vectors from, if applicable. [optional] # noqa: E501 + namespace (str): The namespace to delete records from, if applicable. [optional] # noqa: E501 filter (Dict[str, Any]): If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See [Delete data](https://docs.pinecone.io/guides/manage-data/delete-data#delete-records-by-metadata). [optional] # noqa: E501 """ diff --git a/pinecone/core/openapi/db_data/model/describe_index_stats_request.py b/pinecone/core/openapi/db_data/model/describe_index_stats_request.py index 58e88b5c9..51d9d92bd 100644 --- a/pinecone/core/openapi/db_data/model/describe_index_stats_request.py +++ b/pinecone/core/openapi/db_data/model/describe_index_stats_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/pod_based.py b/pinecone/core/openapi/db_data/model/document.py similarity index 92% rename from pinecone/core/openapi/db_control/model/pod_based.py rename to pinecone/core/openapi/db_data/model/document.py index 70a67564f..096e0e233 100644 --- a/pinecone/core/openapi/db_control/model/pod_based.py +++ b/pinecone/core/openapi/db_data/model/document.py @@ -1,11 +1,11 @@ """ -Pinecone Control Plane API +Pinecone Data Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,25 +26,14 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.pod_spec import PodSpec - - -def lazy_import(): - from pinecone.core.openapi.db_control.model.pod_spec import PodSpec - - globals()["PodSpec"] = PodSpec - from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="PodBased") +T = TypeVar("T", bound="Document") -class PodBased(ModelNormal): +class Document(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -80,7 +69,6 @@ def additional_properties_type(cls): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return (bool, dict, float, int, list, str, none_type) # noqa: E501 _nullable = False @@ -95,9 +83,9 @@ def openapi_types(cls): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - "pod": (PodSpec,) # noqa: E501 + "id": (str,), # noqa: E501 + "score": (float,), # noqa: E501 } @cached_class_property @@ -105,7 +93,8 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "pod": "pod" # noqa: E501 + "id": "_id", # noqa: E501 + "score": "score", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -113,7 +102,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of PodBased. + """Create a new instance of Document. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -125,11 +114,11 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], pod, *args, **kwargs) -> T: # noqa: E501 - """PodBased - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], id, *args, **kwargs) -> T: # noqa: E501 + """Document - a model defined in OpenAPI Args: - pod (PodSpec): + id (str): The unique identifier of the document. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -162,6 +151,7 @@ def _from_openapi_data(cls: Type[T], pod, *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + score (float): The relevance score for this document (if applicable). [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -191,7 +181,7 @@ def _from_openapi_data(cls: Type[T], pod, *args, **kwargs) -> T: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.pod = pod + self.id = id for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -218,11 +208,11 @@ def _from_openapi_data(cls: Type[T], pod, *args, **kwargs) -> T: # noqa: E501 ) @convert_js_args_to_python_args - def __init__(self, pod, *args, **kwargs) -> None: # noqa: E501 - """PodBased - a model defined in OpenAPI + def __init__(self, id, *args, **kwargs) -> None: # noqa: E501 + """Document - a model defined in OpenAPI Args: - pod (PodSpec): + id (str): The unique identifier of the document. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -255,6 +245,7 @@ def __init__(self, pod, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + score (float): The relevance score for this document (if applicable). [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -282,7 +273,7 @@ def __init__(self, pod, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.pod = pod + self.id = id for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_data/model/document_search_request.py b/pinecone/core/openapi/db_data/model/document_search_request.py new file mode 100644 index 000000000..ca3c4fe28 --- /dev/null +++ b/pinecone/core/openapi/db_data/model/document_search_request.py @@ -0,0 +1,312 @@ +""" +Pinecone Data Plane API + +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 + +This file is @generated using OpenAPI. + +The version of the OpenAPI document: 2026-01.alpha +Contact: support@pinecone.io +""" + +from pinecone.openapi_support.model_utils import ( # noqa: F401 + PineconeApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + OpenApiModel, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from pinecone.openapi_support.exceptions import PineconeApiAttributeError + + +def lazy_import(): + from pinecone.core.openapi.db_data.model.filter_expression import FilterExpression + from pinecone.core.openapi.db_data.model.score_by_query import ScoreByQuery + + globals()["FilterExpression"] = FilterExpression + globals()["ScoreByQuery"] = ScoreByQuery + + +from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar +from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property + +T = TypeVar("T", bound="DocumentSearchRequest") + + +class DocumentSearchRequest(ModelNormal): + """NOTE: This class is @generated using OpenAPI. + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + _data_store: Dict[str, Any] + _check_type: bool + + allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} + + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { + ("top_k",): {"inclusive_maximum": 10000, "inclusive_minimum": 1}, + ("score_by",): {"max_items": 1, "min_items": 1}, + } + + @cached_class_property + def additional_properties_type(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, dict, float, int, list, str, none_type) # noqa: E501 + + _nullable = False + + @cached_class_property + def openapi_types(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + "top_k": (int,), # noqa: E501 + "include_fields": (dict,), # noqa: E501 + "filter": (FilterExpression,), # noqa: E501 + "score_by": ([ScoreByQuery],), # noqa: E501 + } + + @cached_class_property + def discriminator(cls): + return None + + attribute_map: Dict[str, str] = { + "top_k": "top_k", # noqa: E501 + "include_fields": "include_fields", # noqa: E501 + "filter": "filter", # noqa: E501 + "score_by": "score_by", # noqa: E501 + } + + read_only_vars: Set[str] = set([]) + + _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} + + def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: + """Create a new instance of DocumentSearchRequest. + + This method is overridden to provide proper type inference for mypy. + The actual instance creation logic (including discriminator handling) + is handled by the parent class's __new__ method. + """ + # Call parent's __new__ with all arguments to preserve discriminator logic + instance: T = super().__new__(cls, *args, **kwargs) + return instance + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls: Type[T], top_k, *args, **kwargs) -> T: # noqa: E501 + """DocumentSearchRequest - a model defined in OpenAPI + + Args: + top_k (int): The number of top results to return. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include_fields (dict): Fields to include in the response. Default behavior is to return IDs only. Use `\"*\"` to return all fields, or specify an array of specific field names. [optional] # noqa: E501 + filter (FilterExpression): [optional] # noqa: E501 + score_by ([ScoreByQuery]): Array of query objects to rank documents. For v0, only one query is supported: either a pure text query or a pure vector query (dense or sparse). [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) + _enforce_validations = kwargs.pop("_enforce_validations", False) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.top_k = top_k + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set( + [ + "_enforce_allowed_values", + "_enforce_validations", + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ] + ) + + @convert_js_args_to_python_args + def __init__(self, top_k, *args, **kwargs) -> None: # noqa: E501 + """DocumentSearchRequest - a model defined in OpenAPI + + Args: + top_k (int): The number of top results to return. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + include_fields (dict): Fields to include in the response. Default behavior is to return IDs only. Use `\"*\"` to return all fields, or specify an array of specific field names. [optional] # noqa: E501 + filter (FilterExpression): [optional] # noqa: E501 + score_by ([ScoreByQuery]): Array of query objects to rank documents. For v0, only one query is supported: either a pure text query or a pure vector query (dense or sparse). [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) + _enforce_validations = kwargs.pop("_enforce_validations", True) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.top_k = top_k + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes." + ) diff --git a/pinecone/core/openapi/db_control/model/byoc.py b/pinecone/core/openapi/db_data/model/document_search_response.py similarity index 90% rename from pinecone/core/openapi/db_control/model/byoc.py rename to pinecone/core/openapi/db_data/model/document_search_response.py index 2e45fc821..c9426ffa4 100644 --- a/pinecone/core/openapi/db_control/model/byoc.py +++ b/pinecone/core/openapi/db_data/model/document_search_response.py @@ -1,11 +1,11 @@ """ -Pinecone Control Plane API +Pinecone Data Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,25 +26,22 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.byoc_spec import ByocSpec - def lazy_import(): - from pinecone.core.openapi.db_control.model.byoc_spec import ByocSpec + from pinecone.core.openapi.db_data.model.document import Document + from pinecone.core.openapi.db_data.model.usage import Usage - globals()["ByocSpec"] = ByocSpec + globals()["Document"] = Document + globals()["Usage"] = Usage from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="BYOC") +T = TypeVar("T", bound="DocumentSearchResponse") -class BYOC(ModelNormal): +class DocumentSearchResponse(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -97,7 +94,8 @@ def openapi_types(cls): """ lazy_import() return { - "byoc": (ByocSpec,) # noqa: E501 + "documents": ([Document],), # noqa: E501 + "usage": (Usage,), # noqa: E501 } @cached_class_property @@ -105,7 +103,8 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "byoc": "byoc" # noqa: E501 + "documents": "documents", # noqa: E501 + "usage": "usage", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -113,7 +112,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of BYOC. + """Create a new instance of DocumentSearchResponse. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -125,11 +124,8 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], byoc, *args, **kwargs) -> T: # noqa: E501 - """BYOC - a model defined in OpenAPI - - Args: - byoc (ByocSpec): + def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 + """DocumentSearchResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -162,6 +158,8 @@ def _from_openapi_data(cls: Type[T], byoc, *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + documents ([Document]): The matched documents, ordered by relevance score. [optional] # noqa: E501 + usage (Usage): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -191,7 +189,6 @@ def _from_openapi_data(cls: Type[T], byoc, *args, **kwargs) -> T: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.byoc = byoc for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -218,11 +215,8 @@ def _from_openapi_data(cls: Type[T], byoc, *args, **kwargs) -> T: # noqa: E501 ) @convert_js_args_to_python_args - def __init__(self, byoc, *args, **kwargs) -> None: # noqa: E501 - """BYOC - a model defined in OpenAPI - - Args: - byoc (ByocSpec): + def __init__(self, *args, **kwargs) -> None: # noqa: E501 + """DocumentSearchResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -255,6 +249,8 @@ def __init__(self, byoc, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) + documents ([Document]): The matched documents, ordered by relevance score. [optional] # noqa: E501 + usage (Usage): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -282,7 +278,6 @@ def __init__(self, byoc, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.byoc = byoc for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_data/model/document_upsert_request.py b/pinecone/core/openapi/db_data/model/document_upsert_request.py new file mode 100644 index 000000000..99003e4da --- /dev/null +++ b/pinecone/core/openapi/db_data/model/document_upsert_request.py @@ -0,0 +1,294 @@ +""" +Pinecone Data Plane API + +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 + +This file is @generated using OpenAPI. + +The version of the OpenAPI document: 2026-01.alpha +Contact: support@pinecone.io +""" + +from pinecone.openapi_support.model_utils import ( # noqa: F401 + PineconeApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + OpenApiModel, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from pinecone.openapi_support.exceptions import PineconeApiAttributeError + + +from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar +from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property + +T = TypeVar("T", bound="DocumentUpsertRequest") + + +class DocumentUpsertRequest(ModelSimple): + """NOTE: This class is @generated using OpenAPI. + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + _data_store: Dict[str, Any] + _check_type: bool + + allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} + + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = { + ("value",): {"max_items": 1000, "min_items": 1} + } + + @cached_class_property + def additional_properties_type(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + return (bool, dict, float, int, list, str, none_type) # noqa: E501 + + _nullable = False + + @cached_class_property + def openapi_types(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return {"value": ([Dict[str, Any]],)} + + @cached_class_property + def discriminator(cls): + return None + + attribute_map: Dict[str, str] = {} + + read_only_vars: Set[str] = set() + + _composed_schemas = None + + required_properties = set( + [ + "_enforce_allowed_values", + "_enforce_validations", + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ] + ) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs) -> None: + """DocumentUpsertRequest - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([Dict[str, Any]]): An array of flat JSON documents to upsert. Each document must have an `_id` field.. # noqa: E501 + + Keyword Args: + value ([Dict[str, Any]]): An array of flat JSON documents to upsert. Each document must have an `_id` field.. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + value = None + if "value" in kwargs: + value = kwargs.pop("value") + + if value is None and args: + if len(args) == 1: + value = args[0] + elif len(args) > 1: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + if value is None: + raise PineconeApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) + _enforce_validations = kwargs.pop("_enforce_validations", True) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise PineconeApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % (kwargs, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: + """DocumentUpsertRequest - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] ([Dict[str, Any]]): An array of flat JSON documents to upsert. Each document must have an `_id` field. # noqa: E501 + + Keyword Args: + value ([Dict[str, Any]]): An array of flat JSON documents to upsert. Each document must have an `_id` field. # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + value = None + if "value" in kwargs: + value = kwargs.pop("value") + + if value is None and args: + if len(args) == 1: + value = args[0] + elif len(args) > 1: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + if value is None: + raise PineconeApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) + _enforce_validations = kwargs.pop("_enforce_validations", False) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise PineconeApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % (kwargs, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/pinecone/core/openapi/db_data/model/namespace_description_indexed_fields.py b/pinecone/core/openapi/db_data/model/document_upsert_response.py similarity index 95% rename from pinecone/core/openapi/db_data/model/namespace_description_indexed_fields.py rename to pinecone/core/openapi/db_data/model/document_upsert_response.py index 1272d78f9..aa52544ea 100644 --- a/pinecone/core/openapi/db_data/model/namespace_description_indexed_fields.py +++ b/pinecone/core/openapi/db_data/model/document_upsert_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -30,10 +30,10 @@ from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="NamespaceDescriptionIndexedFields") +T = TypeVar("T", bound="DocumentUpsertResponse") -class NamespaceDescriptionIndexedFields(ModelNormal): +class DocumentUpsertResponse(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -84,7 +84,7 @@ def openapi_types(cls): and the value is attribute type. """ return { - "fields": ([str],) # noqa: E501 + "upserted_count": (int,) # noqa: E501 } @cached_class_property @@ -92,7 +92,7 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "fields": "fields" # noqa: E501 + "upserted_count": "upsertedCount" # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -100,7 +100,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of NamespaceDescriptionIndexedFields. + """Create a new instance of DocumentUpsertResponse. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -113,7 +113,7 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 - """NamespaceDescriptionIndexedFields - a model defined in OpenAPI + """DocumentUpsertResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -146,7 +146,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - fields ([str]): [optional] # noqa: E501 + upserted_count (int): The number of documents upserted. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -203,7 +203,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs) -> None: # noqa: E501 - """NamespaceDescriptionIndexedFields - a model defined in OpenAPI + """DocumentUpsertResponse - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -236,7 +236,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - fields ([str]): [optional] # noqa: E501 + upserted_count (int): The number of documents upserted. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_data/model/fetch_by_metadata_request.py b/pinecone/core/openapi/db_data/model/fetch_by_metadata_request.py index 1f3a2ddef..9b25267e4 100644 --- a/pinecone/core/openapi/db_data/model/fetch_by_metadata_request.py +++ b/pinecone/core/openapi/db_data/model/fetch_by_metadata_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -154,7 +154,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - namespace (str): The namespace to fetch vectors from. [optional] # noqa: E501 + namespace (str): The namespace to fetch records from. [optional] # noqa: E501 filter (Dict[str, Any]): Metadata filter expression to select vectors. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). [optional] # noqa: E501 limit (int): Max number of vectors to return. [optional] if omitted the server will use the default value of 100. # noqa: E501 pagination_token (str): Pagination token to continue a previous listing operation. [optional] # noqa: E501 @@ -247,7 +247,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - namespace (str): The namespace to fetch vectors from. [optional] # noqa: E501 + namespace (str): The namespace to fetch records from. [optional] # noqa: E501 filter (Dict[str, Any]): Metadata filter expression to select vectors. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). [optional] # noqa: E501 limit (int): Max number of vectors to return. [optional] if omitted the server will use the default value of 100. # noqa: E501 pagination_token (str): Pagination token to continue a previous listing operation. [optional] # noqa: E501 diff --git a/pinecone/core/openapi/db_data/model/fetch_by_metadata_response.py b/pinecone/core/openapi/db_data/model/fetch_by_metadata_response.py index d7c2fbfb8..80c8c2358 100644 --- a/pinecone/core/openapi/db_data/model/fetch_by_metadata_response.py +++ b/pinecone/core/openapi/db_data/model/fetch_by_metadata_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,13 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.pagination import Pagination - from pinecone.core.openapi.db_data.model.usage import Usage - from pinecone.core.openapi.db_data.model.vector import Vector - def lazy_import(): from pinecone.core.openapi.db_data.model.pagination import Pagination diff --git a/pinecone/core/openapi/db_data/model/fetch_response.py b/pinecone/core/openapi/db_data/model/fetch_response.py index 72a4783a3..3d5c50233 100644 --- a/pinecone/core/openapi/db_data/model/fetch_response.py +++ b/pinecone/core/openapi/db_data/model/fetch_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.usage import Usage - from pinecone.core.openapi.db_data.model.vector import Vector - def lazy_import(): from pinecone.core.openapi.db_data.model.usage import Usage diff --git a/pinecone/core/openapi/db_control/model/backup_model_schema_fields.py b/pinecone/core/openapi/db_data/model/filter_expression.py similarity index 92% rename from pinecone/core/openapi/db_control/model/backup_model_schema_fields.py rename to pinecone/core/openapi/db_data/model/filter_expression.py index f95b7cb0f..5d5ce5cf6 100644 --- a/pinecone/core/openapi/db_control/model/backup_model_schema_fields.py +++ b/pinecone/core/openapi/db_data/model/filter_expression.py @@ -1,11 +1,11 @@ """ -Pinecone Control Plane API +Pinecone Data Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -30,10 +30,10 @@ from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="BackupModelSchemaFields") +T = TypeVar("T", bound="FilterExpression") -class BackupModelSchemaFields(ModelNormal): +class FilterExpression(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -84,7 +84,8 @@ def openapi_types(cls): and the value is attribute type. """ return { - "filterable": (bool,) # noqa: E501 + "_and": ([FilterExpression],), # noqa: E501 + "_or": ([FilterExpression],), # noqa: E501 } @cached_class_property @@ -92,7 +93,8 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "filterable": "filterable" # noqa: E501 + "_and": "$and", # noqa: E501 + "_or": "$or", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -100,7 +102,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of BackupModelSchemaFields. + """Create a new instance of FilterExpression. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -113,7 +115,7 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 - """BackupModelSchemaFields - a model defined in OpenAPI + """FilterExpression - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -146,7 +148,8 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - filterable (bool): Whether the field is filterable. If true, the field is indexed and can be used in filters. Only true values are allowed. [optional] # noqa: E501 + _and ([FilterExpression]): Logical AND of multiple filter expressions. [optional] # noqa: E501 + _or ([FilterExpression]): Logical OR of multiple filter expressions. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -203,7 +206,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs) -> None: # noqa: E501 - """BackupModelSchemaFields - a model defined in OpenAPI + """FilterExpression - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -236,7 +239,8 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - filterable (bool): Whether the field is filterable. If true, the field is indexed and can be used in filters. Only true values are allowed. [optional] # noqa: E501 + _and ([FilterExpression]): Logical AND of multiple filter expressions. [optional] # noqa: E501 + _or ([FilterExpression]): Logical OR of multiple filter expressions. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_data/model/hit.py b/pinecone/core/openapi/db_data/model/hit.py index 397d28f86..a4688c7bd 100644 --- a/pinecone/core/openapi/db_data/model/hit.py +++ b/pinecone/core/openapi/db_data/model/hit.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/import_error_mode.py b/pinecone/core/openapi/db_data/model/import_error_mode.py index a06e01640..70000cbfb 100644 --- a/pinecone/core/openapi/db_data/model/import_error_mode.py +++ b/pinecone/core/openapi/db_data/model/import_error_mode.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/import_model.py b/pinecone/core/openapi/db_data/model/import_model.py index 98333a825..ff8f7bf29 100644 --- a/pinecone/core/openapi/db_data/model/import_model.py +++ b/pinecone/core/openapi/db_data/model/import_model.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/index_description.py b/pinecone/core/openapi/db_data/model/index_description.py index 0dbc89bc0..865281944 100644 --- a/pinecone/core/openapi/db_data/model/index_description.py +++ b/pinecone/core/openapi/db_data/model/index_description.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.namespace_summary import NamespaceSummary - def lazy_import(): from pinecone.core.openapi.db_data.model.namespace_summary import NamespaceSummary diff --git a/pinecone/core/openapi/db_data/model/list_imports_response.py b/pinecone/core/openapi/db_data/model/list_imports_response.py index b3cc47177..d920d258e 100644 --- a/pinecone/core/openapi/db_data/model/list_imports_response.py +++ b/pinecone/core/openapi/db_data/model/list_imports_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.import_model import ImportModel - from pinecone.core.openapi.db_data.model.pagination import Pagination - def lazy_import(): from pinecone.core.openapi.db_data.model.import_model import ImportModel diff --git a/pinecone/core/openapi/db_data/model/list_item.py b/pinecone/core/openapi/db_data/model/list_item.py index 6fd00f857..d328edd64 100644 --- a/pinecone/core/openapi/db_data/model/list_item.py +++ b/pinecone/core/openapi/db_data/model/list_item.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/list_namespaces_response.py b/pinecone/core/openapi/db_data/model/list_namespaces_response.py index 54037cf65..2f890e6fe 100644 --- a/pinecone/core/openapi/db_data/model/list_namespaces_response.py +++ b/pinecone/core/openapi/db_data/model/list_namespaces_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.namespace_description import NamespaceDescription - from pinecone.core.openapi.db_data.model.pagination import Pagination - def lazy_import(): from pinecone.core.openapi.db_data.model.namespace_description import NamespaceDescription @@ -102,7 +96,6 @@ def openapi_types(cls): return { "namespaces": ([NamespaceDescription],), # noqa: E501 "pagination": (Pagination,), # noqa: E501 - "total_count": (int,), # noqa: E501 } @cached_class_property @@ -112,7 +105,6 @@ def discriminator(cls): attribute_map: Dict[str, str] = { "namespaces": "namespaces", # noqa: E501 "pagination": "pagination", # noqa: E501 - "total_count": "total_count", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -168,7 +160,6 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 _visited_composed_classes = (Animal,) namespaces ([NamespaceDescription]): The list of namespaces belonging to this index. [optional] # noqa: E501 pagination (Pagination): [optional] # noqa: E501 - total_count (int): The total number of namespaces in the index matching the prefix [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -260,7 +251,6 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 _visited_composed_classes = (Animal,) namespaces ([NamespaceDescription]): The list of namespaces belonging to this index. [optional] # noqa: E501 pagination (Pagination): [optional] # noqa: E501 - total_count (int): The total number of namespaces in the index matching the prefix [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_data/model/list_response.py b/pinecone/core/openapi/db_data/model/list_response.py index c599e9a0e..e0dd9988f 100644 --- a/pinecone/core/openapi/db_data/model/list_response.py +++ b/pinecone/core/openapi/db_data/model/list_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,13 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.list_item import ListItem - from pinecone.core.openapi.db_data.model.pagination import Pagination - from pinecone.core.openapi.db_data.model.usage import Usage - def lazy_import(): from pinecone.core.openapi.db_data.model.list_item import ListItem diff --git a/pinecone/core/openapi/db_data/model/namespace_description.py b/pinecone/core/openapi/db_data/model/namespace_description.py index f419983b0..b3dad75af 100644 --- a/pinecone/core/openapi/db_data/model/namespace_description.py +++ b/pinecone/core/openapi/db_data/model/namespace_description.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,27 +26,13 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.create_namespace_request_schema import ( - CreateNamespaceRequestSchema, - ) - from pinecone.core.openapi.db_data.model.namespace_description_indexed_fields import ( - NamespaceDescriptionIndexedFields, - ) - def lazy_import(): from pinecone.core.openapi.db_data.model.create_namespace_request_schema import ( CreateNamespaceRequestSchema, ) - from pinecone.core.openapi.db_data.model.namespace_description_indexed_fields import ( - NamespaceDescriptionIndexedFields, - ) globals()["CreateNamespaceRequestSchema"] = CreateNamespaceRequestSchema - globals()["NamespaceDescriptionIndexedFields"] = NamespaceDescriptionIndexedFields from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar @@ -111,7 +97,7 @@ def openapi_types(cls): "name": (str,), # noqa: E501 "record_count": (int,), # noqa: E501 "schema": (CreateNamespaceRequestSchema,), # noqa: E501 - "indexed_fields": (NamespaceDescriptionIndexedFields,), # noqa: E501 + "total_count": (int,), # noqa: E501 } @cached_class_property @@ -122,7 +108,7 @@ def discriminator(cls): "name": "name", # noqa: E501 "record_count": "record_count", # noqa: E501 "schema": "schema", # noqa: E501 - "indexed_fields": "indexed_fields", # noqa: E501 + "total_count": "total_count", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -179,7 +165,7 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 name (str): The name of the namespace. [optional] # noqa: E501 record_count (int): The total amount of records within the namespace. [optional] # noqa: E501 schema (CreateNamespaceRequestSchema): [optional] # noqa: E501 - indexed_fields (NamespaceDescriptionIndexedFields): [optional] # noqa: E501 + total_count (int): The total number of namespaces in the index matching the prefix [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -272,7 +258,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 name (str): The name of the namespace. [optional] # noqa: E501 record_count (int): The total amount of records within the namespace. [optional] # noqa: E501 schema (CreateNamespaceRequestSchema): [optional] # noqa: E501 - indexed_fields (NamespaceDescriptionIndexedFields): [optional] # noqa: E501 + total_count (int): The total number of namespaces in the index matching the prefix [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_data/model/namespace_summary.py b/pinecone/core/openapi/db_data/model/namespace_summary.py index a7f1ad9df..d6787f301 100644 --- a/pinecone/core/openapi/db_data/model/namespace_summary.py +++ b/pinecone/core/openapi/db_data/model/namespace_summary.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/pagination.py b/pinecone/core/openapi/db_data/model/pagination.py index 70492aca3..84181b343 100644 --- a/pinecone/core/openapi/db_data/model/pagination.py +++ b/pinecone/core/openapi/db_data/model/pagination.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/protobuf_any.py b/pinecone/core/openapi/db_data/model/protobuf_any.py index 20e694821..931234923 100644 --- a/pinecone/core/openapi/db_data/model/protobuf_any.py +++ b/pinecone/core/openapi/db_data/model/protobuf_any.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/query_request.py b/pinecone/core/openapi/db_data/model/query_request.py index 9d4cef11b..c013bf0e9 100644 --- a/pinecone/core/openapi/db_data/model/query_request.py +++ b/pinecone/core/openapi/db_data/model/query_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.query_vector import QueryVector - from pinecone.core.openapi.db_data.model.sparse_values import SparseValues - def lazy_import(): from pinecone.core.openapi.db_data.model.query_vector import QueryVector diff --git a/pinecone/core/openapi/db_data/model/query_response.py b/pinecone/core/openapi/db_data/model/query_response.py index e9f19c72d..ee99b1f2d 100644 --- a/pinecone/core/openapi/db_data/model/query_response.py +++ b/pinecone/core/openapi/db_data/model/query_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,13 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.scored_vector import ScoredVector - from pinecone.core.openapi.db_data.model.single_query_results import SingleQueryResults - from pinecone.core.openapi.db_data.model.usage import Usage - def lazy_import(): from pinecone.core.openapi.db_data.model.scored_vector import ScoredVector diff --git a/pinecone/core/openapi/db_data/model/query_vector.py b/pinecone/core/openapi/db_data/model/query_vector.py index d40d59736..45360e3da 100644 --- a/pinecone/core/openapi/db_data/model/query_vector.py +++ b/pinecone/core/openapi/db_data/model/query_vector.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.sparse_values import SparseValues - def lazy_import(): from pinecone.core.openapi.db_data.model.sparse_values import SparseValues diff --git a/pinecone/core/openapi/db_data/model/rpc_status.py b/pinecone/core/openapi/db_data/model/rpc_status.py index ef015f5d9..86199687a 100644 --- a/pinecone/core/openapi/db_data/model/rpc_status.py +++ b/pinecone/core/openapi/db_data/model/rpc_status.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.protobuf_any import ProtobufAny - def lazy_import(): from pinecone.core.openapi.db_data.model.protobuf_any import ProtobufAny diff --git a/pinecone/core/openapi/db_control/model/index_spec.py b/pinecone/core/openapi/db_data/model/score_by_query.py similarity index 83% rename from pinecone/core/openapi/db_control/model/index_spec.py rename to pinecone/core/openapi/db_data/model/score_by_query.py index 44de6215d..6aa8df909 100644 --- a/pinecone/core/openapi/db_control/model/index_spec.py +++ b/pinecone/core/openapi/db_data/model/score_by_query.py @@ -1,11 +1,11 @@ """ -Pinecone Control Plane API +Pinecone Data Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,40 +26,24 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.byoc import BYOC - from pinecone.core.openapi.db_control.model.byoc_spec import ByocSpec - from pinecone.core.openapi.db_control.model.pod_based import PodBased - from pinecone.core.openapi.db_control.model.pod_spec import PodSpec - from pinecone.core.openapi.db_control.model.serverless import Serverless - from pinecone.core.openapi.db_control.model.serverless_spec import ServerlessSpec - def lazy_import(): - from pinecone.core.openapi.db_control.model.byoc import BYOC - from pinecone.core.openapi.db_control.model.byoc_spec import ByocSpec - from pinecone.core.openapi.db_control.model.pod_based import PodBased - from pinecone.core.openapi.db_control.model.pod_spec import PodSpec - from pinecone.core.openapi.db_control.model.serverless import Serverless - from pinecone.core.openapi.db_control.model.serverless_spec import ServerlessSpec + from pinecone.core.openapi.db_data.model.sparse_values import SparseValues + from pinecone.core.openapi.db_data.model.text_query import TextQuery + from pinecone.core.openapi.db_data.model.vector_query import VectorQuery - globals()["BYOC"] = BYOC - globals()["ByocSpec"] = ByocSpec - globals()["PodBased"] = PodBased - globals()["PodSpec"] = PodSpec - globals()["Serverless"] = Serverless - globals()["ServerlessSpec"] = ServerlessSpec + globals()["SparseValues"] = SparseValues + globals()["TextQuery"] = TextQuery + globals()["VectorQuery"] = VectorQuery from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="IndexSpec") +T = TypeVar("T", bound="ScoreByQuery") -class IndexSpec(ModelComposed): +class ScoreByQuery(ModelComposed): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -112,19 +96,32 @@ def openapi_types(cls): """ lazy_import() return { - "serverless": (ServerlessSpec,), # noqa: E501 - "pod": (PodSpec,), # noqa: E501 - "byoc": (ByocSpec,), # noqa: E501 + "type": (str,), # noqa: E501 + "values": ([float],), # noqa: E501 + "sparse_values": (SparseValues,), # noqa: E501 + "field": (str,), # noqa: E501 + "text_query": (str,), # noqa: E501 } @cached_class_property def discriminator(cls): - return None + lazy_import() + val = { + "TextQuery": TextQuery, + "VectorQuery": VectorQuery, + "text": TextQuery, + "vector": VectorQuery, + } + if not val: + return None + return {"type": val} attribute_map: Dict[str, str] = { - "serverless": "serverless", # noqa: E501 - "pod": "pod", # noqa: E501 - "byoc": "byoc", # noqa: E501 + "type": "type", # noqa: E501 + "values": "values", # noqa: E501 + "sparse_values": "sparse_values", # noqa: E501 + "field": "field", # noqa: E501 + "text_query": "text_query", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -132,9 +129,10 @@ def discriminator(cls): @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 - """IndexSpec - a model defined in OpenAPI + """ScoreByQuery - a model defined in OpenAPI Keyword Args: + type (str): The query type. Must be the string value `\"vector\"`. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -165,9 +163,10 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - serverless (ServerlessSpec): [optional] # noqa: E501 - pod (PodSpec): [optional] # noqa: E501 - byoc (ByocSpec): [optional] # noqa: E501 + values ([float]): Dense vector values for the query. Required if `sparse_values` is not provided. Mutually exclusive with `sparse_values`. [optional] # noqa: E501 + sparse_values (SparseValues): [optional] # noqa: E501 + field (str): The vector field to search. [optional] # noqa: E501 + text_query (str): The text query string. Supports multiple terms and quoted phrases. Terms are combined with OR logic. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -237,9 +236,10 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 @convert_js_args_to_python_args def __init__(self, *args, **kwargs) -> None: # noqa: E501 - """IndexSpec - a model defined in OpenAPI + """ScoreByQuery - a model defined in OpenAPI Keyword Args: + type (str): The query type. Must be the string value `\"vector\"`. _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -270,9 +270,10 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - serverless (ServerlessSpec): [optional] # noqa: E501 - pod (PodSpec): [optional] # noqa: E501 - byoc (ByocSpec): [optional] # noqa: E501 + values ([float]): Dense vector values for the query. Required if `sparse_values` is not provided. Mutually exclusive with `sparse_values`. [optional] # noqa: E501 + sparse_values (SparseValues): [optional] # noqa: E501 + field (str): The vector field to search. [optional] # noqa: E501 + text_query (str): The text query string. Supports multiple terms and quoted phrases. Terms are combined with OR logic. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -330,7 +331,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 ) @cached_property - def _composed_schemas(): + def _composed_schemas(): # type: ignore # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run # when we invoke this method. If we kept this at the class @@ -339,4 +340,4 @@ def _composed_schemas(): # classes don't exist yet because their module has not finished # loading lazy_import() - return {"anyOf": [], "allOf": [], "oneOf": [BYOC, PodBased, Serverless]} + return {"anyOf": [], "allOf": [], "oneOf": [TextQuery, VectorQuery]} diff --git a/pinecone/core/openapi/db_data/model/scored_vector.py b/pinecone/core/openapi/db_data/model/scored_vector.py index 2c664318c..96e92073c 100644 --- a/pinecone/core/openapi/db_data/model/scored_vector.py +++ b/pinecone/core/openapi/db_data/model/scored_vector.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.sparse_values import SparseValues - def lazy_import(): from pinecone.core.openapi.db_data.model.sparse_values import SparseValues diff --git a/pinecone/core/openapi/db_data/model/search_match_terms.py b/pinecone/core/openapi/db_data/model/search_match_terms.py index 605b2093a..6c052186f 100644 --- a/pinecone/core/openapi/db_data/model/search_match_terms.py +++ b/pinecone/core/openapi/db_data/model/search_match_terms.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/search_records_request.py b/pinecone/core/openapi/db_data/model/search_records_request.py index 9505a80dc..8eb0d6812 100644 --- a/pinecone/core/openapi/db_data/model/search_records_request.py +++ b/pinecone/core/openapi/db_data/model/search_records_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,16 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.search_records_request_query import ( - SearchRecordsRequestQuery, - ) - from pinecone.core.openapi.db_data.model.search_records_request_rerank import ( - SearchRecordsRequestRerank, - ) - def lazy_import(): from pinecone.core.openapi.db_data.model.search_records_request_query import ( diff --git a/pinecone/core/openapi/db_data/model/search_records_request_query.py b/pinecone/core/openapi/db_data/model/search_records_request_query.py index b77aedf85..4e24f05dd 100644 --- a/pinecone/core/openapi/db_data/model/search_records_request_query.py +++ b/pinecone/core/openapi/db_data/model/search_records_request_query.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.search_match_terms import SearchMatchTerms - from pinecone.core.openapi.db_data.model.search_records_vector import SearchRecordsVector - def lazy_import(): from pinecone.core.openapi.db_data.model.search_match_terms import SearchMatchTerms diff --git a/pinecone/core/openapi/db_data/model/search_records_request_rerank.py b/pinecone/core/openapi/db_data/model/search_records_request_rerank.py index 81cd31a1d..b6154997a 100644 --- a/pinecone/core/openapi/db_data/model/search_records_request_rerank.py +++ b/pinecone/core/openapi/db_data/model/search_records_request_rerank.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/search_records_response.py b/pinecone/core/openapi/db_data/model/search_records_response.py index c5ea7524a..c0c8b91e8 100644 --- a/pinecone/core/openapi/db_data/model/search_records_response.py +++ b/pinecone/core/openapi/db_data/model/search_records_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,14 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.search_records_response_result import ( - SearchRecordsResponseResult, - ) - from pinecone.core.openapi.db_data.model.search_usage import SearchUsage - def lazy_import(): from pinecone.core.openapi.db_data.model.search_records_response_result import ( diff --git a/pinecone/core/openapi/db_data/model/search_records_response_result.py b/pinecone/core/openapi/db_data/model/search_records_response_result.py index 0407075ef..98a65c16e 100644 --- a/pinecone/core/openapi/db_data/model/search_records_response_result.py +++ b/pinecone/core/openapi/db_data/model/search_records_response_result.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.hit import Hit - def lazy_import(): from pinecone.core.openapi.db_data.model.hit import Hit diff --git a/pinecone/core/openapi/db_data/model/search_records_vector.py b/pinecone/core/openapi/db_data/model/search_records_vector.py index 09729daef..518cef3a4 100644 --- a/pinecone/core/openapi/db_data/model/search_records_vector.py +++ b/pinecone/core/openapi/db_data/model/search_records_vector.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.vector_values import VectorValues - def lazy_import(): from pinecone.core.openapi.db_data.model.vector_values import VectorValues diff --git a/pinecone/core/openapi/db_data/model/search_usage.py b/pinecone/core/openapi/db_data/model/search_usage.py index 2de18f899..10bab836e 100644 --- a/pinecone/core/openapi/db_data/model/search_usage.py +++ b/pinecone/core/openapi/db_data/model/search_usage.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/single_query_results.py b/pinecone/core/openapi/db_data/model/single_query_results.py index 1dbf183b1..ee73abefa 100644 --- a/pinecone/core/openapi/db_data/model/single_query_results.py +++ b/pinecone/core/openapi/db_data/model/single_query_results.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.scored_vector import ScoredVector - def lazy_import(): from pinecone.core.openapi.db_data.model.scored_vector import ScoredVector diff --git a/pinecone/core/openapi/db_data/model/sparse_values.py b/pinecone/core/openapi/db_data/model/sparse_values.py index 541e3e18a..d7ecee091 100644 --- a/pinecone/core/openapi/db_data/model/sparse_values.py +++ b/pinecone/core/openapi/db_data/model/sparse_values.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/start_import_request.py b/pinecone/core/openapi/db_data/model/start_import_request.py index 28ab505d8..6c6f24a9d 100644 --- a/pinecone/core/openapi/db_data/model/start_import_request.py +++ b/pinecone/core/openapi/db_data/model/start_import_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.import_error_mode import ImportErrorMode - def lazy_import(): from pinecone.core.openapi.db_data.model.import_error_mode import ImportErrorMode diff --git a/pinecone/core/openapi/db_data/model/start_import_response.py b/pinecone/core/openapi/db_data/model/start_import_response.py index 3e3115b07..37dfeedf1 100644 --- a/pinecone/core/openapi/db_data/model/start_import_response.py +++ b/pinecone/core/openapi/db_data/model/start_import_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_control/model/byoc_spec.py b/pinecone/core/openapi/db_data/model/text_query.py similarity index 89% rename from pinecone/core/openapi/db_control/model/byoc_spec.py rename to pinecone/core/openapi/db_data/model/text_query.py index 9eaae678a..9f7adaa99 100644 --- a/pinecone/core/openapi/db_control/model/byoc_spec.py +++ b/pinecone/core/openapi/db_data/model/text_query.py @@ -1,11 +1,11 @@ """ -Pinecone Control Plane API +Pinecone Data Plane API Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,25 +26,14 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - - -def lazy_import(): - from pinecone.core.openapi.db_control.model.backup_model_schema import BackupModelSchema - - globals()["BackupModelSchema"] = BackupModelSchema - from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property -T = TypeVar("T", bound="ByocSpec") +T = TypeVar("T", bound="TextQuery") -class ByocSpec(ModelNormal): +class TextQuery(ModelNormal): """NOTE: This class is @generated using OpenAPI. Do not edit the class manually. @@ -80,7 +69,6 @@ def additional_properties_type(cls): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - lazy_import() return (bool, dict, float, int, list, str, none_type) # noqa: E501 _nullable = False @@ -95,10 +83,10 @@ def openapi_types(cls): openapi_types (dict): The key is attribute name and the value is attribute type. """ - lazy_import() return { - "environment": (str,), # noqa: E501 - "schema": (BackupModelSchema,), # noqa: E501 + "type": (str,), # noqa: E501 + "field": (str,), # noqa: E501 + "text_query": (str,), # noqa: E501 } @cached_class_property @@ -106,8 +94,9 @@ def discriminator(cls): return None attribute_map: Dict[str, str] = { - "environment": "environment", # noqa: E501 - "schema": "schema", # noqa: E501 + "type": "type", # noqa: E501 + "field": "field", # noqa: E501 + "text_query": "text_query", # noqa: E501 } read_only_vars: Set[str] = set([]) @@ -115,7 +104,7 @@ def discriminator(cls): _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: - """Create a new instance of ByocSpec. + """Create a new instance of TextQuery. This method is overridden to provide proper type inference for mypy. The actual instance creation logic (including discriminator handling) @@ -127,11 +116,13 @@ def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa: E501 - """ByocSpec - a model defined in OpenAPI + def _from_openapi_data(cls: Type[T], type, field, text_query, *args, **kwargs) -> T: # noqa: E501 + """TextQuery - a model defined in OpenAPI Args: - environment (str): The environment where the index is hosted. + type (str): The query type. Must be the string value `\"text\"`. + field (str): The text field to search. + text_query (str): The text query string. Supports multiple terms and quoted phrases. Terms are combined with OR logic. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -164,7 +155,6 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - schema (BackupModelSchema): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -194,7 +184,9 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.environment = environment + self.type = type + self.field = field + self.text_query = text_query for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map @@ -221,11 +213,13 @@ def _from_openapi_data(cls: Type[T], environment, *args, **kwargs) -> T: # noqa ) @convert_js_args_to_python_args - def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 - """ByocSpec - a model defined in OpenAPI + def __init__(self, type, field, text_query, *args, **kwargs) -> None: # noqa: E501 + """TextQuery - a model defined in OpenAPI Args: - environment (str): The environment where the index is hosted. + type (str): The query type. Must be the string value `\"text\"`. + field (str): The text field to search. + text_query (str): The text query string. Supports multiple terms and quoted phrases. Terms are combined with OR logic. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -258,7 +252,6 @@ def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - schema (BackupModelSchema): [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) @@ -286,7 +279,9 @@ def __init__(self, environment, *args, **kwargs) -> None: # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.environment = environment + self.type = type + self.field = field + self.text_query = text_query for var_name, var_value in kwargs.items(): if ( var_name not in self.attribute_map diff --git a/pinecone/core/openapi/db_data/model/update_request.py b/pinecone/core/openapi/db_data/model/update_request.py index 79ff7c599..a38e1bc34 100644 --- a/pinecone/core/openapi/db_data/model/update_request.py +++ b/pinecone/core/openapi/db_data/model/update_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.sparse_values import SparseValues - def lazy_import(): from pinecone.core.openapi.db_data.model.sparse_values import SparseValues @@ -177,8 +172,8 @@ def _from_openapi_data(cls: Type[T], *args, **kwargs) -> T: # noqa: E501 id (str): Vector's unique id. [optional] # noqa: E501 values ([float]): Vector data. [optional] # noqa: E501 sparse_values (SparseValues): [optional] # noqa: E501 - set_metadata (Dict[str, Any]): Metadata to set for the vector. [optional] # noqa: E501 - namespace (str): The namespace containing the vector to update. [optional] # noqa: E501 + set_metadata (Dict[str, Any]): Metadata to set for the record. [optional] # noqa: E501 + namespace (str): The namespace containing the record to update. [optional] # noqa: E501 filter (Dict[str, Any]): A metadata filter expression. When updating metadata across records in a namespace, the update is applied to all records that match the filter. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). [optional] # noqa: E501 dry_run (bool): If `true`, return the number of records that match the `filter`, but do not execute the update. Default is `false`. [optional] if omitted the server will use the default value of False. # noqa: E501 """ @@ -273,8 +268,8 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 id (str): Vector's unique id. [optional] # noqa: E501 values ([float]): Vector data. [optional] # noqa: E501 sparse_values (SparseValues): [optional] # noqa: E501 - set_metadata (Dict[str, Any]): Metadata to set for the vector. [optional] # noqa: E501 - namespace (str): The namespace containing the vector to update. [optional] # noqa: E501 + set_metadata (Dict[str, Any]): Metadata to set for the record. [optional] # noqa: E501 + namespace (str): The namespace containing the record to update. [optional] # noqa: E501 filter (Dict[str, Any]): A metadata filter expression. When updating metadata across records in a namespace, the update is applied to all records that match the filter. See [Understanding metadata](https://docs.pinecone.io/guides/index-data/indexing-overview#metadata). [optional] # noqa: E501 dry_run (bool): If `true`, return the number of records that match the `filter`, but do not execute the update. Default is `false`. [optional] if omitted the server will use the default value of False. # noqa: E501 """ diff --git a/pinecone/core/openapi/db_data/model/update_response.py b/pinecone/core/openapi/db_data/model/update_response.py index 61c8d6674..3716c3343 100644 --- a/pinecone/core/openapi/db_data/model/update_response.py +++ b/pinecone/core/openapi/db_data/model/update_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/upsert_record.py b/pinecone/core/openapi/db_data/model/upsert_record.py index 62e9322d3..ad5928815 100644 --- a/pinecone/core/openapi/db_data/model/upsert_record.py +++ b/pinecone/core/openapi/db_data/model/upsert_record.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/upsert_request.py b/pinecone/core/openapi/db_data/model/upsert_request.py index 94739ac6f..fb831eca5 100644 --- a/pinecone/core/openapi/db_data/model/upsert_request.py +++ b/pinecone/core/openapi/db_data/model/upsert_request.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.vector import Vector - def lazy_import(): from pinecone.core.openapi.db_data.model.vector import Vector @@ -164,7 +159,7 @@ def _from_openapi_data(cls: Type[T], vectors, *args, **kwargs) -> T: # noqa: E5 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - namespace (str): The namespace where you upsert vectors. [optional] # noqa: E501 + namespace (str): The namespace where you upsert records. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) @@ -258,7 +253,7 @@ def __init__(self, vectors, *args, **kwargs) -> None: # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - namespace (str): The namespace where you upsert vectors. [optional] # noqa: E501 + namespace (str): The namespace where you upsert records. [optional] # noqa: E501 """ _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) diff --git a/pinecone/core/openapi/db_data/model/upsert_response.py b/pinecone/core/openapi/db_data/model/upsert_response.py index 0e2c7c4ac..ad25574d0 100644 --- a/pinecone/core/openapi/db_data/model/upsert_response.py +++ b/pinecone/core/openapi/db_data/model/upsert_response.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/usage.py b/pinecone/core/openapi/db_data/model/usage.py index a8c04bc45..1961bcc42 100644 --- a/pinecone/core/openapi/db_data/model/usage.py +++ b/pinecone/core/openapi/db_data/model/usage.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/model/vector.py b/pinecone/core/openapi/db_data/model/vector.py index 453552b09..a2291e628 100644 --- a/pinecone/core/openapi/db_data/model/vector.py +++ b/pinecone/core/openapi/db_data/model/vector.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.db_data.model.sparse_values import SparseValues - def lazy_import(): from pinecone.core.openapi.db_data.model.sparse_values import SparseValues diff --git a/pinecone/core/openapi/db_data/model/vector_query.py b/pinecone/core/openapi/db_data/model/vector_query.py new file mode 100644 index 000000000..2141a15f9 --- /dev/null +++ b/pinecone/core/openapi/db_data/model/vector_query.py @@ -0,0 +1,309 @@ +""" +Pinecone Data Plane API + +Pinecone is a vector database that makes it easy to search and retrieve billions of high-dimensional vectors. # noqa: E501 + +This file is @generated using OpenAPI. + +The version of the OpenAPI document: 2026-01.alpha +Contact: support@pinecone.io +""" + +from pinecone.openapi_support.model_utils import ( # noqa: F401 + PineconeApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + OpenApiModel, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, +) +from pinecone.openapi_support.exceptions import PineconeApiAttributeError + + +def lazy_import(): + from pinecone.core.openapi.db_data.model.sparse_values import SparseValues + + globals()["SparseValues"] = SparseValues + + +from typing import Dict, Literal, Tuple, Set, Any, Type, TypeVar +from pinecone.openapi_support import PropertyValidationTypedDict, cached_class_property + +T = TypeVar("T", bound="VectorQuery") + + +class VectorQuery(ModelNormal): + """NOTE: This class is @generated using OpenAPI. + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + _data_store: Dict[str, Any] + _check_type: bool + + allowed_values: Dict[Tuple[str, ...], Dict[str, Any]] = {} + + validations: Dict[Tuple[str, ...], PropertyValidationTypedDict] = {} + + @cached_class_property + def additional_properties_type(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + """ + lazy_import() + return (bool, dict, float, int, list, str, none_type) # noqa: E501 + + _nullable = False + + @cached_class_property + def openapi_types(cls): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + lazy_import() + return { + "type": (str,), # noqa: E501 + "field": (str,), # noqa: E501 + "values": ([float],), # noqa: E501 + "sparse_values": (SparseValues,), # noqa: E501 + } + + @cached_class_property + def discriminator(cls): + return None + + attribute_map: Dict[str, str] = { + "type": "type", # noqa: E501 + "field": "field", # noqa: E501 + "values": "values", # noqa: E501 + "sparse_values": "sparse_values", # noqa: E501 + } + + read_only_vars: Set[str] = set([]) + + _composed_schemas: Dict[Literal["allOf", "oneOf", "anyOf"], Any] = {} + + def __new__(cls: Type[T], *args: Any, **kwargs: Any) -> T: + """Create a new instance of VectorQuery. + + This method is overridden to provide proper type inference for mypy. + The actual instance creation logic (including discriminator handling) + is handled by the parent class's __new__ method. + """ + # Call parent's __new__ with all arguments to preserve discriminator logic + instance: T = super().__new__(cls, *args, **kwargs) + return instance + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls: Type[T], type, field, *args, **kwargs) -> T: # noqa: E501 + """VectorQuery - a model defined in OpenAPI + + Args: + type (str): The query type. Must be the string value `\"vector\"`. + field (str): The vector field to search. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + values ([float]): Dense vector values for the query. Required if `sparse_values` is not provided. Mutually exclusive with `sparse_values`. [optional] # noqa: E501 + sparse_values (SparseValues): [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", False) + _enforce_validations = kwargs.pop("_enforce_validations", False) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.field = field + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + return self + + required_properties = set( + [ + "_enforce_allowed_values", + "_enforce_validations", + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ] + ) + + @convert_js_args_to_python_args + def __init__(self, type, field, *args, **kwargs) -> None: # noqa: E501 + """VectorQuery - a model defined in OpenAPI + + Args: + type (str): The query type. Must be the string value `\"vector\"`. + field (str): The vector field to search. + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + values ([float]): Dense vector values for the query. Required if `sparse_values` is not provided. Mutually exclusive with `sparse_values`. [optional] # noqa: E501 + sparse_values (SparseValues): [optional] # noqa: E501 + """ + + _enforce_allowed_values = kwargs.pop("_enforce_allowed_values", True) + _enforce_validations = kwargs.pop("_enforce_validations", True) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise PineconeApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % (args, self.__class__.__name__), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._enforce_allowed_values = _enforce_allowed_values + self._enforce_validations = _enforce_validations + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.type = type + self.field = field + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): + # discard variable. + continue + setattr(self, var_name, var_value) + if var_name in self.read_only_vars: + raise PineconeApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes." + ) diff --git a/pinecone/core/openapi/db_data/model/vector_values.py b/pinecone/core/openapi/db_data/model/vector_values.py index 0175fda4c..6cd392b19 100644 --- a/pinecone/core/openapi/db_data/model/vector_values.py +++ b/pinecone/core/openapi/db_data/model/vector_values.py @@ -5,7 +5,7 @@ This file is @generated using OpenAPI. -The version of the OpenAPI document: 2025-10 +The version of the OpenAPI document: 2026-01.alpha Contact: support@pinecone.io """ diff --git a/pinecone/core/openapi/db_data/models/__init__.py b/pinecone/core/openapi/db_data/models/__init__.py index e3b28075a..c06d36ad2 100644 --- a/pinecone/core/openapi/db_data/models/__init__.py +++ b/pinecone/core/openapi/db_data/models/__init__.py @@ -20,9 +20,15 @@ from pinecone.core.openapi.db_data.model.describe_index_stats_request import ( DescribeIndexStatsRequest, ) +from pinecone.core.openapi.db_data.model.document import Document +from pinecone.core.openapi.db_data.model.document_search_request import DocumentSearchRequest +from pinecone.core.openapi.db_data.model.document_search_response import DocumentSearchResponse +from pinecone.core.openapi.db_data.model.document_upsert_request import DocumentUpsertRequest +from pinecone.core.openapi.db_data.model.document_upsert_response import DocumentUpsertResponse from pinecone.core.openapi.db_data.model.fetch_by_metadata_request import FetchByMetadataRequest from pinecone.core.openapi.db_data.model.fetch_by_metadata_response import FetchByMetadataResponse from pinecone.core.openapi.db_data.model.fetch_response import FetchResponse +from pinecone.core.openapi.db_data.model.filter_expression import FilterExpression from pinecone.core.openapi.db_data.model.hit import Hit from pinecone.core.openapi.db_data.model.import_error_mode import ImportErrorMode from pinecone.core.openapi.db_data.model.import_model import ImportModel @@ -32,9 +38,6 @@ from pinecone.core.openapi.db_data.model.list_namespaces_response import ListNamespacesResponse from pinecone.core.openapi.db_data.model.list_response import ListResponse from pinecone.core.openapi.db_data.model.namespace_description import NamespaceDescription -from pinecone.core.openapi.db_data.model.namespace_description_indexed_fields import ( - NamespaceDescriptionIndexedFields, -) from pinecone.core.openapi.db_data.model.namespace_summary import NamespaceSummary from pinecone.core.openapi.db_data.model.pagination import Pagination from pinecone.core.openapi.db_data.model.protobuf_any import ProtobufAny @@ -42,6 +45,7 @@ from pinecone.core.openapi.db_data.model.query_response import QueryResponse from pinecone.core.openapi.db_data.model.query_vector import QueryVector from pinecone.core.openapi.db_data.model.rpc_status import RpcStatus +from pinecone.core.openapi.db_data.model.score_by_query import ScoreByQuery from pinecone.core.openapi.db_data.model.scored_vector import ScoredVector from pinecone.core.openapi.db_data.model.search_match_terms import SearchMatchTerms from pinecone.core.openapi.db_data.model.search_records_request import SearchRecordsRequest @@ -61,6 +65,7 @@ from pinecone.core.openapi.db_data.model.sparse_values import SparseValues from pinecone.core.openapi.db_data.model.start_import_request import StartImportRequest from pinecone.core.openapi.db_data.model.start_import_response import StartImportResponse +from pinecone.core.openapi.db_data.model.text_query import TextQuery from pinecone.core.openapi.db_data.model.update_request import UpdateRequest from pinecone.core.openapi.db_data.model.update_response import UpdateResponse from pinecone.core.openapi.db_data.model.upsert_record import UpsertRecord @@ -68,4 +73,5 @@ from pinecone.core.openapi.db_data.model.upsert_response import UpsertResponse from pinecone.core.openapi.db_data.model.usage import Usage from pinecone.core.openapi.db_data.model.vector import Vector +from pinecone.core.openapi.db_data.model.vector_query import VectorQuery from pinecone.core.openapi.db_data.model.vector_values import VectorValues diff --git a/pinecone/core/openapi/inference/api/inference_api.py b/pinecone/core/openapi/inference/api/inference_api.py index 1e38938f8..c5f38f126 100644 --- a/pinecone/core/openapi/inference/api/inference_api.py +++ b/pinecone/core/openapi/inference/api/inference_api.py @@ -11,7 +11,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -89,9 +89,7 @@ def __embed( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - EmbeddingsList | ApplyResult[EmbeddingsList], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.embed = _Endpoint( settings={ @@ -170,7 +168,7 @@ def __get_model( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["model_name"] = model_name - return cast(ModelInfo | ApplyResult[ModelInfo], self.call_with_http_info(**kwargs)) + return self.call_with_http_info(**kwargs) self.get_model = _Endpoint( settings={ @@ -246,9 +244,7 @@ def __list_models( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - ModelInfoList | ApplyResult[ModelInfoList], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.list_models = _Endpoint( settings={ @@ -332,9 +328,7 @@ def __rerank( """ kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast( - RerankResult | ApplyResult[RerankResult], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.rerank = _Endpoint( settings={ @@ -412,7 +406,7 @@ async def __embed(self, x_pinecone_api_version="2025-10", **kwargs) -> Embedding """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(EmbeddingsList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.embed = _AsyncioEndpoint( settings={ @@ -481,7 +475,7 @@ async def __get_model( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["model_name"] = model_name - return cast(ModelInfo, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.get_model = _AsyncioEndpoint( settings={ @@ -548,7 +542,7 @@ async def __list_models(self, x_pinecone_api_version="2025-10", **kwargs) -> Mod """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(ModelInfoList, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.list_models = _AsyncioEndpoint( settings={ @@ -623,7 +617,7 @@ async def __rerank(self, x_pinecone_api_version="2025-10", **kwargs) -> RerankRe """ self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version - return cast(RerankResult, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.rerank = _AsyncioEndpoint( settings={ diff --git a/pinecone/core/openapi/inference/model/embed_request.py b/pinecone/core/openapi/inference/model/embed_request.py index aa74684c9..0f7151bd4 100644 --- a/pinecone/core/openapi/inference/model/embed_request.py +++ b/pinecone/core/openapi/inference/model/embed_request.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.embed_request_inputs import EmbedRequestInputs - def lazy_import(): from pinecone.core.openapi.inference.model.embed_request_inputs import EmbedRequestInputs diff --git a/pinecone/core/openapi/inference/model/embedding.py b/pinecone/core/openapi/inference/model/embedding.py index 5e6ee1be5..d6cf5556a 100644 --- a/pinecone/core/openapi/inference/model/embedding.py +++ b/pinecone/core/openapi/inference/model/embedding.py @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.dense_embedding import DenseEmbedding - from pinecone.core.openapi.inference.model.sparse_embedding import SparseEmbedding - def lazy_import(): from pinecone.core.openapi.inference.model.dense_embedding import DenseEmbedding @@ -335,7 +329,7 @@ def __init__(self, *args, **kwargs) -> None: # noqa: E501 ) @cached_property - def _composed_schemas(): + def _composed_schemas(): # type: ignore # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run # when we invoke this method. If we kept this at the class diff --git a/pinecone/core/openapi/inference/model/embeddings_list.py b/pinecone/core/openapi/inference/model/embeddings_list.py index a73535370..8c070520a 100644 --- a/pinecone/core/openapi/inference/model/embeddings_list.py +++ b/pinecone/core/openapi/inference/model/embeddings_list.py @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.embedding import Embedding - from pinecone.core.openapi.inference.model.embeddings_list_usage import EmbeddingsListUsage - def lazy_import(): from pinecone.core.openapi.inference.model.embedding import Embedding diff --git a/pinecone/core/openapi/inference/model/error_response.py b/pinecone/core/openapi/inference/model/error_response.py index 9ebabe1ad..7e9c1ac51 100644 --- a/pinecone/core/openapi/inference/model/error_response.py +++ b/pinecone/core/openapi/inference/model/error_response.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.error_response_error import ErrorResponseError - def lazy_import(): from pinecone.core.openapi.inference.model.error_response_error import ErrorResponseError diff --git a/pinecone/core/openapi/inference/model/model_info.py b/pinecone/core/openapi/inference/model/model_info.py index 387422d6c..6ac61498f 100644 --- a/pinecone/core/openapi/inference/model/model_info.py +++ b/pinecone/core/openapi/inference/model/model_info.py @@ -26,16 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.model_info_supported_metrics import ( - ModelInfoSupportedMetrics, - ) - from pinecone.core.openapi.inference.model.model_info_supported_parameter import ( - ModelInfoSupportedParameter, - ) - def lazy_import(): from pinecone.core.openapi.inference.model.model_info_supported_metrics import ( diff --git a/pinecone/core/openapi/inference/model/model_info_list.py b/pinecone/core/openapi/inference/model/model_info_list.py index 8452cf108..aa3461ed8 100644 --- a/pinecone/core/openapi/inference/model/model_info_list.py +++ b/pinecone/core/openapi/inference/model/model_info_list.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.model_info import ModelInfo - def lazy_import(): from pinecone.core.openapi.inference.model.model_info import ModelInfo diff --git a/pinecone/core/openapi/inference/model/ranked_document.py b/pinecone/core/openapi/inference/model/ranked_document.py index e9687b7ce..a5380e531 100644 --- a/pinecone/core/openapi/inference/model/ranked_document.py +++ b/pinecone/core/openapi/inference/model/ranked_document.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.document import Document - def lazy_import(): from pinecone.core.openapi.inference.model.document import Document diff --git a/pinecone/core/openapi/inference/model/rerank_request.py b/pinecone/core/openapi/inference/model/rerank_request.py index 60e7856a9..f62078ce5 100644 --- a/pinecone/core/openapi/inference/model/rerank_request.py +++ b/pinecone/core/openapi/inference/model/rerank_request.py @@ -26,11 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.document import Document - def lazy_import(): from pinecone.core.openapi.inference.model.document import Document diff --git a/pinecone/core/openapi/inference/model/rerank_result.py b/pinecone/core/openapi/inference/model/rerank_result.py index 5f90a2f0a..7cb4f5a57 100644 --- a/pinecone/core/openapi/inference/model/rerank_result.py +++ b/pinecone/core/openapi/inference/model/rerank_result.py @@ -26,12 +26,6 @@ ) from pinecone.openapi_support.exceptions import PineconeApiAttributeError -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from pinecone.core.openapi.inference.model.ranked_document import RankedDocument - from pinecone.core.openapi.inference.model.rerank_result_usage import RerankResultUsage - def lazy_import(): from pinecone.core.openapi.inference.model.ranked_document import RankedDocument diff --git a/pinecone/core/openapi/oauth/api/o_auth_api.py b/pinecone/core/openapi/oauth/api/o_auth_api.py index 018ebde5f..56860dd96 100644 --- a/pinecone/core/openapi/oauth/api/o_auth_api.py +++ b/pinecone/core/openapi/oauth/api/o_auth_api.py @@ -11,7 +11,7 @@ from __future__ import annotations -from typing import TYPE_CHECKING, Any, Dict, cast +from typing import TYPE_CHECKING from multiprocessing.pool import ApplyResult from pinecone.openapi_support import ApiClient, AsyncioApiClient @@ -89,9 +89,7 @@ def __get_token( kwargs = self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["token_request"] = token_request - return cast( - TokenResponse | ApplyResult[TokenResponse], self.call_with_http_info(**kwargs) - ) + return self.call_with_http_info(**kwargs) self.get_token = _Endpoint( settings={ @@ -175,7 +173,7 @@ async def __get_token( self._process_openapi_kwargs(kwargs) kwargs["x_pinecone_api_version"] = x_pinecone_api_version kwargs["token_request"] = token_request - return cast(TokenResponse, await self.call_with_http_info(**kwargs)) + return await self.call_with_http_info(**kwargs) self.get_token = _AsyncioEndpoint( settings={ diff --git a/pinecone/openapi_support/api_version.py b/pinecone/openapi_support/api_version.py index cc5b21d16..9961c746e 100644 --- a/pinecone/openapi_support/api_version.py +++ b/pinecone/openapi_support/api_version.py @@ -1,5 +1,7 @@ # This file is generated by codegen/build-oas.sh # Do not edit this file manually. +# For REST APIs, use the API_VERSION from each module's __init__.py +# This version is used by gRPC clients (data plane only) -API_VERSION = "2025-10" +API_VERSION = "2026-01.alpha" APIS_REPO_SHA = "d5ac93191def1d9666946d2c0e67edd3140b0f0d"