Skip to content

fix(sdk): expose retrieval controls consistently - #3715

Draft
ehz0ah wants to merge 1 commit into
volcengine:mainfrom
ehz0ah:fix/sdk-retrieval-contract-parity
Draft

fix(sdk): expose retrieval controls consistently#3715
ehz0ah wants to merge 1 commit into
volcengine:mainfrom
ehz0ah:fix/sdk-retrieval-contract-parity

Conversation

@ehz0ah

@ehz0ah ehz0ah commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Expose the retrieval controls already accepted by the OpenViking server through the standalone Python and TypeScript SDKs.

The standalone Python SDK now supports since, until, time_field, level, and include_provenance on both find and search. The TypeScript SDK now supports includeProvenance, serialized as include_provenance.

Human Involvement

  • A human participated in the implementation or review loop
  • This PR was generated entirely by AI agents without human participation in the loop

Related Issue

No single issue covers the cross-SDK parity gap. Go provenance parity remains owned by #2731 and is intentionally not changed here.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Add time, level, and provenance retrieval options to standalone Python async/sync clients.
  • Add includeProvenance to the TypeScript SDK and send the server's include_provenance field.
  • Cover exact populated and unset request bodies so optional controls do not change existing defaults.

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Commands:

PYTHONPATH=sdk/python .venv/bin/python -m pytest -o addopts='' -q sdk/python/tests/test_async_client_behaviors.py -k 'retrieval or find or search'
# 5 passed, 46 deselected

npm test
# 33 passed
npm run format:check
npm run typecheck
npm run build
npm run test:node-types
# all passed

ruff check sdk/python/openviking_sdk/client.py sdk/python/tests/test_async_client_behaviors.py
# passed
python -m compileall -q sdk/python/openviking_sdk sdk/python/tests/test_async_client_behaviors.py
# passed

ruff format --check reports pre-existing formatting differences elsewhere in the two touched Python files; this PR avoids unrelated whole-file formatting churn.

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Not applicable.

Additional Notes

The new Python parameters are appended to the existing signatures, preserving positional compatibility. Unset Python and TypeScript options are omitted from request bodies; explicit false remains representable for TypeScript provenance.

Add time, level, and provenance options to the standalone Python SDK and expose provenance in the TypeScript SDK while preserving existing defaults.
@ehz0ah
ehz0ah force-pushed the fix/sdk-retrieval-contract-parity branch from 875ddb6 to f73d92d Compare August 4, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant