Skip to content

Add SDK command cancellation support#716

Open
bmehta001 wants to merge 13 commits into
mainfrom
bhamehta/sdk-command-cancellation
Open

Add SDK command cancellation support#716
bmehta001 wants to merge 13 commits into
mainfrom
bhamehta/sdk-command-cancellation

Conversation

@bmehta001
Copy link
Copy Markdown
Contributor

Summary

  • wire optional Core cancellable command exports through the C#, JS, Python, Rust, and C++ SDK interop layers
  • add public cancellation options/overloads for OpenAI command clients while preserving existing fallback behavior with older Core binaries
  • add focused cancellation lifecycle/fallback tests where feasible

Validation

  • JS: npm run build; npm run build:native; npx mocha --import=tsx test\detail\coreInterop.test.ts
  • Python: python -m pytest test\test_core_interop.py -q with local-source PYTHONPATH junction
  • Rust: cargo fmt --check; cargo check --workspace; cargo clippy --workspace -- -D warnings
  • C#: dotnet restore/build/test with explicit NuGet sources due missing local user NuGet source
  • C++: cmake configure/build/test x64-debug from VS dev shell

Stacked on #674 and depends on the Core cancellable-command exports from neutron-server PR 15615588.

bmehta001 and others added 13 commits May 18, 2026 15:11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep existing model download signatures source-compatible while adding cancellable alternatives and overload coverage across SDKs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose cancellation as additional parameters on existing C++ and Python download methods instead of adding Cancellable method names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use defaulted cancellation parameters on existing C++ download APIs instead of separate overloads now that the SDK has not officially shipped.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a defaulted cancellation token parameter on IModel.DownloadAsync now that custom implementers do not need to be preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align SDK progress parsing with Core's single numeric model download callback payload and remove redundant C++/Rust download branching.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wire optional Core cancellable command exports through the SDK interop layers and expose additive cancellation APIs for OpenAI command clients.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment May 19, 2026 0:19am

Request Review

Base automatically changed from bhamehta/sdk-download-cancellation to main May 21, 2026 16:58
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.

1 participant