-
Notifications
You must be signed in to change notification settings - Fork 4k
Python: Merging from main #11933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Python: Merging from main #11933
Conversation
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
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Currently, we don't have a dedicated method to create a clone of a kernel instance. Using `model_copy(deep=True)` will result in an error because some service clients aren't serializable. Being able to clone a kernel will be critical in many scenarios where developers don't want to mutate the original one that is attached to an agent or some other objects. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> 1. Create a clone method in the `Kernel` class that will return a new instance of the kernel with the same configuration, including the list of filters, plugins and the AI selector. It will also include the same list of services references. 2. Add unit tests and integration tests to ensure the new method works as expected. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
…11700) ### Motivation and Context If an agent id is provided the existing agent will be retrieved. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
…11646) ### Description This PR addresses a known issue where omitting the `"extra-parameters": "pass-through"` header in `HttpClient` results in a `400 Bad Request` when calling Mistral chat completions. - **Fixes a critical integration bug** by enforcing the required header at the extension level if not provided by the user. - **Adds a unit test** to validate correct injection of the header, improving coverage and reliability for MistralAI scenarios. These changes improve robustness, eliminate manual setup pitfalls, and enhance maintainability for developers integrating Mistral models. ### Contribution Checklist - [Y] The code builds clean without any errors or warnings - [Y] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [Y] All unit tests pass, and I have added new tests where possible - [Y] I didn't break anyone 😄 Fixes #11634 --------- Co-authored-by: Adit Sheth <adsheth@microsoft.com> Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
### Motivation and Context Prompty.Core has been updated to support the same format as declarative agents. This PR updates the code to use the latest version of Prompty.Core. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Description **PR Title:** feat(connectors-google): Introduce Gemini Thinking Budget Configuration Closes 11645 **Description:** This pull request introduces the `GeminiThinkingConfig` class and the `ThinkingConfig` property within `GeminiPromptExecutionSettings` to support the thinking budget feature available in Gemini 2.5 and similar experimental models. **Key changes include:** * Added the `GeminiThinkingConfig` class with a `ThinkingBudget` property for controlling the number of thinking tokens. * Implemented validation and clamping logic for the `ThinkingBudget` property within `GeminiThinkingConfig`, ensuring it adheres to the API requirements (range 0-24576, with 1-1023 clamped to 1024). * Added the `ThinkingConfig` property to `GeminiPromptExecutionSettings`, allowing users to configure the thinking budget for Gemini 2.5 models. * Implemented a check within the `ThinkingConfig` property setter to ensure it's only used with Gemini 2.5 model IDs, throwing an `InvalidOperationException` otherwise. * Included comprehensive unit tests to verify the functionality of both `ThinkingConfig` and `ThinkingBudget`, covering valid and invalid input scenarios, as well as the model ID restriction. This enhancement enables developers to leverage the thinking budget feature for more complex tasks with supported Gemini models. ### Contribution Checklist - [Y] The code builds clean without any errors or warnings - [Y] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [Y] All unit tests pass, and I have added new tests where possible - [Y] I didn't break anyone 😄 Fixes #11645 --------- Co-authored-by: Adit Sheth <adsheth@microsoft.com> Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
### Motivation, Context and Description This PR fixes a function-calling-related integration test that was failing sporadically and recently started to fail consistently:  Upon investigation, it appeared that this test set the temperature to 0.1 in addition to enabling auto function calling. This led to a 70% failure rate (7 out of 10 runs failed). After removing the temperature setting, the failure rate dropped to 0.
…AssistantAgent, and OpenAIResponsesAgent (#11705) ### Motivation and Context Based on feedback, there are customer scenarios where it can be helpful to be able to pass in run-level polling options, instead of only at the agent definition/constructor level. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Add run-level run polling options parameter. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation, Context and Description This PR adds an operation selector predicate that can include or exclude operations based on id, method, path, and description. It also obsoletes the `OperationsToExclude` exclusion list, which is limited to filtering out operations by operation id only. Closes: #10514
### Motivation, Context and Description This PR stops publishing OpenAI and Handlebars planners as NuGet packages. Contributes to: #10070
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> We are currently not returning the thread id and run id from the Azure AI and Assistant agents. These properties will be useful for evaluation purposes. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Return the thread id and run id in the agent response metadata. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
### Motivation, Context and Description This PR removes the experimental attribute from the API that was introduced a while ago and can be considered stable. Additionally, it enables package validation. Contributes to: #10070
…ep (#11518) ### Motivation and Context Improve coverage for azure_cosmos_db_mongodb_collection and local_step classes. ### Description New test files: - test_azure_cosmos_db_mongodb_collection.py - test_local_step.py ### Contribution Checklist - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
…11772) ### Motivation and Context Core is very close to the code coverage threshold so excluding some functions from code coverage 1. CaptureUsageDetails 2. CreatePluginFromPromptDirectory no longer a recommended pattern 3. MemoryBuilder and SemanticTextMemory are being deprecated ### Description Before  After  ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation and Context SK Python processes have been missing support to be able to serialize and deserialize JSON state for a process and its steps. This PR brings in the functionality to allow the developer to do so. The `getting_started_with_processes` step03 has been update to reflect this latest functionality. It is possible to dump a JSON state to a file, and reload the state to continue running the process. State metadata that handles the version for steps is managed via a decorator: ```python @kernel_process_step_metadata("CutFoodStep.V1") class CutFoodStep(KernelProcessStep): class Functions(Enum): ChopFood = "ChopFood" SliceFood = "SliceFood" ``` If no decorator/state is supplied the step will be built with a default state version of "v1" which aligns with .Net. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Support state and versioning management for Python processes. - Update samples to reflect changes. - Closes #9584 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation and Context Bump Python version to 1.29.0 for a release. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Bump Python version to 1.29.0 for a release. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Vincent Biret <vibiret@microsoft.com> Co-authored-by: Shay Rojansky <roji@roji.org> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com> Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Co-authored-by: Chris <66376200+crickman@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tao Chen <taochen@microsoft.com> Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com> Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Co-authored-by: Estefanía Tenorio <8483207+esttenorio@users.noreply.github.com> Co-authored-by: davidpene <d.c.pene@gmail.com> Co-authored-by: ThDuquennoy <tduquennoy@chapsvision.com> Co-authored-by: Thomas DUQUENNOY <Thomas.DUQUENNOY@sinequa.com> Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> Co-authored-by: Evan Mattson <evan.mattson@microsoft.com> Co-authored-by: Rob Emanuele <rdemanuele@gmail.com> Co-authored-by: K. Andrew Parker <andrew+github@rationarium.org> Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> Co-authored-by: jenfoxbot <jen.fox@microsoft.com> Co-authored-by: Ben Thomas <ben.thomas@microsoft.com> Co-authored-by: Ben Thomas <bentho@microsoft.com> Co-authored-by: Adit Sheth <shethaadit@gmail.com> Co-authored-by: Adit Sheth <adsheth@microsoft.com> Co-authored-by: ふぁー <47295014+ymuichiro@users.noreply.github.com> Co-authored-by: Vincent Biret <vibiret@microsoft.com> Co-authored-by: David A. Torres <10944960+davidatorres@users.noreply.github.com> Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Co-authored-by: Atiqur Rahman Foyshal <113086917+atiq-bs23@users.noreply.github.com> Co-authored-by: Md. Atiqur Rahman Foyshal <atiqur.foyshal@brainstation-23.com> Co-authored-by: Fabian Williams <92543063+fabianwilliams@users.noreply.github.com> Co-authored-by: fabian.williams@microsoft.com <fabianwilliams@users.noreply.github.com> Co-authored-by: Ram.Type-0 <39725073+RamType0@users.noreply.github.com> Co-authored-by: Tommy Falgout <tommy@lastcoolnameleft.com> Co-authored-by: Gary Tang <113477176+gtang31-te@users.noreply.github.com> Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: Tommaso Stocchi <tstocchi@microsoft.com> Co-authored-by: Chris Rickman <crickman@microsoft.com> Co-authored-by: Devis Lucato <dluc@users.noreply.github.com> Co-authored-by: K. Andrew Parker <kparker@citytech.cuny.edu> Co-authored-by: Jose Luis Latorre Millas <joslat@gmail.com> Co-authored-by: Carsten Lemm <clemm@microsoft.com> Co-authored-by: Stephen Toub <stoub@microsoft.com> Co-authored-by: Musale Martin <martinmshale@gmail.com> Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com> Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com> Co-authored-by: Rodrigo Martins Racanicci <59115712+rracanicci@users.noreply.github.com> Co-authored-by: unsafecode <r.chiodaroli@live.com> Co-authored-by: QuocDatHoang <dathq.vn@gmail.com> Co-authored-by: Dat Hoang Quoc <DAT@jsworldmedia.com> Co-authored-by: Damien Guard <damien@envytech.co.uk>
…I 3.0 (#11751) ### Motivation and Context Similar to the StructuredOutput solution, this fix will now also cover the Tool generation when the StructuredOutput feature is not used. This change also brings a new Integration test to ensure the compatible behavior as well as a sample inspired in the reproduction code in the issue below. - Fixes #11675
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Ensure unit-tests for the Agent Runtime are being included in the github workflows. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Noticed that the agent runtime projects weren't reporting any coverage in github build action. Realized the workflows are selecting on projects with the `UnitTest` suffix. Example Log (no coverage): https://github.com/microsoft/semantic-kernel/actions/runs/14673168889/job/41184172441 With this change:  ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> The mongo link in one of the ADR's was gone, replaced. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation and Context Today in Python processes the `max_supersteps` config is hidden from the caller. The internal execute method defaults the value to 100, and this doesn't allow for developers to leverage custom values depending on their use cases. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Provide a way for callers to pass in `max_supersteps` via the process runtime `start` method. - Update README - Update unit tests accordingly. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
…o prevent state mutation (#11826) ### Motivation and Context The existing implementation of `kernel.invoke_function_call(...)` stores mutable tool return values by reference. Subsequent mutations to the same in-memory state bleed into earlier chat messages, which corrupts conversation history and breaks reproducibility. By deep-copying the function result immediately after execution, we can guarantee an immutable snapshot of each tool's output at the time of invocation, which preserves previous tool invocations and removes unwanted side effects. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description After `await stack(invocation_context)` in `kernel.invoke_function_call(...)`, we now have: ```python if invocation_context.function_result and invocation_context.function_result.value is not None: invocation_context.function_result.value = copy.deepcopy( invocation_context.function_result.value ) ``` This has no change to our public API or user-facing behavior; internal state handling is now robust against undesired mutations. - Adds a unit test to exercise the new behavior and assert on the proper mutations/states. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
… blocking pr merges. (#11822) ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation, Context and Description Both plugins were introduced a long time ago at the beginning of the project and are not relevant anymore. Contributes to: #10070
### Motivation and Context This PR adds integration tests for the Python code interpreter plugin. They are for manual execution only at the moment, which might be revisited in the future. Additionally, it renames the secret to better reflect its purpose and describes the way to create and configure the Azure Container App Session Pool. Contributes to: #10070
### Motivation and Context The OpenAI Connector only supports `TextContent`, `ImageContent`, and `AudioContent` KernelContent types. However, the Chat Completion API supports uploading other file types encoded as a base64 string. This change leverages that behavior to add support for `BinaryContent`. ### Description This change adds support for `BinaryContent` KernelContent types by using `ChatMessageContentPart.CreateFilePart` to create the corresponding `ChatMessageContentPart`. ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
### Motivation and Context When running the UnitTests in a non-configured machine the tests just halt and don't work when the mock uses the concrete types. After some analysis this lead to the conclusion that the tests and the implementation should be relying on the abstractions (available) instead of the concrete types. This change allows the Bedrock package to be compatible with the interfaces and also simplify and make the environment light weight for unit testing.
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Removed Experimental flag from GetService method as discussed during design review meeting. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
### Motivation and Context SK'S `OpenAIChatPromptExecutions` do not allow one to configure the `extra_body` input to a chat completions create. This is something specified on the Azure OpenAI connector but not on OpenAI. Because there are also custom attributes as part of AOAI, we're providing a base class attribute, and we will keep the child class attribute as-is. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Introduce the `extra_body` attribute on OpenAI Chat Prompt Execution Settings. - Closes #11813 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation and Context Semantic Kernel Python currently has a demo showing how to interact with a Copilot Studio Agent; however, that uses the `DirectLine API`. This PR introduces a Semantic Kernel `CoilotStudioAgent` that leverages the team's new `microsoft.agents.copilotstudio.client`. One must first have a Copilot Studio Agent created via the portal; and once ready, they can reference it with the proper App Registration and Agent metadata. Interacting with the Agent can leverage Microsoft Copilot Studio's knowledge sources and internal tools. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Add support for the `CopilotStudioAgent`. - Provide getting started samples - Introduces a detailed README on what is required for setup and interacting with the agent. - The current version of the `CopilotStudioAgent` does not support calling another Copilot Studio Agent via a skill. - Authentication for the agent is limited to interactive right now. Once service-to-service auth is support via the client, we will add this into SK. - Closes #11607 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation, Context and Description This PR: 1. Propagates the cancellation token from all kernel functions of the `SessionsPythonPlugin` plugin down to the APIs they call. 2. Refactors the way the plugin adds headers to the request. Instead of adding them as default headers of the HTTP client, they are now added as request headers. The result is the same - the headers are sent each call of any kernel function of the plugin. This change may save time later by preventing bug troubleshooting if/when an HTTP client is injected into the plugin and it sets default headers to the client it does not own. 3. Replaces the usage of HTTP client methods for getting content, such as `ReadAsStringAsync`, with the SK wrappers `ReadAsStringWithExceptionMappingAsync` to align the plugin's behavior with that of other SK components. Contributes to: #10070
### Motivation and Context Convert lists of strings to a string value correctly ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation and Context Currently, `CreatePluginFromApiManifestAsync `does not work when referencing a local filepath for the apiDescriptionIUrl in the `apiDependencies `section. For details, see #11564 ### Description The fix involves setting the BasePath of the OpenApiStreamReader to the previously parsed url value instead of the original value. Unittests and sample data included. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 Hope this PR is suitable. Cheers, Alexander --------- Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
…1792) Bumps [Microsoft.ML.Tokenizers](https://github.com/dotnet/machinelearning) from 1.0.1 to 1.0.2. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/dotnet/machinelearning/commits">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…et (#11793) Bumps [Aspire.Azure.Search.Documents](https://github.com/dotnet/aspire) from 9.1.0 to 9.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dotnet/aspire/releases">Aspire.Azure.Search.Documents's releases</a>.</em></p> <blockquote> <h2>.NET Aspire 9.2.1 Release</h2> <p>We are excited to share that our 9.2.1 release of .NET Aspire has shipped! All of the packages are available in NuGet.org now. Try it out and share your feedback 😃</p> <h2>What's Changed</h2> <ul> <li>[release/9.2] Fix AE in ExecutableResource by <a href="https://github.com/github-actions"><code>@github-actions</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/8864">dotnet/aspire#8864</a></li> <li>[release/9.2] Don't fail for Azure role assignments in run mode by <a href="https://github.com/github-actions"><code>@github-actions</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/8807">dotnet/aspire#8807</a></li> <li>[release/9.2] Fixed resolving secrets for keyvault references in run mode by <a href="https://github.com/github-actions"><code>@github-actions</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/8755">dotnet/aspire#8755</a></li> <li>Update test files to show 9.2.1 patched version to fix tests by <a href="https://github.com/joperezr"><code>@joperezr</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/8903">dotnet/aspire#8903</a></li> <li>[release/9.2] Ensure visible trace spans stay sorted by start time and fix Traces view expand/collapse icons by <a href="https://github.com/JamesNK"><code>@JamesNK</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/8909">dotnet/aspire#8909</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/dotnet/aspire/compare/v9.2.0...v9.2.1">https://github.com/dotnet/aspire/compare/v9.2.0...v9.2.1</a></p> <h2>.NET Aspire 9.2.0 Release</h2> <p>We are excited to share that our 9.2.0 release of .NET Aspire has shipped! All of the packages are available in NuGet.org now. Please check out <a href="https://learn.microsoft.com/dotnet/aspire/whats-new/dotnet-aspire-9.2">what's new</a> in this release. Try it out and share your feedback 😃</p> <h2>What's Changed</h2> <ul> <li>Update branding to 9.2.0 by <a href="https://github.com/wtgodbe"><code>@wtgodbe</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7542">dotnet/aspire#7542</a></li> <li>Update Dcp out of date error message by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7539">dotnet/aspire#7539</a></li> <li>Localized file check-in by OneLocBuild Task: Build definition ID 1309: Build ID 2640743 by <a href="https://github.com/dotnet-bot"><code>@dotnet-bot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7545">dotnet/aspire#7545</a></li> <li>Fix metrics page instruments not updating when added by <a href="https://github.com/JamesNK"><code>@JamesNK</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7549">dotnet/aspire#7549</a></li> <li>Run tests on release branches by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7567">dotnet/aspire#7567</a></li> <li>[main] Update dependencies from dotnet/arcade by <a href="https://github.com/dotnet-maestro"><code>@dotnet-maestro</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7578">dotnet/aspire#7578</a></li> <li>Support WithEntrypoint on Containers by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7577">dotnet/aspire#7577</a></li> <li>Fix Elasticsearch function test by <a href="https://github.com/sebastienros"><code>@sebastienros</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7547">dotnet/aspire#7547</a></li> <li>Bump the priority of processing paramters to avoid infinite recursion by <a href="https://github.com/davidfowl"><code>@davidfowl</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7588">dotnet/aspire#7588</a></li> <li>Fix up xml docs on ServiceBus change. by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7581">dotnet/aspire#7581</a></li> <li>Localized file check-in by OneLocBuild Task: Build definition ID 1309: Build ID 2642304 by <a href="https://github.com/dotnet-bot"><code>@dotnet-bot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7585">dotnet/aspire#7585</a></li> <li>Allow for nested children in the dashboard by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7604">dotnet/aspire#7604</a></li> <li>Add WithParentRelationship overload accepting an IResourceBuilder by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7615">dotnet/aspire#7615</a></li> <li>Fix release branches in tests GH action by <a href="https://github.com/eerhardt"><code>@eerhardt</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7614">dotnet/aspire#7614</a></li> <li>Improve testing templates by <a href="https://github.com/DamianEdwards"><code>@DamianEdwards</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7619">dotnet/aspire#7619</a></li> <li>Fix metrics instruments not updating in mobile view by <a href="https://github.com/JamesNK"><code>@JamesNK</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7608">dotnet/aspire#7608</a></li> <li>Reuse Event Hubs client for health checks by <a href="https://github.com/sebastienros"><code>@sebastienros</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7625">dotnet/aspire#7625</a></li> <li>add logging after tests by <a href="https://github.com/danmoseley"><code>@danmoseley</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7637">dotnet/aspire#7637</a></li> <li>Fix console logs menu buttons not updated with resource by <a href="https://github.com/JamesNK"><code>@JamesNK</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7639">dotnet/aspire#7639</a></li> <li>Update Microsoft.Extensions.AI to 9.3.0-preview.1.25114.11 by <a href="https://github.com/stephentoub"><code>@stephentoub</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7643">dotnet/aspire#7643</a></li> <li>Bump the azure group with 5 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7646">dotnet/aspire#7646</a></li> <li>Bump the orleans group with 6 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7648">dotnet/aspire#7648</a></li> <li>fix casing of CosmosDB by <a href="https://github.com/danmoseley"><code>@danmoseley</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7635">dotnet/aspire#7635</a></li> <li>Localized file check-in by OneLocBuild Task: Build definition ID 1309: Build ID 2645400 by <a href="https://github.com/dotnet-bot"><code>@dotnet-bot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7658">dotnet/aspire#7658</a></li> <li>Fix resource cleanup in ungraceful shutdown tests by <a href="https://github.com/ReubenBond"><code>@ReubenBond</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7663">dotnet/aspire#7663</a></li> <li>Add WaitBehavior to WaitForResourceHealthyAsync by <a href="https://github.com/mitchdenny"><code>@mitchdenny</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7650">dotnet/aspire#7650</a></li> <li>Avoid unnecessary containers in Aspire.Hosting.Testing.Tests by <a href="https://github.com/ReubenBond"><code>@ReubenBond</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7666">dotnet/aspire#7666</a></li> <li>Use explicit interface implementation for IResourceWithAzureFunctionsConfig by <a href="https://github.com/captainsafia"><code>@captainsafia</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7667">dotnet/aspire#7667</a></li> <li>Mitchdenny/wait-behavior-follow-up by <a href="https://github.com/mitchdenny"><code>@mitchdenny</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7668">dotnet/aspire#7668</a></li> <li>Don't skip event hub health checks by <a href="https://github.com/sebastienros"><code>@sebastienros</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7670">dotnet/aspire#7670</a></li> <li>Bump Microsoft.Playwright from 1.49.0 to 1.50.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7390">dotnet/aspire#7390</a></li> <li>Update AzureSignalRServiceMode namespace by <a href="https://github.com/vicancy"><code>@vicancy</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7678">dotnet/aspire#7678</a></li> <li>Create Login page EditContext before async work by <a href="https://github.com/JamesNK"><code>@JamesNK</code></a> in <a href="https://redirect.github.com/dotnet/aspire/pull/7671">dotnet/aspire#7671</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dotnet/aspire/commit/b590865a294feaff82f06c4fadef62ba1fad2271"><code>b590865</code></a> Ensure visible trace spans stay sorted by start time (<a href="https://redirect.github.com/dotnet/aspire/issues/8909">#8909</a>)</li> <li><a href="https://github.com/dotnet/aspire/commit/2b55ce1bb651e98de6386c13b2a65368c912a4e2"><code>2b55ce1</code></a> Merge pull request <a href="https://redirect.github.com/dotnet/aspire/issues/8903">#8903</a> from joperezr/FixTests</li> <li><a href="https://github.com/dotnet/aspire/commit/339673bc353a3cf412d37bff0e1807416796690a"><code>339673b</code></a> Update test files to show 9.2.1 patched version to fix tests</li> <li><a href="https://github.com/dotnet/aspire/commit/71871535ee176643992f88ad2c046109970b7ba3"><code>7187153</code></a> [release/9.2] Fixed resolving secrets for keyvault references in run mode (<a href="https://redirect.github.com/dotnet/aspire/issues/8">#8</a>...</li> <li><a href="https://github.com/dotnet/aspire/commit/8de8d4bf3019cdb0cc86a944bff9a38246623a31"><code>8de8d4b</code></a> [release/9.2] Don't fail for Azure role assignments in run mode (<a href="https://redirect.github.com/dotnet/aspire/issues/8807">#8807</a>)</li> <li><a href="https://github.com/dotnet/aspire/commit/4b42283782eef6569910b86d1c7758a0fde9915f"><code>4b42283</code></a> Merge pull request <a href="https://redirect.github.com/dotnet/aspire/issues/8864">#8864</a> from dotnet/backport/pr-8797-to-release/9.2</li> <li><a href="https://github.com/dotnet/aspire/commit/3bb6930ebe5fba117ba44d410b3a994df3b2518c"><code>3bb6930</code></a> Branding for 9.2.1</li> <li><a href="https://github.com/dotnet/aspire/commit/ef6f857e1206639c71c40e8cd3d2520593f7a835"><code>ef6f857</code></a> more tests</li> <li><a href="https://github.com/dotnet/aspire/commit/4a1aaa452c14954e613faef26ede7704cee90d47"><code>4a1aaa4</code></a> Fix AE in ExecutableResource</li> <li><a href="https://github.com/dotnet/aspire/commit/b8c8b4715e95bf5d3b72da55bcf9f2314c76d68c"><code>b8c8b47</code></a> Fix AE in ExecutableResource</li> <li>Additional commits viewable in <a href="https://github.com/dotnet/aspire/compare/v9.1.0...v9.2.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The path is wrong ### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
… effects (#11849) ### Motivation and Context Some functions and methods were using mutable objects (typically `dict`) as default argument values. In Python, default arguments are evaluated only once at the time of function definition. This can lead to unexpected behavior when the default value is modified within the function, as subsequent calls to the function may reuse the modified object. As a result, calling such functions or methods multiple times can lead to unintended behavior. Reference: [8.7. Function definitions (Official Python Documentation)](https://docs.python.org/3.12/reference/compound_stmts.html#function-definitions) > Default parameter values are evaluated from left to right when the function definition is executed. This means that the expression is evaluated once, when the function is defined, and that the same “pre-computed” value is used for each call. This is especially important to understand when a default parameter value is a mutable object, such as a list or a dictionary: if the function modifies the object (e.g. by appending an item to a list), the default parameter value is in effect modified. This is generally not what was intended. A way around this is to use None as the default, and explicitly test for it in the body of the function, e.g.: ### Description - Replaced mutable types (e.g., `dict`, `list`) used as default argument values with `None`, and properly initialized them within the function body. - Reviewed and updated the parts of the code that performed destructive modifications on the arguments, to avoid unintentionally modifying variables from the caller’s scope. - ~Added the `flake8-bugbear` rule in Ruff to detect this kind of issue.~ - ~For now, errors in `tests` and `samples` directories are ignored due to the large number of violations.~ ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
…unding for AzureAIAgent (#11850) ### Motivation and Context The AzureAIAgent streaming event path for handling streaming code output as well as both streaming and non-streaming Bing Grounding tool calls were missing in the current implementation. This PR adds handling for those two scenarios. <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description Updates to allow for proper handling of streaming code using the AzureAIAgent - code_interpreter: note that the code interpreter tool call is handled as returning `StreamingTextContent` with the `metadata` dict configured with `{"code": True}`. - bing_grounding: support for the Bing Grounding Tool is added. There is a current issue with streaming events and the Bing Grounding tool - the `requesturl` as part of the tool call is coming back empty. This issue has been raised with the appropriate team. Both streaming and non-streaming do properly return the `StreamingAnnotationContent` or `AnnotationContent` respectively. - Samples were added to show interaction with the AzureAIAgent and these tools, some also showing how to use the `on_intermediate_message` callback. - Fixes #11847 <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [X] The code builds clean without any errors or warnings - [X] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [X] All unit tests pass, and I have added new tests where possible - [X] I didn't break anyone 😄
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Our model diagnostic is outdated and needs to be updated to follow the more recent OTel GenAI Semantic Conventions. Previously, the traces would show up on Foundry's tracing UI incorrectly:  With this fix, the traces will show up correctly again:  ### Description Fix GenAI tracing <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
…#11894) Bumps [google-cloud-aiplatform](https://github.com/googleapis/python-aiplatform) from 1.89.0 to 1.91.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/googleapis/python-aiplatform/releases">google-cloud-aiplatform's releases</a>.</em></p> <blockquote> <h2>v1.91.0</h2> <h2><a href="https://github.com/googleapis/python-aiplatform/compare/v1.90.0...v1.91.0">1.91.0</a> (2025-04-30)</h2> <h3>Features</h3> <ul> <li>Add Model Garden deploy SDK documentation and use cases. (<a href="https://github.com/googleapis/python-aiplatform/commit/6eea5f4fc05444cf47609fbe4da9038d5fa6ac29">6eea5f4</a>)</li> <li>Allow setting Vertex Model Garden source model version id during model upload (<a href="https://github.com/googleapis/python-aiplatform/commit/b1bbba6f94a86fdc711c59bfc248abe544c3da09">b1bbba6</a>)</li> <li>GenAI - Add support for self-hosted OSS models in Batch Prediction. (<a href="https://github.com/googleapis/python-aiplatform/commit/c76ac624a4b708dc5980ec64eb52661eb7c8061d">c76ac62</a>)</li> <li>GenAI - Support batch prediction in Model Garden OpenModel. (<a href="https://github.com/googleapis/python-aiplatform/commit/8bf30b74828c976e315879d9a7b61cb718e1bcfe">8bf30b7</a>)</li> <li>Update upperbound for langgraph (<a href="https://github.com/googleapis/python-aiplatform/commit/547bf01410647b104c6b8134d57b8c27847558b4">547bf01</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Removing Python 3.8 support due to EOL (<a href="https://github.com/googleapis/python-aiplatform/commit/4330b2fc2860eb38986937a81f4919059775137a">4330b2f</a>)</li> </ul> <h2>v1.90.0</h2> <h2><a href="https://github.com/googleapis/python-aiplatform/compare/v1.89.0...v1.90.0">1.90.0</a> (2025-04-22)</h2> <h3>Features</h3> <ul> <li>Add <code>pydantic</code> to default required packages for agent engines (<a href="https://github.com/googleapis/python-aiplatform/commit/6960ae4fb2e3fadd755b7725859f66f29d6498b4">6960ae4</a>)</li> <li>Introduce a ModuleAgent template to Agent Engine (<a href="https://github.com/googleapis/python-aiplatform/commit/5efcd6b1d42d477220674ee7d3dc97594b02c03f">5efcd6b</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Broken import of VertexAiSessionService in AdkApp (<a href="https://github.com/googleapis/python-aiplatform/commit/b84657a97404477d93d5010e03e36a777bbbb373">b84657a</a>)</li> <li><strong>deps:</strong> Allow werkzeug 3.x (<a href="https://github.com/googleapis/python-aiplatform/commit/0cb2b93cbebdb51982e7890f7d6c565110f0b50e">0cb2b93</a>)</li> <li>Pin pydantic version lower-bound limit to 2.11.1 to fix a pydantic dependency issue. (<a href="https://github.com/googleapis/python-aiplatform/commit/a5c113022d2471e66945db45a93a762256ccaede">a5c1130</a>)</li> <li>Pin pydantic version lower-bound limit to 2.11.1 to fix a pydantic dependency issue. (<a href="https://github.com/googleapis/python-aiplatform/commit/180cbbaca017a5e0e3a082652520e9ba489b0e0b">180cbba</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/googleapis/python-aiplatform/blob/main/CHANGELOG.md">google-cloud-aiplatform's changelog</a>.</em></p> <blockquote> <h2><a href="https://github.com/googleapis/python-aiplatform/compare/v1.90.0...v1.91.0">1.91.0</a> (2025-04-30)</h2> <h3>Features</h3> <ul> <li>Add Model Garden deploy SDK documentation and use cases. (<a href="https://github.com/googleapis/python-aiplatform/commit/6eea5f4fc05444cf47609fbe4da9038d5fa6ac29">6eea5f4</a>)</li> <li>Allow setting Vertex Model Garden source model version id during model upload (<a href="https://github.com/googleapis/python-aiplatform/commit/b1bbba6f94a86fdc711c59bfc248abe544c3da09">b1bbba6</a>)</li> <li>GenAI - Add support for self-hosted OSS models in Batch Prediction. (<a href="https://github.com/googleapis/python-aiplatform/commit/c76ac624a4b708dc5980ec64eb52661eb7c8061d">c76ac62</a>)</li> <li>GenAI - Support batch prediction in Model Garden OpenModel. (<a href="https://github.com/googleapis/python-aiplatform/commit/8bf30b74828c976e315879d9a7b61cb718e1bcfe">8bf30b7</a>)</li> <li>Update upperbound for langgraph (<a href="https://github.com/googleapis/python-aiplatform/commit/547bf01410647b104c6b8134d57b8c27847558b4">547bf01</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Removing Python 3.8 support due to EOL (<a href="https://github.com/googleapis/python-aiplatform/commit/4330b2fc2860eb38986937a81f4919059775137a">4330b2f</a>)</li> </ul> <h2><a href="https://github.com/googleapis/python-aiplatform/compare/v1.89.0...v1.90.0">1.90.0</a> (2025-04-22)</h2> <h3>Features</h3> <ul> <li>Add <code>pydantic</code> to default required packages for agent engines (<a href="https://github.com/googleapis/python-aiplatform/commit/6960ae4fb2e3fadd755b7725859f66f29d6498b4">6960ae4</a>)</li> <li>Introduce a ModuleAgent template to Agent Engine (<a href="https://github.com/googleapis/python-aiplatform/commit/5efcd6b1d42d477220674ee7d3dc97594b02c03f">5efcd6b</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li>Broken import of VertexAiSessionService in AdkApp (<a href="https://github.com/googleapis/python-aiplatform/commit/b84657a97404477d93d5010e03e36a777bbbb373">b84657a</a>)</li> <li><strong>deps:</strong> Allow werkzeug 3.x (<a href="https://github.com/googleapis/python-aiplatform/commit/0cb2b93cbebdb51982e7890f7d6c565110f0b50e">0cb2b93</a>)</li> <li>Pin pydantic version lower-bound limit to 2.11.1 to fix a pydantic dependency issue. (<a href="https://github.com/googleapis/python-aiplatform/commit/a5c113022d2471e66945db45a93a762256ccaede">a5c1130</a>)</li> <li>Pin pydantic version lower-bound limit to 2.11.1 to fix a pydantic dependency issue. (<a href="https://github.com/googleapis/python-aiplatform/commit/180cbbaca017a5e0e3a082652520e9ba489b0e0b">180cbba</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/googleapis/python-aiplatform/commit/ec3bc047da721f4a88ab83199fef880620ac7afb"><code>ec3bc04</code></a> chore(main): release 1.91.0 (<a href="https://redirect.github.com/googleapis/python-aiplatform/issues/5251">#5251</a>)</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/8bf30b74828c976e315879d9a7b61cb718e1bcfe"><code>8bf30b7</code></a> feat: GenAI - Support batch prediction in Model Garden OpenModel.</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/e0a54df29ee3a8dd569047e0084e85376c034228"><code>e0a54df</code></a> chore: bump DEFAULT_PYTHON_VERSION to 3.10 in noxfile.py</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/c76ac624a4b708dc5980ec64eb52661eb7c8061d"><code>c76ac62</code></a> feat: GenAI - Add support for self-hosted OSS models in Batch Prediction.</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/b1bbba6f94a86fdc711c59bfc248abe544c3da09"><code>b1bbba6</code></a> feat: Allow setting Vertex Model Garden source model version id during model ...</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/4330b2fc2860eb38986937a81f4919059775137a"><code>4330b2f</code></a> fix: Removing Python 3.8 support due to EOL</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/547bf01410647b104c6b8134d57b8c27847558b4"><code>547bf01</code></a> feat: Update upperbound for langgraph</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/6eea5f4fc05444cf47609fbe4da9038d5fa6ac29"><code>6eea5f4</code></a> feat: Add Model Garden deploy SDK documentation and use cases.</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/e1fcfffc72a1f6d63b71cb414de3e84f1de0f53f"><code>e1fcfff</code></a> chore: Samples - Restore vector search sample for filtering and crowding</li> <li><a href="https://github.com/googleapis/python-aiplatform/commit/e6772d37baaa4dfc7f1509e116f5924fbc47d761"><code>e6772d3</code></a> chore(main): release 1.90.0 (<a href="https://redirect.github.com/googleapis/python-aiplatform/issues/5185">#5185</a>)</li> <li>Additional commits viewable in <a href="https://github.com/googleapis/python-aiplatform/compare/v1.89.0...v1.91.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> The Milvus memory store integration tests have been failing, blocking some PR merges. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> Temporarily skipping the Milvus memory store integration test. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
### Motivation and Context With the changes to support built-in embedding generation the sample became broken, so updating it to make use of built-in embedding generation correctly. #11878 ### Description Fixes for vector store rag sample. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
### Motivation, Context and Description This PR excludes the `./dotnet/samples/` and `./python/samples/` folders from being inspected by the markdown link checker because some of the links become temporarily unavailable and block PRs. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
### Motivation, Context and Description This PR removes the experimental attribute from the plugins in the plugins.core package. Contributes to: #10070
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> Porting the agent runtime to SK repo for multi-agent orchestration work. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> 1. Core runtime abstraction and in-process runtime implementation. 2. Unit tests. 3. Mark all public classes and methods experimental. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com> Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
kernel.core
kernel
Issues or pull requests impacting the core kernel
memory
.NET
Issue or Pull requests regarding .NET code
python
Pull requests for the Python Semantic Kernel
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.
Motivation and Context
Description
Contribution Checklist