Skip to content

feat: sync Python SDK with latest Hub API - #115

Open
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/update-api-20260908-150654
Open

feat: sync Python SDK with latest Hub API#115
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/update-api-20260908-150654

Conversation

@cursor

@cursor cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the Python SDK to match the latest Hub OpenAPI spec.

  • Add client.evaluations.upload and stop sending the removed include query on evaluation list/retrieve
  • Point evaluations.run_single at /v2/evaluations/run-interaction-checks
  • Document generate_completion as GenerateCompletionOutput and test_connection as a dict (already the v3.2.0 runtime types)
  • Add target_path to document-based dataset generation and scenario_id to result filters

Backward compatibility:

  • evaluations.retrieve / evaluations.list still accept include=["agent"|"dataset"] so existing callers do not TypeError; the argument is ignored with a DeprecationWarning because the Hub no longer returns included payloads
  • results.search still accepts filters["chat_test_case_id"] and maps it to scenario_id with a DeprecationWarning

Red team audits and datasets.preview_import are intentionally omitted: audits are still behind a feature flag, and import preview is not needed in the SDK yet.

Existing v3.2.0 aliases (prompt presets, dataset scenarios, rerun_scenario, generate_preset_based) are unchanged.

Test plan

  • uv run ruff check . --fix and uv run ruff format
  • uv run pytest — 579 passed (Prism tests remain disabled)
  • uv run pyright — 0 errors
  • uv run mypy . — no issues
Open in Web Open in Cursor 

Add red team audits, dataset import preview, and evaluation upload.
Drop evaluation include params, return dicts from test_connection, and
document generate_completion as GenerateCompletionOutput.
@henchaves
henchaves marked this pull request as ready for review September 8, 2026 15:21
Leave those Hub endpoints out of the SDK for now: red team audits are
still behind a feature flag, and dataset import preview is not needed.
Accept the removed include argument on evaluations.retrieve/list so
existing callers do not TypeError, and map filters chat_test_case_id
to scenario_id. Both emit a DeprecationWarning and are not sent as
removed API fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant