Regenerate code from 2025-10, implement schema/read_capacity in BYOCSpec#614
Open
austin-denoble wants to merge 10 commits intomainfrom
Open
Regenerate code from 2025-10, implement schema/read_capacity in BYOCSpec#614austin-denoble wants to merge 10 commits intomainfrom
2025-10, implement schema/read_capacity in BYOCSpec#614austin-denoble wants to merge 10 commits intomainfrom
Conversation
…Schema to use MetadataSchema, add support for schema and read_capacity to BYOCSpec and make sure things are wired properly in request_factory.py
…ess and BYOC to remove duplication, fix bug when calling parse_non_empty_args for BYOC in __parse_index_spec, add unit tests to cover schema parsing logic
…deserializing spec in get_spec, update unit test to actually validate read_capacity
…xes, implement a unified helper for deserializing read_capacity generally and use in both places, add unit test fixture helpers for creating read_capacity, add unit tests to test_index_model.py
pinecone/core/openapi/db_control/model/read_capacity_dedicated_config.py
Show resolved
Hide resolved
…port configuring read_capacity on both serverless and byoc indexes, add some unit tests to cover logic
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| @classmethod | ||
| @convert_js_args_to_python_args | ||
| def _from_openapi_data(cls: Type[T], environment, read_capacity, *args, **kwargs) -> T: # noqa: E501 |
There was a problem hiding this comment.
BYOC response now requires read capacity
Medium Severity
ByocSpecResponse now requires read_capacity as a positional field, and IndexModel.spec always deserializes BYOC payloads into that model. If the API omits read_capacity for older or default BYOC indexes, deserialization fails and accessing IndexModel.spec raises instead of returning BYOC metadata.
Additional Locations (2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Problem
When the Python client was released for
2025-10, the spec did not yet includeBYOCSpec.read_capacity, so the ability to configure BYOC indexes with DRN is limited through the SDK.Additionally, I noticed we never pulled in
BYOCSpec.schemaeither, so that can be added in as well.Solution
2025-10spec to pull in most recent changes (make generate-oas). We shouldn't need to regenerate grpc for this as the changes are limited toBYOCSpecin the control plane.schemaandread_capacitytoBYOCSpec, and make sure things are wired properly inrequest_factory.py.BackupModelSchemato useMetadataSchema. This was due to an error in the spec wherein theMetadataSchemain the OpenAPI spec did not have anx-component-name. That was fixed here: https://github.com/pinecone-io/apis/pull/417. It's confusing to haveBackupModelSchemaused in all these areas that aren't backup-related.Also pulled in some dependency bumps based on dependabot alerts:
aiohttp(2.6.3)urllib3(3.13.3)filelock(3.21.0)virtualenv(20.31.1)Type of Change
Test Plan
CI - unit, integration, etc
Note
Medium Risk
Touches generated API models and core index spec (de)serialization paths, including BYOC/serverless read-capacity handling, which can affect request/response compatibility. Changes are covered by new unit/integration tests but regressions could surface in edge-case spec payloads.
Overview
Updates generated OpenAPI bindings to the latest
2025-10spec (make generate-oas), including docstring tweaks and a newByocSpecResponsemodel, plus minor API docs clarifications in vector operations.Adds first-class BYOC support for
read_capacityand metadataschemaacross the SDK: extendsByocSpec(and request building) to emit these fields, updatesconfigure_index_requestto targetbyocvsserverlessbased on the described index, and improvesIndexModel.specparsing with shared read-capacity discriminator deserialization (and relaxed_check_typeto avoid request/response model mismatches).Renames/realigns the metadata schema models from
BackupModelSchema*toMetadataSchema*throughout control-plane models, resources, and wrappers, and expands fixtures/unit+integration tests to cover BYOC/serverless read-capacity and schema parsing; also adjusts ruff’starget-versionand a sparse-index error-message assertion.Written by Cursor Bugbot for commit 12d28bb. This will update automatically on new commits. Configure here.