Conversation
Retain Python inline payloads until native destruction and enumerate all loaded catalog variants. Resolve C# ToolChoice ambiguity, dispose live-audio sessions before unloading models, and handle redirected sample output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 481d3cfe-f201-40de-8105-462a47ad1dec
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The ownership, enumeration, and sample lifecycle fixes are coherent and covered by targeted regressions.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes release smoke-test regressions involving native ownership, catalog enumeration, and sample cleanup.
Changes:
- Retains Python inline buffers until native item destruction.
- Returns all loaded catalog leaf variants.
- Corrects sample compilation, session disposal, and redirected-output handling.
| File | Description |
|---|---|
sdk_v2/python/test/unit/test_items.py |
Adds buffer lifetime and cleanup regressions. |
sdk_v2/python/src/foundry_local_sdk/items.py |
Retains buffers through native deleters. |
sdk_v2/python/README.md |
Documents inline-buffer ownership. |
sdk_v2/cpp/test/internal_api/base_model_catalog_test.cc |
Tests loaded non-selected variants. |
sdk_v2/cpp/src/catalog/base_model_catalog.cc |
Enumerates loaded leaf variants. |
sdk_v2/cpp/include/foundry_local/foundry_local_cpp.h |
Clarifies loaded-model semantics. |
samples/python/live-audio-transcription/src/app.py |
Closes the session before unload. |
samples/python/live-audio-transcription/README.md |
Documents session closure. |
samples/js/live-audio-transcription/app.js |
Disposes sessions before unload. |
samples/cs/tutorial-tool-calling/Program.cs |
Disambiguates ToolChoice. |
samples/cs/tool-calling-foundry-local-sdk/Program.cs |
Disambiguates ToolChoice. |
samples/cs/Shared/Utils.cs |
Avoids cursor APIs for redirected output. |
samples/cs/live-audio-transcription/Program.cs |
Disposes the session before unload. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was successfully deployed
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.
Summary
Fix non-provider regressions found during Windows smoke testing of release 2.1.0 from build 1448702:
get_loaded_models()was empty without changing selection.ToolChoicein both C# tool-calling samples.Update the directly related ownership and lifecycle documentation.
Validation
BaseModelCatalogTesttests pass, including the new regression using checked-in tiny CPU model assets.loaded_after_load: trueandlisted_after_load: 1, rather than the release baseline's zero.git diff --checkpass.Synthetic sine-wave input exercises streaming and shutdown, not speech-recognition accuracy. The original Python access violation was reproduced, and borrowed-buffer corruption was independently demonstrated; its exact original native crash frame was not established.
Outstanding provider failures (not changed here)
qwen2.5-0.5b-instruct-openvino-gpu:2fail withInfer Request is busy, reported byov_compute.cc:25andsequential_executor.cc:671.qwen2.5-0.5b-instruct-trtrtx-gpu:2reportedCUDA_ERROR_STREAM_CAPTURE_INVALIDATEDand stalled. That capture error was observed in the original terminal output, but was not located in the retained logs searched.4/5/6; TensorRT completed but returned4/6/7. The latter is not established as cross-request corruption.No production provider locking or concurrency behavior is changed. Provider diagnosis/remediation remains separate. Java and Android were excluded as requested. These targeted validations do not establish exhaustive coverage of every API option or the entire sample suite.
Local diagnostic notes
Evidence is retained under the ignored
sdk_v2\cpp\build\release-2.1.0-smokedirectory, not included in this PR:sample-py-live-audio-repro.log:14debug-buffer-baseline.logdebug-live-original-sample-fixed.logdebug-live-python-final.log,debug-live-cs-final.log,debug-live-js-final.logrebuild-cs-tool-calling-foundry-local-sdk.log,rebuild-cs-tutorial-tool-calling.logdebug-build-cs-tool-calling-foundry-local-sdk.log,debug-build-cs-tutorial-tool-calling.logrust-options-catalog-verified.logdebug-rust-fixed-native.logdebug-native-build-validated.log,debug-catalog-regression-final.logdebug-python-source-native-final.log,debug-python-source-native-lifetimes.logdebug-openvino-serialized-release.log,debug-tensorrt-serialized-release.logThe original OpenVINO busy errors are also in the local Foundry log
foundry_local_2026-09-29.log:3-6.