Skip to content

Sync structured research output parsing in Python SDK#74

Closed
Shedna wants to merge 2 commits into
mainfrom
cursor/platform-sdk-sync-python-20260527
Closed

Sync structured research output parsing in Python SDK#74
Shedna wants to merge 2 commits into
mainfrom
cursor/platform-sdk-sync-python-20260527

Conversation

@Shedna
Copy link
Copy Markdown
Contributor

@Shedna Shedna commented May 27, 2026

Description

This sync fixes a contract mismatch for the public POST /v1/research endpoint in linkup-python-sdk.

The platform supports structured research outputs, but the Python SDK returned raw dictionaries from research() / async_research() even when callers supplied a Pydantic structured_output_schema.

This PR synchronizes the SDK by:

  • parsing completed structured research task outputs with the caller-provided schema in research() and async_research();
  • keeping existing behavior for sourced answers and for task retrieval endpoints where only the echoed JSON schema is available;
  • adding focused unit coverage for sync and async structured research responses.

Validation run:

  • make lint
  • make typecheck
  • make test

Checklist

  • I have installed prek on this project (for instance with the make install-dev command)
    before creating any commit, or I have run successfully the make lint command on my changes.
  • I have run successfully the make typecheck test command on my changes.
  • I have updated the README.md if my changes affected it.

cursoragent and others added 2 commits May 27, 2026 08:09
Co-authored-by: william <william@linkup.so>
Co-authored-by: william <william@linkup.so>
@cjumel
Copy link
Copy Markdown
Contributor

cjumel commented May 29, 2026

Closing this PR in favor of #76, where I took the opposite direction: instead of fixing the "missing" pydantic conversion (but they were not actually missing since the places in question the output is systematically None I believe), I made sure to never do this conversion for consistency, as we can't do it everywhere ourselves (e.g. when you get a task results, we don't have the pydantic model anymore)

@cjumel cjumel closed this May 29, 2026
@cjumel cjumel deleted the cursor/platform-sdk-sync-python-20260527 branch June 1, 2026 10:46
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.

3 participants