Bring Your Own Model Language Bindings for C#, JavaScript, Python, and Rust SDKs - #1062
Open
Selena Yang (selenayang888) wants to merge 5 commits into
Open
Bring Your Own Model Language Bindings for C#, JavaScript, Python, and Rust SDKs#1062Selena Yang (selenayang888) wants to merge 5 commits into
Selena Yang (selenayang888) wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Copilot started reviewing on behalf of
Selena Yang (selenayang888)
September 2, 2026 00:12
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Borrowed Python metadata can outlive its native manager, C# metadata copying races caller mutation, and public API compatibility and Rust coverage need correction.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Extends SDK v2 BYOM support across C#, JavaScript/TypeScript, Python, and Rust.
Changes:
- Adds local catalog selection and model registration APIs.
- Adds mutable metadata builders and ABI v2 bindings.
- Adds BYOM documentation and integration/API tests.
File summaries
| File | Description |
|---|---|
sdk_v2/rust/tests/public_api.rs |
Checks public BYOM API types. |
sdk_v2/rust/src/types.rs |
Adds catalog types and metadata builder. |
sdk_v2/rust/src/lib.rs |
Exports new Rust types. |
sdk_v2/rust/src/foundry_local_manager.rs |
Adds typed catalog access. |
sdk_v2/rust/src/detail/native.rs |
Implements native registration calls. |
sdk_v2/rust/src/detail/manager.rs |
Retrieves catalogs by type. |
sdk_v2/rust/src/detail/ffi.rs |
Adds ABI v2 definitions. |
sdk_v2/rust/src/catalog.rs |
Exposes BYOM operations. |
sdk_v2/rust/README.md |
Documents Rust BYOM usage. |
sdk_v2/python/test/unit/test_imports.py |
Verifies catalog type export. |
sdk_v2/python/test/unit/test_catalog_types.py |
Tests catalog enum defaults. |
sdk_v2/python/test/integration/test_byom.py |
Exercises Python BYOM behavior. |
sdk_v2/python/src/foundry_local_sdk/model_info.py |
Adds native mutable and borrowed metadata. |
sdk_v2/python/src/foundry_local_sdk/imodel.py |
Returns borrowed metadata views. |
sdk_v2/python/src/foundry_local_sdk/foundry_local_manager.py |
Adds typed catalog caching. |
sdk_v2/python/src/foundry_local_sdk/catalog.py |
Adds registration operations. |
sdk_v2/python/src/foundry_local_sdk/__init__.py |
Exports CatalogType. |
sdk_v2/python/README.md |
Documents Python BYOM usage. |
sdk_v2/js/test/catalog.test.ts |
Updates native catalog mocks. |
sdk_v2/js/test/byom.test.ts |
Tests JavaScript BYOM APIs. |
sdk_v2/js/src/types.ts |
Adds CatalogType. |
sdk_v2/js/src/modelInfo.ts |
Adds mutable metadata wrapper. |
sdk_v2/js/src/index.ts |
Exports BYOM types and constructors. |
sdk_v2/js/src/foundryLocalManager.ts |
Adds typed catalog caching. |
sdk_v2/js/src/detail/native.ts |
Extends native interfaces. |
sdk_v2/js/src/catalog.ts |
Adds sync and async BYOM methods. |
sdk_v2/js/README.md |
Documents JavaScript BYOM usage. |
sdk_v2/js/native/src/session.h |
Retains manager lifetimes. |
sdk_v2/js/native/src/session.cc |
Propagates manager ownership. |
sdk_v2/js/native/src/model.h |
Adds native manager keepalive. |
sdk_v2/js/native/src/model.cc |
Propagates model keepalives. |
sdk_v2/js/native/src/model_info.h |
Declares native metadata wrapper. |
sdk_v2/js/native/src/model_info.cc |
Implements metadata mutation and snapshots. |
sdk_v2/js/native/src/manager.h |
Uses shared manager ownership. |
sdk_v2/js/native/src/manager.cc |
Adds typed catalog retrieval. |
sdk_v2/js/native/src/catalog.h |
Declares native BYOM methods. |
sdk_v2/js/native/src/catalog.cc |
Implements native BYOM dispatch. |
sdk_v2/js/native/src/addon.cc |
Registers metadata constructor. |
sdk_v2/js/native/src/addon_data.h |
Stores metadata constructor reference. |
sdk_v2/js/docs/PortJsToSdkV2.md |
Marks BYOM implemented. |
sdk_v2/js/binding.gyp |
Builds metadata source. |
sdk_v2/cs/test/FoundryLocal.Tests/CatalogTests.cs |
Tests C# BYOM lifecycle. |
sdk_v2/cs/src/ICatalog.cs |
Adds registration contracts. |
sdk_v2/cs/src/FoundryModelInfo.cs |
Adds mutable metadata properties. |
sdk_v2/cs/src/FoundryLocalManager.cs |
Adds typed catalog access. |
sdk_v2/cs/src/Enums.cs |
Adds CatalogType. |
sdk_v2/cs/src/Detail/NativeMethods.cs |
Adds ABI v2 interop declarations. |
sdk_v2/cs/src/Detail/FoundryLocalApi.cs |
Implements native BYOM wrappers. |
sdk_v2/cs/src/Catalog.cs |
Implements C# registration operations. |
sdk_v2/cs/README.md |
Documents C# BYOM usage. |
Review details
- Files reviewed: 50/50 changed files
- Comments generated: 5
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Selena Yang (selenayang888)
marked this pull request as ready for review
September 3, 2026 17:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends the Bring Your Own Model (BYOM) API introduced in BYOM to the C#, JavaScript/TypeScript, Python, and Rust SDK v2 bindings.
Applications can select the local catalog, register an existing local ONNX model directory, use the returned model through the standard inference APIs, and unregister it without deleting or taking ownership of the model assets.