Skip to content

Regenerate code from 2025-10, implement schema/read_capacity in BYOCSpec#614

Open
austin-denoble wants to merge 10 commits intomainfrom
adenoble/implement-byoc-metadata-and-drn
Open

Regenerate code from 2025-10, implement schema/read_capacity in BYOCSpec#614
austin-denoble wants to merge 10 commits intomainfrom
adenoble/implement-byoc-metadata-and-drn

Conversation

@austin-denoble
Copy link
Contributor

@austin-denoble austin-denoble commented Feb 11, 2026

Problem

When the Python client was released for 2025-10, the spec did not yet include BYOCSpec.read_capacity, so the ability to configure BYOC indexes with DRN is limited through the SDK.

Additionally, I noticed we never pulled in BYOCSpec.schema either, so that can be added in as well.

Solution

  • Regenerate core off of the 2025-10 spec to pull in most recent changes (make generate-oas). We shouldn't need to regenerate grpc for this as the changes are limited to BYOCSpec in the control plane.
  • Add support for schema and read_capacity to BYOCSpec, and make sure things are wired properly in request_factory.py.
  • Update references to BackupModelSchema to use MetadataSchema. This was due to an error in the spec wherein the MetadataSchema in the OpenAPI spec did not have an x-component-name. That was fixed here: https://github.com/pinecone-io/apis/pull/417. It's confusing to have BackupModelSchema used 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

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-10 spec (make generate-oas), including docstring tweaks and a new ByocSpecResponse model, plus minor API docs clarifications in vector operations.

Adds first-class BYOC support for read_capacity and metadata schema across the SDK: extends ByocSpec (and request building) to emit these fields, updates configure_index_request to target byoc vs serverless based on the described index, and improves IndexModel.spec parsing with shared read-capacity discriminator deserialization (and relaxed _check_type to avoid request/response model mismatches).

Renames/realigns the metadata schema models from BackupModelSchema* to MetadataSchema* 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’s target-version and a sparse-index error-message assertion.

Written by Cursor Bugbot for commit 12d28bb. This will update automatically on new commits. Configure here.


…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
…port configuring read_capacity on both serverless and byoc indexes, add some unit tests to cover logic
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant