Skip to content

fix(sdk): expose create_parent and related HTTP add_resource fields - #3961

Open
JFPURE wants to merge 1 commit into
volcengine:mainfrom
JFPURE:fix/sdk-add-resource-create-parent
Open

fix(sdk): expose create_parent and related HTTP add_resource fields#3961
JFPURE wants to merge 1 commit into
volcengine:mainfrom
JFPURE:fix/sdk-add-resource-create-parent

Conversation

@JFPURE

@JFPURE JFPURE commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • Expose create_parent on Python SDK add_resource (Sync/AsyncHTTPClient) so parent auto-create matches HTTP/CLI and the existing API docs examples.
  • Also forward optional source_name on add_resource, and source_metadata on add_skill, for HTTP request parity.
  • Only send create_parent when True, matching CLI behavior so older servers that forbid unknown fields still accept requests.

Test plan

  • pytest sdk/python/tests/test_async_client_behaviors.py -k 'add_resource or add_skill_forwards or add_skill_uploads'
  • Manually: client.add_resource(url, parent="viking://user/resources/docs", create_parent=True) against a 0.4.13+ server and confirm parent directories are created
  • Manually: omit create_parent and confirm the request body does not include the field

Python SDK add_resource omitted create_parent even though HTTP/CLI and the API docs already support it, so parent auto-create could not be requested from Sync/AsyncHTTPClient. Also forward source_name and add_skill source_metadata for HTTP parity, matching CLI's omit-when-false create_parent behavior for older servers.

Co-authored-by: Cursor <cursoragent@cursor.com>
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