cc0cfaaac8
[BREAKING] Python: fix OpenAI Azure routing and provider samples ( #4925 )
...
* Python: fix OpenAI Azure routing and provider samples
Prefer OpenAI when OPENAI_API_KEY is present unless Azure is explicitly requested. Clarify constructor docs, keep deprecated Azure wrappers compatible with stricter settings validation, and refresh the provider samples and tests to use the current client patterns.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix bandit
* Python: align OpenAI embedding Azure routing
Extend the shared OpenAI-vs-Azure routing and credential behavior to the embedding client, add Azure embedding regression coverage, and refresh the embedding samples to use the generic client path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: fix embedding client pyright check
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: thin OpenAI embedding wrapper
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: document embedding overload routing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: fix callable OpenAI key routing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: fix Azure credential routing tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: address OpenAI review feedback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: narrow Azure routing markers
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: refine OpenAI model fallback order
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: narrow Azure deployment docs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: remove embedding routing wording
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: run embedding Azure integration tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* changed variable name
* Python: expand OpenAI package README
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* clarified readme
* Python: fix Azure OpenAI integration setup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Python: correct Azure integration env mapping
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* updated code to fix int tests
* test updates
* test fix
* fix test setup
* updates to tests and setup
* remove openai assistants int tests
* improvements in int tests
* fix env var
* fix env vars
* fix azure responses test
* trigger actions
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-27 13:33:39 +00:00
Eduard van Valkenburg and GitHub
c012aac5f2
Python: [BREAKING] Reduce core dependencies and simplify optional integrations ( #4904 )
...
* improved dependencies and some fixes
* fix for mypy
* improve mcp
2026-03-25 18:03:43 +00:00
5e056b672e
Python: [BREAKING] Python: Provider-leading client design & OpenAI package extraction ( #4818 )
...
* Python: Provider-leading client design & OpenAI package extraction
Major refactoring of the Python Agent Framework client architecture:
- Extract OpenAI clients into new `agent-framework-openai` package
- Core package no longer depends on openai, azure-identity, azure-ai-projects
- Rename clients for discoverability: OpenAIResponsesClient → OpenAIChatClient,
OpenAIChatClient → OpenAIChatCompletionClient
- Unify `model_id`/`deployment_name`/`model_deployment_name` → `model` param
- New FoundryChatClient for Azure AI Foundry Responses API
- New FoundryAgent/FoundryAgentClient for connecting to pre-configured Foundry agents
- Remove OpenAIBase/OpenAIConfigMixin from non-deprecated client MRO
- Deprecate AzureOpenAI* clients, AzureAIClient, OpenAIAssistantsClient
- Reorganize samples: azure_openai+azure_ai+azure_ai_agent → azure/
- ADR-0020: Provider-Leading Client Design
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix: missing Agent imports in samples, .model_id → .model in foundry_local sample
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix: CI failures — mypy errors, coverage targets, sample imports
- azure-ai mypy: add type ignores for TypedDict total=, model arg, forward ref
- Coverage: replace core.azure/openai targets with openai package target
- project_provider: add type annotation for opts dict
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix: populate openai .pyi stub, fix broken README links, coverage targets
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fixes
* updated observabilitty
* reset azure init.pyi
* fix errors
* updated adr number
* fix foundry local
* fixed not renamed docstrings and comments, and added deprecated markers to old classes
* fix tests and pyprojects
* fix test vars
* updated function tests
* update durable
* updated test setup for functions
* Fix Foundry auth in workflow samples
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Stabilize Python integration workflows
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Update hosting samples for Foundry
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Trigger full CI rerun
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Trigger CI rerun again
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* trigger rerun
* trigger rerun
* fix for litellm
* undo durabletask changes
* Move Foundry APIs into foundry namespace
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Fix Foundry pyproject formatting
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Split provider samples by Foundry surface
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* Restore hosting sample requirements
Also fix the Foundry Local sample link after the provider sample move.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* updated tests
* udpated foundry integration tests
* removed dist from azurefunctions tests
* Use separate Foundry clients for concurrent agents
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
* fix client setup in azfunc and durable
* disabled two tests
* updated setup for some function and durable tests
* improved azure openai setup with new clients
* ignore deprecated
* fixes
* skip 11
* remove openai assistants int tests
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-03-25 09:56:29 +00:00
Eduard van Valkenburg and GitHub
9355329dfd
Python: [BREAKING] updated structure and samples ( #875 )
...
* updated structure and samples
* updated names and removed cross tests
* updated projects etc
* updated tests
* updated test
* test fixes
* removed devui for now
* updated all-tests task
* removed old style configs
* remove coverage from tests
* updated to unit tests with all-tests
* updated foundry everywhere
* fix azure ai tests
* fix merge tests
* fix mypy
2025-09-25 07:02:53 +00:00
Eduard van Valkenburg and GitHub
9eb68ab2f9
Python: additional Foundry Tools ( #611 )
...
* initial work on additional foundry tools
* fixes
* fix tests
* fix import
* updated lock
* added hosted MCP for foundry
* fixes
* fix for test
* updated samples
* fix result parsing
2025-09-23 11:20:20 +00:00
Eduard van Valkenburg and GitHub
2576e7a091
Python: Telemetry and observability follow-up ( #833 )
...
* updated telemetry work
* updated telemetry
* slight improvement
* updated tests
* fixes for telemetry
* fixes for mypy
* added settings setup to runner to avoid error
* streamline usage
* updated tests
* updated tests
* further refinement
* fix dumped item for otel
* removed enable_workflow_otel
* final fixes
* final fixes
* updated samples
* removed exporters
* fix tests
* fixed last import'
* fixed devui
2025-09-23 06:21:56 +00:00
Eduard van Valkenburg and GitHub
65dd48aa1d
Python: api doc generation setup ( #342 )
...
* api doc generation setup
* remove old log file
* improved check md function
* update with sample code in docstring
* updated script
* docs update
* docs update and action
* removed all-extras
* fixed sync command
* moved install
* moved action
* renamed folder
* fixed syntax
* add python path
* fix mypy and reused steps
* updated merge test
* undo change
* slight update in poe commands
* dev setup update
* updated uvlock
2025-09-16 10:02:53 +00:00
Eduard van Valkenburg and GitHub
89cb94b5c2
replaced HEADERS with user_agent ( #732 )
2025-09-16 07:57:37 +00:00
Dmytro Struk and GitHub
e7cd03b32e
Python: Added Copilot Studio Agent ( #722 )
...
* Small fix in dotnet conformance tests
* Added CopilotStudioAgent implementation
* Added examples
* Updated package README
* Small fixes
* Small improvements
* Fixed dotnet tests
* Add unit tests
* Updated tests
* Small updates
* Small test fixes
* Revert "Small test fixes"
This reverts commit 983ac44a70 .
* Small fixes in documentation
* Updated test configuration
* Revert "Updated test configuration"
This reverts commit 2a16fea815 .
* Small fix
* Reverted TODO item
* Small suppressions
* More fixes
* Small fixes
* Fixed tests
* Removed disallow_any_unimported rule in all packages
* Fixes
2025-09-15 23:21:07 +00:00
Evan Mattson and GitHub
d00538eb26
Foundry client ToolOutput to FunctionToolOutput ( #749 )
2025-09-15 09:06:43 +00:00
82ca4065cb
Python: Improved telemetry setup ( #421 )
...
* test with stack and simplified names
* quick demo of agent decorator
* moved builder to protocol to enhance functionality
* undid chatclientAgent -> agent rename
* one more
* reverted AIAgent rename
* final reverts
* fixed foundry import
* revert changes
* streamlined otel and fcc decorators
* cleanup of telemetry
* further refinement
* lots of updates
* fixed typing
* fix for mypy
* added input and output atttributes
* fix import
* initial work on baking in otel
* major update to telemetry
* final fixes after rename
* fix
* fix test
* updated tests
* fix for tests
* fixes for tests
* updated based on comments
* removed agent decorator
* fix for Python: ServiceResponseException when using multiple tools
Fixes #649
* addressed comments
* fix tests
* fix tests
* fix tools tests
* fix for conversation_id in assistants client
* fix responses test
* fix tests and mypy
* updated test
* foundry fix
---------
Co-authored-by: Chris <66376200+crickman@users.noreply.github.com >
2025-09-10 14:52:42 +00:00
6aa746d891
Python: Introducing UserInputRequest and Response types and HostedMcpTool ( #405 )
...
* initial work on User Approval (and hosted mcp to validate)
* small update to the comments in the sample
* enable local MCP tools in chatClient get methods
* working streaming and improved setup
* fix for pyright
* updated create_approval -> create_response method
* added tests
* updated HostedMcpTool and addressed feedback
* update type name
* naming updates
* small docstring update
* mypy fix
* fixes and updates
* fixes for responses
* fix int tests
* removed broken tests
* updated test running
* removed specific content check on websearch
* increased timeout
* split slow foundry test
* don't parallel run samples
* add dist load to unit tests
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com >
2025-09-10 13:37:34 +00:00
Eduard van Valkenburg and GitHub
947f2bf642
Python: added user agents to foundry and azure openai ( #658 )
...
* added user agents to foundry and azure openai
* improvement
* improvement for disabled setup
2025-09-10 08:57:37 +00:00
9f8823192e
MCP support for Foundry ( #652 )
...
Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com >
2025-09-09 20:07:20 +00:00
Eduard van Valkenburg and GitHub
40ab6e9d67
Python: name changes executed ( #607 )
...
* name changes executed
* updated adr to accepted
* renamed openai base config
* renamed openai config to mixin
* added renames in user docs
* reverted mcperror
* fix tests
* remove sse from tests
2025-09-04 15:00:38 +00:00
Dmytro Struk and GitHub
0c28935382
Python: Improved exception messages in client initialization ( #539 )
...
* Improved exception messages in client initialization
* Fixed tests
2025-08-28 20:52:59 +00:00
8e14dfc522
Python: Improved foundry integration tests ( #514 )
...
* improved foundry integration tests
* Update python/packages/foundry/tests/test_foundry_chat_client.py
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
* Update python/packages/foundry/tests/test_foundry_chat_client.py
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
---------
Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com >
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
2025-08-27 21:54:28 +00:00
Dmytro Struk and GitHub
fa88641263
Python: Removed DefaultAzureCredential ( #490 )
...
* Removed DefaultAzureCredential
* Renamed ad_credential to credential
2025-08-26 15:33:17 +00:00
123a0bca10
Python: Improved main package test coverage ( #445 )
...
* Fixed failing foundry tests and improved main coverage
* Add back mistakenly deleted code
* Update python/packages/main/tests/openai/test_openai_assistants_client.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update python/packages/main/tests/openai/test_openai_assistants_client.py
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
* Small fix
---------
Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
2025-08-20 20:18:48 +00:00
19d91bb950
Python: Foundry Chat Client unit tests to improve coverage ( #423 )
...
* Add unit tests for Foundry Chat Client to improve coverage
* Updated Azure OpenAI endpoint and tests timeout
* Error fixes for Foundry Chat Client tests
* Error fixes
---------
Co-authored-by: Giles Odigwe <gilesodigwe@microsoft.com >
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com >
2025-08-15 17:45:14 +00:00
Dmytro Struk and GitHub
dea736e550
Python: Thread storage and serialization ( #394 )
...
* Updates for message store support
* Added unit tests
* Added suspend-resume example
* Added example with custom chat message store
* Small fix
* Addressed PR feedback
* Renaming and documentation
* More renaming
* Addressed more PR feedback
* Small fixes in Foundry chat client and examples
* Small update
* Addressed PR feedback
* Increased timeout for Azure tests
2025-08-14 21:15:42 +00:00
Dmytro Struk and GitHub
95cb20ca40
Small fix in Foundry chat client and samples ( #407 )
2025-08-14 20:21:23 +00:00
Eduard van Valkenburg and GitHub
53866218d2
Python: add better test coverage to individual tests, and all-tests task, gh … ( #400 )
...
* add better test coverage to individual tests, and all-tests task, gh action to surface
* remove cache location
* test version-file
* updated uv setup for consistency
* mypy fix
* update naming
* temporarily removed mypy from workflow
2025-08-12 18:35:36 +00:00
Eduard van Valkenburg and GitHub
df9d85d1f0
Python: openai updates ( #388 )
...
* openai updates
* rebuild of openai structure
* updated responses structure
* renamed sample
* added file id support to code interpreter
* added hosted file ids to code interpretor
* mypy fixes
* removed default az cred from codebase
* updated agent name setup
* added kwargs to entra methods
* and further kwargs
* extra comment
* updated all samples
* readded custom get methods for responses
* updated int tests with ad credential
* missed one
2025-08-12 06:14:22 +00:00
Eduard van Valkenburg and GitHub
c39845d473
Python: small fixes in foundry ( #297 )
...
* small fixes in foundry
* other samples updated
* make it optional
* added instructions and response format to create agent
* mypy fix
* shortened main readme and improved python readme
2025-08-04 08:13:44 +00:00
Dmytro Struk and GitHub
75794b4687
Python: OpenAI Assistants Chat Client and Agent ( #288 )
...
* Initial version of assistant client
* More updates to assistant client
* Finished assistant chat client implementation
* Small fixes and basic example
* Added code interpreter example
* More examples
* Added chat client example
* Small fixes
* Added tests
* Enabled telemetry
* Small fix
* Removed files temporarily
* Revert "Removed files temporarily"
This reverts commit 5cdfa0d299 .
* Small fixes
* Addressed PR feedback
* Fixed tests
* Small update
2025-08-01 12:12:41 +00:00
Eduard van Valkenburg and GitHub
42c7a59640
Python: updated doc generation setup and some slight api enhancements ( #267 )
...
* updated doc generation setup and some slight api enhancements
* small fix in index
2025-07-31 15:04:22 +00:00
Eduard van Valkenburg and GitHub
1ed89d4db8
Python: updated API in sync with dotnet ( #269 )
...
* updated API in sync with dotnet
* fix test
* updated name and display_name
* fixed mypy setup
* add pre-commit cache
2025-07-30 08:50:22 +00:00
Eduard van Valkenburg and GitHub
dff700e469
added telemetry decorators to other chat clients ( #255 )
2025-07-28 17:08:58 +00:00
Eduard van Valkenburg and GitHub
0ce8eb1e2f
Python telemetry ( #223 )
...
* initial work on telemetry
* moved tool operation const
* missing quotes
* working otel with samples
* updated readme and other assets
* added tests
* added tests
* small updates
* updated genaiattributes docs
* updated tests
* additional warning
* cleanup of tests
2025-07-28 07:33:42 +00:00
Dmytro Struk and GitHub
14efb626ab
Python: Added fixes and more examples for Foundry agent ( #217 )
...
* Added non-streaming and streaming examples
* Updated resource management
* Added examples with thread management
* Added function tools examples
* Small rename
* Added code interpreter example
* Updated example
* Addressed PR feedback
* Addressed PR feedback
2025-07-24 14:47:45 +00:00
Eduard van Valkenburg and GitHub
517955ce66
updated builds and release pipeline setup (without pypi publish) ( #219 )
...
* updated builds and release pipeline setup (without pypi publish)
* add label prefix action
* updated uv versions
* final uv updates
* moved uv version semver into variable
2025-07-24 07:15:00 +00:00
Eduard van Valkenburg and GitHub
27f7af2160
Python: moved prepare tools into class ( #215 )
...
* moved prepare tools into class
* moved test
* changed tool handling
* fix test
* second fix
2025-07-22 21:37:18 +00:00
Eduard van Valkenburg and GitHub
5c992eb7ae
Python: move all tests under tests and initial work on int tests ( #206 )
...
* move all tests under tests and initial work on int tests
* added updated tests setup and merge tests
* without failing step
* fixed upload
* updated file names for coverage
* reenable surface tests
* removed package matrix
* simplified variables
* correct path
* removed mistake
* fix mistake in path
* fix path
* windows specific env set
* updated merge tests
* slight update in marker
* added run integration tests settings
* updated setup, moved foundry int tests and updated merge test
2025-07-22 15:26:00 +00:00
Dmytro Struk and GitHub
f89c0be0ea
Python: Added integration tests for FoundryChatClient ( #207 )
...
* Initial version of tests
* Updated the tests
2025-07-22 14:11:54 +00:00
Dmytro Struk and GitHub
ccd7a44ec7
Python: Implemented FoundryChatClient ( #193 )
...
* Initial version of FoundryChatClient
* Updates to the tool call streaming wrapper
* Small fixes
* Small updates and addressed PR feedback
* Handle automatic client creation
* Small improvement
* Added credential parameter
* Small improvements
* Made FoundryChatClient disposable
* Small fixes
* Added unit tests
* Refactored samples
* Small improvements
* Small fix
* Addressed PR feedback
* Small fixes
* Small updates
* Small fix
* Addressed PR feedback
2025-07-18 20:10:14 +00:00