Repository navigation
Description
Observed Behavior
Agent Framework's Python Foundry Local integration has fallen behind the Foundry Local SDK: it still requires foundry-local-sdk>=0.5.1,<0.5.2, so it cannot be used with the current SDK 2.3.1. Applications using the current SDK must downgrade it or avoid the Agent Framework integration.
This is a dependency and API compatibility gap, not an assertion that Foundry Local support was intentionally removed. The integration remains present, but targets the legacy SDK.
Verified against Agent Framework main at commit 4bb5ffa7da18775bdd456d91c1313208e3363381:
Original user report: microsoft/homebrew-foundrylocal#31.
Expected Behavior
The Python integration should support the current Foundry Local SDK and document its supported SDK and Python versions. Applications should be able to use Foundry Local through Agent Framework without downgrading to SDK 0.5.1.
Steps to Reproduce
- Inspect the Foundry Local package dependency constraint linked above.
- Evaluate that constraint against SDK 0.5.1, the originally reported SDK 1.2.4, and current SDK 2.3.1.
- Observe that only SDK 0.5.1 satisfies the integration's dependency requirement.
Minimal Reproduction
from packaging.specifiers import SpecifierSet
supported = SpecifierSet(">=0.5.1,<0.5.2")
print({version: version in supported for version in ["0.5.1", "1.2.4", "2.3.1"]})Verified local output:
{'0.5.1': True, '1.2.4': False, '2.3.1': False}
This reproduces the declared dependency incompatibility. It is not a full native inference reproduction or an installation error transcript.
Package Versions
The inspected source declares agent-framework-foundry-local==1.0.0b261030, agent-framework-core>=1.24.0,<2, agent-framework-openai>=1.18.0,<2, and foundry-local-sdk>=0.5.1,<0.5.2. The current SDK targeted by the fix is 2.3.1.
Python Version
Python 3.13.14 for the metadata reproduction and the proposed fix's unit tests.
Operating System
Windows. The declared version incompatibility is platform-independent; full native inference was not verified as part of this issue update.
Regression
Unknown. The integration targets the legacy SDK and has not migrated to the current SDK API.
Additional Context / Proposed Fix
Simply widening the dependency constraint is insufficient. The adapter imports foundry_local.FoundryLocalManager and foundry_local.models, and uses legacy manager operations including get_model_info, download_model, load_model, endpoint, and api_key.
The current SDK uses the foundry_local_sdk namespace, Configuration, a shared manager singleton, catalog/model objects for model selection and lifecycle operations, and a built-in OpenAI-compatible web service.
The proposed fix is #9322. It migrates the adapter to SDK >=2.3.1,<3, documents Python 3.11-3.14 support, updates setup/model preparation and cleanup, and retains Agent Framework's OpenAI transport, streaming, middleware, and function calling. Its dependency and lockfile now target SDK 2.3.1. All 226 Foundry Local unit tests pass with that SDK; Ruff, source type checks, and offline lockfile validation also pass. Full model inference and image support have not been verified; audio and embeddings are outside that PR.
Maintainer agreement and human review remain pending. The PR links back to this issue with a closing reference.
AI Assistance
GitHub Copilot assisted with source inspection, the verified metadata reproduction, implementation, tests, and drafting this issue and the linked PR. Human review remains pending.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Python: [Bug]: Foundry Local integration excludes current SDK versions[/-][+].NET: Python: [Bug]: Foundry Local integration excludes current SDK versions[/+][-].NET: Python: [Bug]: Foundry Local integration excludes current SDK versions[/-][+]Python: [Bug]: Foundry Local integration is incompatible with current SDK versions[/+]