Skip to content

fix: honor IndexAsyncio config overrides#669

Open
pragnyanramtha wants to merge 1 commit into
pinecone-io:mainfrom
pragnyanramtha:codex/indexasyncio-ssl-overrides
Open

fix: honor IndexAsyncio config overrides#669
pragnyanramtha wants to merge 1 commit into
pinecone-io:mainfrom
pragnyanramtha:codex/indexasyncio-ssl-overrides

Conversation

@pragnyanramtha
Copy link
Copy Markdown

@pragnyanramtha pragnyanramtha commented May 17, 2026

Root cause

Pinecone.IndexAsyncio(...) and AsyncPinecone.IndexAsyncio(...) accepted **kwargs, but the compatibility factories ignored those values when constructing AsyncIndex. As a result, calls such as pc.IndexAsyncio(host=..., ssl_verify=False) still used the parent client's default ssl_verify=True, which blocks proxy/local setups that need certificate verification disabled.

Change

  • Build the AsyncIndex constructor kwargs from the parent client defaults and overlay explicit supported data-plane kwargs.
  • Reject unknown kwargs instead of silently ignoring them.
  • Add regression coverage for both sync and async compatibility factories forwarding ssl_verify=False.

Validation

  • uv sync --group dev --no-install-project
  • PYTHONPATH=. .venv/bin/python -m pytest tests/unit/test_pinecone_class.py::TestPineconeIndexAsyncioDelegate tests/unit/test_async_pinecone_backcompat.py -q (35 passed, 1 pytest config warning because pytest-timeout was not installed by the no-project source-tree run)
  • PYTHONPATH=. .venv/bin/python -m ruff check pinecone/_internal/indexes_helpers.py pinecone/_client.py pinecone/async_client/pinecone.py tests/unit/test_pinecone_class.py tests/unit/test_async_pinecone_backcompat.py
  • PYTHONPATH=. .venv/bin/python -m ruff format --check pinecone/_internal/indexes_helpers.py pinecone/_client.py pinecone/async_client/pinecone.py tests/unit/test_pinecone_class.py tests/unit/test_async_pinecone_backcompat.py
  • PYTHONPATH=. .venv/bin/python -m mypy --strict pinecone/_internal/indexes_helpers.py pinecone/_client.py pinecone/async_client/pinecone.py

Note: I initially tried uv run pytest ..., but stopped it after it spent roughly 12 minutes compiling the native Rust extension through maturin before reaching pytest. The final checks above run from the source tree to keep validation focused on this Python-only compatibility change.

Fixes #465.


Note

Medium Risk
Changes behavior of the IndexAsyncio backcompat factories to apply/validate kwargs, which could break callers that previously passed (and had ignored) unsupported parameters. Limited to client construction-time configuration, with added unit coverage for the new semantics.

Overview
Fixes the backcompat IndexAsyncio factories on both Pinecone and AsyncPinecone to actually honor explicit data-plane overrides (e.g. ssl_verify=False) instead of always using parent-client defaults.

Introduces apply_index_kwargs_overrides() in indexes_helpers to merge supported overrides and raise TypeError on unknown kwargs (rather than silently ignoring them), and adds regression tests covering override forwarding and unknown-kwarg rejection.

Reviewed by Cursor Bugbot for commit 86bee16. Bugbot is set up for automated code reviews on this repo. Configure here.

@pragnyanramtha pragnyanramtha marked this pull request as ready for review May 17, 2026 01:07
Copilot AI review requested due to automatic review settings May 17, 2026 01:07
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

[Bug] ssl_verify parameter for IndexAsyncio does not work

2 participants