Skip to content

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 request-building for index creation/configuration; type/model renames and new BYOC fields could cause subtle compatibility or serialization issues if downstream code relies on the old schema types.

Overview
Regenerates the OpenAPI client from the 2025-10 spec (and bumps the codegen target in Makefile), updating the embedded API repo SHA and refreshing generated docs/comments.

Adds BYOC parity with serverless for index configuration by supporting read_capacity and schema on ByocSpec and wiring both through PineconeDBControlRequestFactory (including shared __parse_schema handling for both direct field maps and {fields: ...} wrapper format).

Renames the OpenAPI model used for metadata indexing configuration from BackupModelSchema/BackupModelSchemaFields to MetadataSchema/MetadataSchemaFields across control-plane models and public SDK type hints, adds a generated ByocSpecResponse model, and updates unit tests to cover schema parsing and BYOC/serverless spec variants. Also includes dependency lockfile updates (e.g., aiohttp, urllib3, filelock, virtualenv) and a Ruff config tweak.

Written by Cursor Bugbot for commit 6525664. 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
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 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

else:
# If not a dict, create with default filterable=True
fields[field_name] = MetadataSchemaFields(filterable=True)
byoc_args["schema"] = MetadataSchema(fields=fields)
Copy link

Choose a reason for hiding this comment

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

Duplicated schema conversion bypasses existing __parse_schema helper

Low Severity

The new ByocSpec object schema handling (lines 358–371) duplicates the inline schema conversion logic from the ServerlessSpec object path (lines 316–328). Both could simply call __parse_schema(spec.schema), which already exists and is correctly used in the dict-based paths (lines 265 and 298) and in create_index_for_model_request (line 483). If __parse_schema is updated in the future, these inline copies won't benefit, creating a maintenance risk and inconsistency.

Additional Locations (1)

Fix in Cursor Fix in Web

raise PineconeApiAttributeError(
f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes."
)
Copy link

Choose a reason for hiding this comment

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

BYOC response deserialization missing read_capacity handling

High Severity

The PR adds read_capacity to ByocSpec and creates a new ByocSpecResponse model (typed with ReadCapacityResponse), but never updates the BYOC response deserialization in index_model.py. The serverless path uses ServerlessSpecResponse and manually deserializes nested read_capacity to work around "broken oneOf matching logic" in deserialize_model. The BYOC path still uses the request model ByocSpec (typed with ReadCapacity, not ReadCapacityResponse) and has no manual read_capacity handling. When a BYOC index with DRN is described or listed, read_capacity in the API response will likely fail to deserialize correctly.

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