Skip to content

Fix Linux Python SDK, Pydantic warning and updates the ExecuteCommandWithCallback signature#593

Merged
baijumeswani merged 10 commits intomainfrom
baijumeswani/bug-fix-2
Apr 6, 2026
Merged

Fix Linux Python SDK, Pydantic warning and updates the ExecuteCommandWithCallback signature#593
baijumeswani merged 10 commits intomainfrom
baijumeswani/bug-fix-2

Conversation

@baijumeswani
Copy link
Copy Markdown
Collaborator

@baijumeswani baijumeswani commented Apr 5, 2026

This pull-request has 3 changes:

  • Fixes the pydantic warnings by intializing model_config = ConfigDict(protected_namespaces=())
  • Fixes Linux python sdk by depending on onnxruntime-gpu and onnxruntime-genai-cuda on Linux
  • Updates the callback signature because FLC updated the callback signature to return an int instead of void. Returning 1 means that the execute command operation should be cancelled, whereas 0 means to continue. The actual model download cancellation support is not part of this pull-request. Will add it in a subsequent PR.

Copilot AI review requested due to automatic review settings April 5, 2026 09:27
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 5, 2026

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

Project Deployment Actions Updated (UTC)
foundry-local Ready Ready Preview, Comment Apr 6, 2026 4:44am

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates SDK runtime compatibility across Python and JS, focusing on native binary discovery/installation (especially on Linux) and minor DTO/FFI interoperability fixes.

Changes:

  • Adjust Python native binary discovery/install logic to account for Linux ORT/GenAI packaging differences.
  • Update Python Pydantic model config to allow model_* field names without protected-namespace conflicts.
  • Modify JS CoreInterop streaming callback FFI signature/behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
sdk/python/src/detail/utils.py Updates native library discovery and foundry-local-install package selection with Linux-specific branches.
sdk/python/src/detail/model_data_types.py Adds Pydantic ConfigDict(protected_namespaces=()) to prevent model_* field-name conflicts.
sdk/python/requirements.txt Switches to platform-specific ORT/GenAI dependencies for Linux vs non-Linux.
sdk/js/src/detail/coreInterop.ts Changes Koffi callback prototype for streaming command callbacks and returns a status value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sheetalarkadam
sheetalarkadam previously approved these changes Apr 5, 2026
prathikr
prathikr previously approved these changes Apr 6, 2026
@baijumeswani baijumeswani changed the title Bug fixes Fixe Linux Python SDK, Pydantic warning and updates the ExecuteCommandWithCallback signature Apr 6, 2026
@baijumeswani baijumeswani changed the title Fixe Linux Python SDK, Pydantic warning and updates the ExecuteCommandWithCallback signature Fix Linux Python SDK, Pydantic warning and updates the ExecuteCommandWithCallback signature Apr 6, 2026
@baijumeswani baijumeswani enabled auto-merge (squash) April 6, 2026 05:23
@baijumeswani baijumeswani merged commit aa6c9be into main Apr 6, 2026
42 checks passed
@baijumeswani baijumeswani deleted the baijumeswani/bug-fix-2 branch April 6, 2026 05:45
baijumeswani added a commit that referenced this pull request Apr 6, 2026
…WithCallback signature (#593)

This pull-request has 3 changes:

- Fixes the pydantic warnings by intializing `model_config =
ConfigDict(protected_namespaces=())`
- Fixes Linux python sdk by depending on onnxruntime-gpu and
onnxruntime-genai-cuda on Linux
- Updates the callback signature because FLC updated the callback
signature to return an int instead of void. Returning 1 means that the
execute command operation should be cancelled, whereas 0 means to
continue. The actual model download cancellation support is not part of
this pull-request. Will add it in a subsequent PR.

---------

Co-authored-by: Prathik Rao <prathikrao@microsoft.com>
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.

4 participants