Commit Graph
1182 Commits
Author SHA1 Message Date
Evan Mattson 265130743d Python: Bump Python version to 1.37.1 for a release. (#13314)
### Motivation and Context

Bump Python version to 1.37.1 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.37.1 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 😄
2025-10-30 15:38:50 +09:00
9962d434ab Python: Fixed sending "text" parameter to OpenAI Responses API (#13280)
## Summary

Fixed an issue where the `text` parameter was missing in requests to the
OpenAI Responses API.

## Changes Made

Modified the `ResponsesAgentThreadActions._generate_options()` method to
correctly handle the `text` parameter:

  - Added to the options dictionary **only** if `text` is not `None`.
  - Not added if it is an empty dict (the default value).
- This ensures that **only explicitly set `text` parameters** are sent
to the API.

## Fix Location

**File:**
`semantic_kernel/agents/open_ai/responses_agent_thread_actions.py`

**Before:**

```python
options = {
    "model": merged.get("model"),
    "top_p": merged.get("top_p"),
    "temperature": merged.get("temperature"),
    "truncation": truncation,
    "metadata": merged.get("metadata"),
    "max_output_tokens": max_output_tokens,
    "parallel_tool_calls": parallel_tool_calls,
}
```

**After:**

```python
options = {
    "model": merged.get("model"),
    "top_p": merged.get("top_p"),
    "temperature": merged.get("temperature"),
    "truncation": truncation,
    "metadata": merged.get("metadata"),
    "max_output_tokens": max_output_tokens,
    "parallel_tool_calls": parallel_tool_calls,
}

# Add text option if it exists
if merged.get("text") is not None:
    options["text"] = merged.get("text")
```

- Closes #13281

### 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: Copilot <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2025-10-30 06:20:13 +00:00
Evan Mattson 05d659d6e9 Python: Fix non-string KernelArguments being converted to strings in prompt template function calls (#13292)
### Motivation and Context

Fixes #13199 - Non-string kernel arguments are now preserved when passed
to functions in prompt templates. Adds unit tests.

<!-- 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.
-->

### 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 😄
2025-10-30 06:11:35 +00:00
1f8fea2b49 Python: Fix ai connector integration tests (#13311)
### 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.
-->
Vertex AI and Bedrock integration tests have been failing.


### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. This PR fixes the vertex ai integration tests by upgrading the Google
AI SDK version.
2. This PR fixes the Bedrock integration tests by upgrading the models.


### 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: Copilot <[email protected]>
Co-authored-by: moonbox3 <[email protected]>
2025-10-30 04:22:14 +00:00
Evan Mattson cf9a5f21f7 Python: Fix onnx pkg by pinning. Pin openai < 2.0. (#13284)
### Motivation and Context

For the latest onnxruntime 1.23.2 pkg: our GitHub Actions run is failing
because uv is not matching the macOS wheel tag.
Pinning to last-known-good until it's sorted out.

- Pin openai pkg < 2.0 until we can investigate if 2.0 brings in other
breaking changes.

### 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 😄
2025-10-24 11:23:08 +09:00
Taylor Rockey e73446e86e Python: [Python] Updated Agents SDK version to latest for CopilotStudio connector (#13144)
### 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?
- The Agents SDK has been released, and the recent release changed the
namespace from `microsoft.agents` to `microsoft_agents`, which breaks
imports.
  2. What problem does it solve?
- This updates the `pyproject.toml` and copilot studio related files to
fix the imports
  3. What scenario does it contribute to?
      - Using a Copilot Studio agent as an Agent in Semantic Kernel
  4. If it fixes an open issue, please link to the issue here.
      - N/A
-->

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

- Updated pyproject.toml to use the released packages for the Agents
SDK.
- Updated imports in the `copilot_studio_agent` related files to use the
new `microsoft_agents` namespace

### 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 😄
2025-09-23 01:01:51 +00:00
Tao Chen d455a20033 .Net & Python: Add tool definitions to agent invoke span (#13153)
### 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 current GenAI Semantic Conventions have changed since the last time
we modified the `agent_invoke` span.

Previous PRs: #12940, #12928, #12834

### Description
The following changes were made:
1. `gen_ai.agent.invocation_input` -> `gen_ai.input.messages`
2. `gen_ai.agent.invocation_output` -> `gen_ai.output.messages`
3. Add `gen_ai.tool.definitions`

.Net:
<img width="2056" height="459" alt="image"
src="https://github.com/user-attachments/assets/533b8e08-7674-4c70-bdbe-ba3600855b20"
/>

Python:
<img width="1323" height="659" alt="image"
src="https://github.com/user-attachments/assets/702171ac-dc0b-4187-933d-dad77f2719df"
/>


<!-- 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 😄
2025-09-22 17:09:44 +00:00
Evan Mattson 28ea2f4df8 Python: Fix AzureAIAgent readme links (#13138)
### Motivation and Context

Current getting started with agents README links for AzureAIAgent are
broken.

<!-- 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

- Fixes #13129

<!-- 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 😄
2025-09-17 04:40:38 +00:00
Evan Mattson cc71ebfafa Python: Bump Python version to 1.37.0 for a release. (#13127)
### Motivation and Context

Bump Python version to 1.37.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.37.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 😄
2025-09-16 08:58:37 +09:00
Soumili Nandi 61d3e6ee8d Python: Introduce NvidiaChatCompletion AI Connector (#12952)
### 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?
Enables developers to use NVIDIA's chat models through Semantic Kernel
with structured output support.
  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.
-->
This change adds chat completion support with structured output to the
existing NVIDIA connector, enabling developers to use NVIDIA's chat
models through Semantic Kernel while building conversational AI
applications that require structured, validated responses. The connector
will support more model types iteratively, with future PRs introducing
VLM models and additional capabilities.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

- New Chat Completion Service:
`NvidiaChatCompletion`: Chat completion service following same structure
as other connectors
- Extends existing NVIDIA embedding connector patterns and architecture
- Custom logic for handling structured output specific to NVIDIA models
  
- Enhanced Configuration:
`NvidiaChatPromptExecutionSettings`: Chat-specific settings following
existing connector patterns
### 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 😄
2025-09-15 23:26:38 +00:00
Evan Mattson d8af1ed633 Python: Safely clone plugins (#13109)
### Motivation and Context

Currently, we attempt to deep copy plugins, no matter what the plugin
instance holds. This will cause issues when plugins contain unpickleable
items like an async generator.

<!-- 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

- Closes #12819

<!-- 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 😄
2025-09-12 00:25:07 +00:00
1404a72bce Python: Fix Cosmos DB NoSQL vector search functionality (issue #13028) (#13055)
## Summary
Fixes vector search functionality in Cosmos DB NoSQL connector that was
failing with syntax errors and "One of the input values is invalid"
errors.

## Changes
- Fixed VectorDistance function call to use correct 2-parameter syntax
instead of 4 parameters
- Removed RANK keyword from ORDER BY clause to fix SQL syntax error
- Removed distance function parameter setting as it should be configured
in vector index, not query
- Added proper handling for empty where clauses

## Testing
- Verified fix resolves the syntax errors reported in issue #13028
- Vector search functionality now works correctly with existing
collections

Fixes #13028

---------

Co-authored-by: Jian Wang <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2025-09-11 05:21:58 +00:00
Evan Mattson 652575a97a Python: Bump Python version to 1.36.2 for a release (#13067)
### Motivation and Context

Bump Python version to 1.36.2 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.36.2 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 😄
2025-09-04 11:24:45 +09:00
Evan Mattson 22ff5f844f Python: Fix responses agent kernel args bug (#13056)
### Motivation and Context

The `arguments: KernelArguments` are not getting handled properly for
the Responses Agent invoke. Use the provided `arguments` instead of
trying to get them from the kwargs.

<!-- 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

- Closes #13053
- Adds unit test coverage. 

<!-- 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 😄
2025-09-04 01:27:27 +00:00
Tao Chen d7db35dc47 Python: Fix Azure AI Inference connector model_extras duplication (#13066)
### 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.
-->
Addresses #13005 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Remove the `extra_parameters` key from
`AzureAIInferenceChatPromptExecutionSettings` before calling the chat
completion API to avoid unknown parameter error.
2. Allow setting the API version on the `AzureAIInferenceXXX`
connectors.

### 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 😄
2025-09-04 01:27:19 +00:00
Evan Mattson 06d6494ae9 Python: Don't return code output via on_intermediate_msg callback (#13058)
### Motivation and Context

Current, while using an OpenAIAssistantAgent, we are returning code
output via the on_intermediate_message callback. This shouldn't be
happening right now, as all other agents return code via TextContent
with a metadata `{"code": True}` key-value pair in the dictionary.

<!-- 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

- Closes #12956

<!-- 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 😄
2025-09-04 01:13:53 +00:00
dependabot[bot] c61af1a255 Python: Update pymongo requirement from <4.14,>=4.8.0 to >=4.8.0,<4.15 in /python (#12921)
Updates the requirements on
[pymongo](https://github.com/mongodb/mongo-python-driver) to permit the
latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/releases">pymongo's
releases</a>.</em></p>
<blockquote>
<h2>PyMongo 4.14.0</h2>
<p>Community notes: <a
href="https://www.mongodb.com/community/forums/t/pymongo-4-14-released/326906">https://www.mongodb.com/community/forums/t/pymongo-4-14-released/326906</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst">pymongo's
changelog</a>.</em></p>
<blockquote>
<h2>Changes in Version 4.14.0 (2025/08/06)</h2>
<p>.. warning:: PyMongo 4.14 drops support for MongoDB 4.0. PyMongo now
supports
MongoDB 4.2+.</p>
<p>PyMongo 4.14 brings a number of changes including:</p>
<ul>
<li>
<p>Dropped support for MongoDB 4.0.</p>
</li>
<li>
<p>Added preliminary support for Python 3.14 and 3.14 with
free-threading. We do
not yet support the following with Python 3.14:</p>
<ul>
<li>Subinterpreters (<code>concurrent.interpreters</code>)</li>
<li>Free-threading with Encryption</li>
<li>mod_wsgi</li>
</ul>
</li>
<li>
<p>Removed experimental support for free-threading support in Python
3.13.</p>
</li>
<li>
<p>Added :attr:<code>bson.codec_options.TypeRegistry.codecs</code> and
:attr:<code>bson.codec_options.TypeRegistry.fallback_encoder</code>
properties
to allow users to directly access the type codecs and fallback encoder
for a
given :class:<code>bson.codec_options.TypeRegistry</code>.</p>
</li>
<li>
<p>Added

:meth:<code>pymongo.asynchronous.mongo_client.AsyncMongoClient.append_metadata</code>
and
:meth:<code>pymongo.mongo_client.MongoClient.append_metadata</code> to
allow instantiated
MongoClients to send client metadata on-demand</p>
</li>
<li>
<p>Improved performance of selecting a server with the Primary
selector.</p>
</li>
<li>
<p>Introduces a minor breaking change. When encoding
:class:<code>bson.binary.BinaryVector</code>, a <code>ValueError</code>
will be raised if the
'padding' metadata field is &lt; 0 or &gt; 7, or non-zero for any type
other than
PACKED_BIT.</p>
</li>
<li>
<p>Changed :meth:<code>~pymongo.uri_parser.parse_uri</code>'s
<code>options</code> return value to be
type <code>dict</code> instead of
<code>_CaseInsensitiveDictionary</code>.</p>
</li>
</ul>
<h2>Changes in Version 4.13.2 (2025/06/17)</h2>
<p>Version 4.13.2 is a bug fix release.</p>
<ul>
<li>Fixed a bug where <code>AsyncMongoClient</code> would block the
event loop while creating new connections,
potentially significantly increasing latency for ongoing
operations.</li>
</ul>
<p>Issues Resolved
...............</p>
<p>See the <code>PyMongo 4.13.2 release notes in JIRA</code>_ for the
list of resolved issues
in this release.</p>
<p>.. _PyMongo 4.13.2 release notes in JIRA: <a
href="https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=43937">https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&amp;version=43937</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/6354d6cae770d765dd536eeaace13088dc09b993"><code>6354d6c</code></a>
Prepare 4.14.0 release (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2458">#2458</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/d7074ba9eedc8db2efa9e1929d63f3258b6320bd"><code>d7074ba</code></a>
PYTHON-5454 &amp; PYTHON-5455 Add preliminary python 3.14 support (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2451">#2451</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/d11cf20452fbf6418f1612607260faf3ae18753c"><code>d11cf20</code></a>
Fix In-Use Encryption examples (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2457">#2457</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/baec1e05f7005dc8a5979028ba5aac74256e3a3e"><code>baec1e0</code></a>
Bump pyright from 1.1.392.post0 to 1.1.403 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2455">#2455</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/003ff56cbcecaa4860e14403b342967f5ee1336f"><code>003ff56</code></a>
Bump the actions group with 2 updates (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2454">#2454</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/cbe1b9e81b62f5a63f83694336fcf466126ce830"><code>cbe1b9e</code></a>
Update coverage requirement from &lt;=7.5,&gt;=5 to &gt;=5,&lt;=7.10.2
(<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2453">#2453</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/0249a08201529346024d191c7cc098365375d5e8"><code>0249a08</code></a>
Bump mypy from 1.14.1 to 1.17.1 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2452">#2452</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/bfaab82e2644a9d6867626cff08c1ff7d30517a3"><code>bfaab82</code></a>
[Spec Resync] 07-28-2025 (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2447">#2447</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/9f64dad6871bd13e359c56698810e93f5a1173be"><code>9f64dad</code></a>
PYTHON-5473 - Better test assertions for booleans (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2450">#2450</a>)</li>
<li><a
href="https://github.com/mongodb/mongo-python-driver/commit/9514a6727022d602cfd87bf74ebccd21023252dd"><code>9514a67</code></a>
PYTHON-5441 - Unskip gridfs download chunk tests (<a
href="https://redirect.github.com/mongodb/mongo-python-driver/issues/2449">#2449</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/mongodb/mongo-python-driver/compare/4.8.0...4.14.0">compare
view</a></li>
</ul>
</details>
<br />


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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-04 00:35:13 +00:00
0x-fangandTao Chen f1aac84b51 Python: Add framework name into UserAgent header for bedrock integration (#12901)
### Motivation and Context

This PR adds the framework name into User-Agent header of Bedrock API
call, so it can be used to collect the usage.

### Description

Updated integration with Amazon Bedrock services to include the
framework name `semantic-kernel` into the User-Agent header field for
Bedrock API call for improved client identification. No changes to
user-facing features or workflows. Similar change had been made to other
framework such as
[langchain](https://github.com/langchain-ai/langchain-aws/pull/558)

### 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: Tao Chen <[email protected]>
2025-09-03 17:34:08 +00:00
Ajeet VermaandTao Chen ea564cf04f Python: docs(typing): add return type and docstring to store_results in utils/chat.py (#12910)
## Summary
- Added explicit return type `-> ChatHistory` to `store_results`.
- Added detailed docstring explaining parameters, return type, and
behavior.

## Why
- Improves static analysis, IDE support, and code readability.
- Makes the function self-documenting for new contributors.

## Testing
- No changes to runtime behavior.
- Existing test suite passes locally.

### 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: -->

- [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: Tao Chen <[email protected]>
2025-09-03 17:28:27 +00:00
dependabot[bot] e110472edd Python: Update pymilvus requirement from <2.6,>=2.3 to >=2.3,<2.7 in /python (#12918)
Updates the requirements on
[pymilvus](https://github.com/milvus-io/pymilvus) to permit the latest
version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/milvus-io/pymilvus/releases">pymilvus's
releases</a>.</em></p>
<blockquote>
<h2>PyMilvus v2.6.0 Release Notes</h2>
<h2>New Features</h2>
<ol>
<li>Add APIs in MilvusClient</li>
</ol>
<ul>
<li>enhance: add describe and alter database in MilvusClient by <a
href="https://github.com/smellthemoon"><code>@​smellthemoon</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2433">milvus-io/pymilvus#2433</a></li>
<li>enhance: support milvus-client iterator by <a
href="https://github.com/MrPresent-Han"><code>@​MrPresent-Han</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2461">milvus-io/pymilvus#2461</a></li>
<li>enhance: Enable resource group api in milvus client by <a
href="https://github.com/weiliu1031"><code>@​weiliu1031</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2513">milvus-io/pymilvus#2513</a></li>
<li>enhance: add release_collection, drop_index, create_partition,
drop_partition, load_partition and release_partition by <a
href="https://github.com/brcarry"><code>@​brcarry</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2525">milvus-io/pymilvus#2525</a></li>
<li>enhance: enable describe_replica api in milvus client by <a
href="https://github.com/weiliu1031"><code>@​weiliu1031</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2541">milvus-io/pymilvus#2541</a></li>
<li>enhance: support recalls for milvus_client by <a
href="https://github.com/chasingegg"><code>@​chasingegg</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2552">milvus-io/pymilvus#2552</a></li>
<li>enhance: add use_database by <a
href="https://github.com/czs007"><code>@​czs007</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2491">milvus-io/pymilvus#2491</a></li>
</ul>
<ol start="2">
<li>Add AsyncMilvusClient</li>
</ol>
<ul>
<li>[FEAT] Asyncio support by <a
href="https://github.com/brcarry"><code>@​brcarry</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2411">milvus-io/pymilvus#2411</a></li>
<li>Add async DDL funcs &amp; DDL examples by <a
href="https://github.com/Shawnzheng011019"><code>@​Shawnzheng011019</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2852">milvus-io/pymilvus#2852</a></li>
</ul>
<ol start="3">
<li>Other features</li>
</ol>
<ul>
<li>enhance: support Int8Vector by <a
href="https://github.com/cydrain"><code>@​cydrain</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2611">milvus-io/pymilvus#2611</a></li>
<li>feat: support recalls field in SearchResult by <a
href="https://github.com/chasingegg"><code>@​chasingegg</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2390">milvus-io/pymilvus#2390</a></li>
<li>enhance: Support Python3.13 and upgrade grpcio range by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2684">milvus-io/pymilvus#2684</a></li>
<li>enhance: support run analyzer return detail token by <a
href="https://github.com/aoiasd"><code>@​aoiasd</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2679">milvus-io/pymilvus#2679</a></li>
<li>enhance: Add force_drop parameter to drop_role method for role
deletion by <a href="https://github.com/SimFG"><code>@​SimFG</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2705">milvus-io/pymilvus#2705</a></li>
<li>enhance: add property func for AnalyzeToken by <a
href="https://github.com/aoiasd"><code>@​aoiasd</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2704">milvus-io/pymilvus#2704</a></li>
<li>enhance: grant/revoke v2 optional db and collection params by <a
href="https://github.com/shaoting-huang"><code>@​shaoting-huang</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2386">milvus-io/pymilvus#2386</a></li>
<li>extend unlimted offset for query iterator(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2418">#2418</a>)
by <a
href="https://github.com/MrPresent-Han"><code>@​MrPresent-Han</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2419">milvus-io/pymilvus#2419</a></li>
<li>enhance: alterindex &amp; altercollection supports altering
properties by <a
href="https://github.com/JsDove"><code>@​JsDove</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2406">milvus-io/pymilvus#2406</a></li>
<li>enhance: alterdatabase support delete property by <a
href="https://github.com/JsDove"><code>@​JsDove</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2435">milvus-io/pymilvus#2435</a></li>
<li>enhance: support hints param by <a
href="https://github.com/chasingegg"><code>@​chasingegg</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2408">milvus-io/pymilvus#2408</a></li>
<li>enhance: create database support properties by <a
href="https://github.com/JsDove"><code>@​JsDove</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2448">milvus-io/pymilvus#2448</a></li>
<li>enhance: Add <code>db_name</code> parameter at
<code>bulk_import</code> by <a
href="https://github.com/counter2015"><code>@​counter2015</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2446">milvus-io/pymilvus#2446</a></li>
<li>enhance: add search iterator v2 by <a
href="https://github.com/PwzXxm"><code>@​PwzXxm</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2395">milvus-io/pymilvus#2395</a></li>
<li>enhance: simplify the structure of search_params by <a
href="https://github.com/smellthemoon"><code>@​smellthemoon</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2507">milvus-io/pymilvus#2507</a></li>
<li>enhance: Remove long deprecated Milvus class by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2544">milvus-io/pymilvus#2544</a></li>
<li>enhance: Use new model pkg by <a
href="https://github.com/junjiejiangjjj"><code>@​junjiejiangjjj</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2595">milvus-io/pymilvus#2595</a></li>
<li>enhance: Add schema update time verification to insert and upsert to
use cache by <a
href="https://github.com/JsDove"><code>@​JsDove</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2551">milvus-io/pymilvus#2551</a></li>
<li>enhance: describecollection output add created_timestamp by <a
href="https://github.com/JsDove"><code>@​JsDove</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2618">milvus-io/pymilvus#2618</a></li>
<li>feat: add external filter func for search iterator v2 by <a
href="https://github.com/PwzXxm"><code>@​PwzXxm</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2639">milvus-io/pymilvus#2639</a></li>
<li>enhance: support run analyzer by <a
href="https://github.com/aoiasd"><code>@​aoiasd</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2622">milvus-io/pymilvus#2622</a></li>
<li>weighted reranker to allow skip score normalization by <a
href="https://github.com/zhengbuqian"><code>@​zhengbuqian</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2708">milvus-io/pymilvus#2708</a></li>
<li>enhance: Support AddCollectionField API by <a
href="https://github.com/congqixia"><code>@​congqixia</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2722">milvus-io/pymilvus#2722</a></li>
<li>Add 1-Way and 2-Way TLS Support to Bulk Import Functions by <a
href="https://github.com/abd-770"><code>@​abd-770</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2672">milvus-io/pymilvus#2672</a></li>
<li>enhance: Use SearchResult in MilvusClient by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2735">milvus-io/pymilvus#2735</a></li>
<li>Support rerank by <a
href="https://github.com/junjiejiangjjj"><code>@​junjiejiangjjj</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2729">milvus-io/pymilvus#2729</a></li>
<li>feat: suppoprt multi analyzer params by <a
href="https://github.com/aoiasd"><code>@​aoiasd</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2747">milvus-io/pymilvus#2747</a></li>
<li>Add funciton checker by <a
href="https://github.com/junjiejiangjjj"><code>@​junjiejiangjjj</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2760">milvus-io/pymilvus#2760</a></li>
<li>enhance: Support run analyzer by collection and field by <a
href="https://github.com/aoiasd"><code>@​aoiasd</code></a> in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2822">milvus-io/pymilvus#2822</a></li>
<li>feat: support load collection/partition with priority(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2835">#2835</a>)
by <a
href="https://github.com/MrPresent-Han"><code>@​MrPresent-Han</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2836">milvus-io/pymilvus#2836</a></li>
<li>enhance: optimize perf for large topk(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2848">#2848</a>)
by <a
href="https://github.com/MrPresent-Han"><code>@​MrPresent-Han</code></a>
in <a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2849">milvus-io/pymilvus#2849</a></li>
<li>enhance: Add usage guide to manage MilvusClient by <a
href="https://github.com/XuanYang-cn"><code>@​XuanYang-cn</code></a> in
<a
href="https://redirect.github.com/milvus-io/pymilvus/pull/2907">milvus-io/pymilvus#2907</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/1e56ce7d3159883108fb581d820572c1ab9a4c11"><code>1e56ce7</code></a>
enhance: Update milvus-proto and readme (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2921">#2921</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/75052b1b7cada14585eed4e7d7aa68ac2f541306"><code>75052b1</code></a>
enhance: Add usage guide to manage MilvusClient (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2907">#2907</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/9f44053086002d782cf7f81576a7a0f2bcc9f5ad"><code>9f44053</code></a>
add example code for language identifier and multi analyzer (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2919">#2919</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/058836de26f84c4c9e82490e3ef76a6a122b8dff"><code>058836d</code></a>
fix: Return new pk value for upsert when autoid=true (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2914">#2914</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/bbc6777565694dc2d6479177c5d2136256d332a9"><code>bbc6777</code></a>
[cherry-pick] Compatible with the default behavior of free on the cloud
(<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2913">#2913</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/45080c39c59b5dbc8a5766d8afb9c08bba8d3896"><code>45080c3</code></a>
fix: Aviod coping functions when init CollectionSchema (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2902">#2902</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/52b8461c5bee1466c4678f3bc029a9cda4422bd0"><code>52b8461</code></a>
[cherry-pick] bulk_import add stageName/dataPaths parameter (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2905">#2905</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/a8c3120622290d429dc3b12ece643248dc2f5d76"><code>a8c3120</code></a>
[cherry-pick] support stage (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2895">#2895</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/3653effa88a8af263690ca88b53dc529da3082fb"><code>3653eff</code></a>
fix: Tidy alias configs when connect fails (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2900">#2900</a>)</li>
<li><a
href="https://github.com/milvus-io/pymilvus/commit/728791a7de7d6eb0a4201ba755ea0675bb6976a0"><code>728791a</code></a>
enhance: Store alias before wait for ready (<a
href="https://redirect.github.com/milvus-io/pymilvus/issues/2894">#2894</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/milvus-io/pymilvus/compare/v2.3.0...v2.6.0">compare
view</a></li>
</ul>
</details>
<br />


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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 17:07:53 +00:00
dependabot[bot] 2db2aa1bb9 Python: Bump torch from 2.7.1 to 2.8.0 in /python (#12919)
Bumps [torch](https://github.com/pytorch/pytorch) from 2.7.1 to 2.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytorch/pytorch/releases">torch's
releases</a>.</em></p>
<blockquote>
<h1>PyTorch 2.8.0 Release Notes</h1>
<ul>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#highlights">Highlights</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#backwards-incompatible-changes">Backwards
Incompatible Changes</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#deprecations">Deprecations</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#new-features">New
Features</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#improvements">Improvements</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#bug-fixes">Bug
fixes</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#performance">Performance</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#documentation">Documentation</a></li>
<li><a
href="https://github.com/pytorch/pytorch/blob/HEAD/#developers">Developers</a></li>
</ul>
<h1>Highlights</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytorch/pytorch/commit/ba56102387ef21a3b04b357e5b183d48f0afefc7"><code>ba56102</code></a>
Cherrypick: Add the RunLLM widget to the website (<a
href="https://redirect.github.com/pytorch/pytorch/issues/159592">#159592</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/c525a02c89217181b5731d8043c7309a84e84066"><code>c525a02</code></a>
[dynamo, docs] cherry pick torch.compile programming model docs into 2.8
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/15">#15</a>...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/a1cb3cc05d46d198467bebbb6e8fba50a325d4e7"><code>a1cb3cc</code></a>
[Release Only] Remove nvshmem from list of preload libraries (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158925">#158925</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/c76b2356bc31654de2af0c98cce1bef291f06f89"><code>c76b235</code></a>
Move out super large one off foreach_copy test (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158880">#158880</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/20a0e225a01d4ebbffd44a6a59acff628359c772"><code>20a0e22</code></a>
Revert &quot;[Dynamo] Allow inlining into AO quantization modules (<a
href="https://redirect.github.com/pytorch/pytorch/issues/152934">#152934</a>)&quot;
(<a
href="https://redirect.github.com/pytorch/pytorch/issues/158">#158</a>...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/9167ac8c75481e2beb3746aa37b7f48a213c631e"><code>9167ac8</code></a>
[MPS] Switch Cholesky decomp to column wise (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158237">#158237</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/5534685c62399db8d1e51b47e2dcbc17deaab230"><code>5534685</code></a>
[MPS] Reimplement <code>tri[ul]</code> as Metal shaders (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158867">#158867</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/d19e08d74b2a27e661bf57a9015014b757e8ea31"><code>d19e08d</code></a>
Cherry pick PR 158746 (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158801">#158801</a>)</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/a6c044ab9aa14f0864c6a572f7c023432511c5ea"><code>a6c044a</code></a>
[cherry-pick] Unify torch.tensor and torch.ops.aten.scalar_tensor
behavior (#...</li>
<li><a
href="https://github.com/pytorch/pytorch/commit/620ebd0646252bbb22524f5c252ec7e9ab977bee"><code>620ebd0</code></a>
[Dynamo] Use proper sources for constructing dataclass defaults (<a
href="https://redirect.github.com/pytorch/pytorch/issues/158689">#158689</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytorch/pytorch/compare/v2.7.1...v2.8.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=torch&package-manager=pip&previous-version=2.7.1&new-version=2.8.0)](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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 17:07:16 +00:00
da8ca43064 Python: fix (openai): only propagate usage metadata for final streaming chunk without choices (#12977)
### Motivation and Context

1. Why is this change required?
- The previous condition copied usage metadata whenever chunk.usage
existed, which could incorrectly propagate usage into chunks that
already contained choices.

2. What problem does it solve?
- Prevents incorrect propagation of usage metadata that can cause empty
messages or duplicated metadata when a streaming chunk contains choices
plus usage.

3. What scenario does it contribute to?
- Streaming OpenAI chat responses where the API may send a final
usage-only chunk (no choices) to report usage stats.

4. If it fixes an open issue, please link to the issue here.
   - No linked issue.

### Description

- File modified:
-
python/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py

- Change summary:
- In
OpenAIChatCompletionBase._inner_get_streaming_chat_message_contents,
    replace:
      if chunk.usage is not None
    with:
      if len(chunk.choices) == 0 and chunk.usage is not None

- Design notes:
- This is a minimal, targeted fix to ensure usage metadata is only
copied when the streaming chunk contains no choices (typical for the
final usage-only chunk).
  - Behavior of other streaming logic is unchanged.
  - Recommend adding unit tests covering:
- A chunk that contains choices and usage (should not propagate usage).
- A usage-only final chunk (should propagate usage to the synthesized
choice).

### Contribution Checklist

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the SK Contribution Guidelines and formatting
script raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

Files changed:
-
python/semantic_kernel/connectors/ai/open_ai/services/open_ai_chat_completion_base.py

---------

Co-authored-by: chentiantian <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2025-09-03 16:35:54 +00:00
Evan Mattson 4e9ea78390 Python: Bump Python version to 1.36.1 for a release (#13049)
### Motivation and Context

Bump Python version to 1.36.1 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.36.1 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 😄
2025-09-02 11:38:35 +09:00
Evan Mattson f7fdfcd9a9 Python: Add AzureAIAgent Deep Research Tool support (#13034)
### Motivation and Context

The deep research tool was introduced for the AzureAIAgent; however, we
didn't have support yet in SK. Adding support now for using the deep
research tool for both streaming and non-streaming. Samples added as
well.

<!-- 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 deep research tool.
- Add samples with notes on prerequisites to configure the sample to run
properly.
- Added support for `AZURE_AI_AGENT_DEEP_RESEARCH_MODEL` env var within
`AzureAIAgentSettings` class.
- Bumped min allowed `azure-ai-agents` package ver to 1.2.0b3.
- Closes #12978

<!-- 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 😄
2025-09-01 02:35:56 +00:00
Evan Mattson 86b10b95d2 Python: provide AzureAIAgent thread msg id during streaming (#13032)
### Motivation and Context

As part of invoking an AzureAIAgent via streaming, we weren't providing
the `thread_id` via the `AgentStreamEvent.THREAD_MESSAGE_CREATED` event.

<!-- 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

Supply the caller with the `thread_msg_id` by sticking it into the
returned SCMC's `metadata` dictionary.
- Closes #12959

Sample output looks like:

```
Sample Output:

# User: 'Hello'
# AuthorRole.ASSISTANT: (thread message id: msg_HZ2h4Wzbj7GEcnVCjnyEuYWT) Hello! How can I assist you with 
    the menu today?
# User: 'What is the special soup?'
# AuthorRole.ASSISTANT: (thread message id: msg_TSjkJK6hHJojIkPvF6uUofHD) The special soup today is 
    Clam Chowder. Would you like to know more about it or anything else from the menu?
# User: 'How much does that cost?'
# AuthorRole.ASSISTANT: (thread message id: msg_liwTpBFrB9JpCM1oM9EXKiwq) The Clam Chowder costs $9.99. 
    Is there anything else you'd like to know?
# User: 'Thank you'
# AuthorRole.ASSISTANT: (thread message id: msg_K6lpR3gYIHethXq17T6gJcxi) You're welcome! 
    If you have any more questions or need assistance, feel free to ask. Enjoy your meal!
```

<!-- 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 😄
2025-08-30 10:05:55 +00:00
5e50e190c4 Python: Add reasoning support for OpenAI Responses Agents (GPT-5, o4-mini, o3) (#12881)
## Summary

Adds reasoning capabilities to Python OpenAI ResponsesAgent, bringing
parity with the C# implementation. This enables fine-grained control
over reasoning effort for O-series models (o1, o3-mini, o4-mini) and
gpt-5 that support the reasoning parameter.

Fixes #12843

## Changes

### Core Implementation
- **`openai_responses_agent.py`**: Added reasoning configuration support
  - Constructor-level reasoning effort setting
  - Per-invocation reasoning effort override capability
  - Proper parameter validation and model compatibility checks
- **`responses_agent_thread_actions.py`**: Extended thread actions to
support reasoning parameters
  - Reasoning effort propagation through thread operations
  - Metadata preservation for reasoning tokens and summaries

### Sample and Tests
- **`responses_agent_reasoning.py`**: Comprehensive demonstration sample
  - Constructor vs per-invocation reasoning configuration
  - Function calling integration with reasoning
  - Reasoning comparison scenarios (low/medium/high effort)
  - Error handling and troubleshooting guidance
- **`test_openai_responses_agent_reasoning.py`**: Full unit test
coverage
  - Parameter validation tests
  - Integration scenarios with function calling
  - Edge cases and error conditions

## Features

✅ **Constructor-Level Reasoning**: Set default reasoning effort when
creating agents
✅ **Per-Invocation Override**: Override reasoning effort per request  
✅ **Priority Hierarchy**: per-invocation > constructor > model default  
✅ **Function Calling Compatible**: Works seamlessly with existing plugin
system
✅ **Azure OpenAI & OpenAI Support**: Compatible with both service
providers
✅ **Model Validation**: Automatic compatibility checks for O-series
models nad GÜT-5
✅ **Metadata Access**: Reasoning tokens and summaries available in
response metadata

## Usage Example

```python
# Constructor-level reasoning
# Constructor-level reasoning configuration
agent = AzureResponsesAgent(
    ai_model_id="gpt-5",
    client=client,
    reasoning={"effort": "low"}  # Default reasoning for all requests
)

# Per-invocation override
response = await agent.invoke(
    "Solve this complex problem step by step",
    reasoning={"effort": "high"}  
)


# Invoke with reasoning callback to capture intermediate thoughts
response = await agent.invoke(
    "Analyze this data step by step",
    reasoning={"effort": "high", "summary": "detailed"},
    on_intermediate_message=handle_reasoning_message
)

# Streaming with reasoning
async for response in agent.invoke_stream(
    "Explain quantum computing in detail",
    reasoning={"effort": "high", "summary": "detailed"},
    on_intermediate_message=handle_reasoning_message
):
    print(response.content, end="", flush=True)

---------

Co-authored-by: Evan Mattson <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2025-08-28 23:25:26 +00:00
ふぁーandEvan Mattson d3318adfc2 Python: Add container_id and filename fields to AnnotationContent class (#12985)
### Motivation and Context

I confirmed that Code Interpreter can run via Azure Responses API in
Semantic Kernel, but I found two issues: an error occurs when a file is
created inside the Code Interpreter, and the response lacks parameters
required to access the created file.

### Description

#### Bug 1: ValidationError for AnnotationContent

Semantic Kernel uses the following enum for
`AnnotationContent.content_type`:

```python
@experimental
class CitationType(str, Enum):
    """Citation type."""

    URL_CITATION = "url_citation"
    FILE_PATH = "file_path"
    FILE_CITATION = "file_citation"
```

However, the Responses API returns file citations with a `type` like
this:

```json
{"container_id": "cntr_68a6c50135d88190b6fdc062051155b50847ddec73d3be1b", "end_index": 94, "file_id": "cfile_68a6c67a7fcc8190889d7e1789d485e2", "filename": "sample.txt", "start_index": 66, "type": "container_file_citation"}
```

There is no matching enum member on the Semantic Kernel side. The
`CitationType` should include `CONTAINER_FILE_CITATION`, for example:

```python
@experimental
class CitationType(str, Enum):
    """Citation type."""

    URL_CITATION = "url_citation"
    FILE_PATH = "file_path"
    FILE_CITATION = "file_citation"
    CONTAINER_FILE_CITATION = "container_file_citation"
```

#### Bug 2: Missing parameters to access generated files

The response returned by the agent shows a `file_id`, but lacks the
`container_id` and `filename` required to download the file (the
filename is needed to replace `sandbox:/mnt/data/sample.txt`):

Example call:

```python
r = await agent.get_response(cast(list, history.messages), thread=thread)
print(r.content.items)
```

Example output:

```python
[
  TextContent(inner_content=None, ai_model_id=None, metadata={}, content_type='text', text='<user_prompt>', encoding=None),
  TextContent(inner_content=None, ai_model_id=None, metadata={}, content_type='text', text='<assistant_message>\n\n[sample.txt](sandbox:/mnt/data/sample.txt)', encoding=None), 
  AnnotationContent(inner_content=None, ai_model_id=None, metadata={}, content_type='annotation', file_id='cfile_68a6c67a7fcc8190889d7e1789d485e2', quote=None, start_index=88, end_index=116, url=None, title=None, citation_type=<CitationType.CONTAINER_FILE_CITATION: 'container_file_citation'>)
]
```

To include these values in the parsed result, `AnnotationContent` in
`semantic_kernel/contents/annotation_content.py` should expose
`container_id` and `filename`, and map the incoming `type` to
`citation_type`. Example suggested structure:

```python
@experimental
class AnnotationContent(KernelContent):
    """Annotation content."""

    content_type: Literal[ContentTypes.ANNOTATION_CONTENT] = Field(ANNOTATION_CONTENT_TAG, init=False)  # type: ignore
    tag: ClassVar[str] = ANNOTATION_CONTENT_TAG
    file_id: str | None = None
    quote: str | None = None
    start_index: int | None = None
    end_index: int | None = None
    url: str | None = None
    title: str | None = None
    # added
    container_id: str | None = None
    filename: str | None = None
    citation_type: CitationType | None = Field(None, alias="type")

    model_config = ConfigDict(
        extra="ignore",
        populate_by_name=True,
    )

    def __str__(self) -> str:
        ...

    def to_element(self) -> Element:
        ...

    @classmethod
    def from_element(cls: type[_T], element: Element) -> _T:
        ...

    def to_dict(self) -> dict[str, Any]:
        ...
```

Summary: add the missing enum value `container_file_citation` and extend
`AnnotationContent` to include `container_id` and `filename` (and map
`type` to `citation_type`) so file references returned by the Azure
Responses API are fully usable.

#### Code

```python
client: AsyncAzureOpenAI = AsyncAzureOpenAI(
    base_url=urljoin(server_settings.AZURE_OPENAI_COMPLETION_ENDPOINT.rstrip("/") + "/", "openai/v1/"),
    api_key=server_settings.AZURE_OPENAI_COMPLETION_API_KEY,
    api_version="preview",
)

async def run(history: ChatHistory) -> dict[str, Any]:
    with open("sample.txt", "rb") as fp:
        f = await client.files.create(file=fp, purpose="assistants")

    agent = AzureResponsesAgent(
        ai_model_id=server_settings.AZURE_OPENAI_COMPLETION_DEPLOYMENT_NAME,
        client=client,
        name="name",
        function_choice_behavior=FunctionChoiceBehavior.Required(),
        tools=[
            CodeInterpreter(
                type="code_interpreter",
                container=CodeInterpreterContainerCodeInterpreterToolAuto(type="auto", file_ids=[f.id]),
            )
        ],
    )

    thread = ResponsesAgentThread(client, history, previous_response_id=None, enable_store=True)
    r = await agent.get_response(cast(list, history.messages), thread=thread)
    print(thread.id, r.content.items)

    annotation_content = [item for item in r.content.items if isinstance(item, AnnotationContent)]

    for ac in annotation_content:
        print(ac.file_id, ac.filename, ac.container_id)
```

### 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: Evan Mattson <[email protected]>
2025-08-28 00:01:39 +00:00
Evan Mattson 1179122a5e Python: Bump Python version to 1.36.0 for a release. (#13014)
### Motivation and Context

Bump Python version to 1.36.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.36.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 😄
2025-08-26 22:09:17 -07:00
Dmytro Struk 18d9a8e8b2 Python: .Net: Updated encoding logic in prompt templates (#12983)
### 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.
-->

Resolves: https://github.com/microsoft/semantic-kernel/issues/11821

Today, the encoding of template arguments is performed only if argument
type is `string`. In case of custom type, anonymous type or collection -
the encoding is not performed.

This PR contains changes to throw an exception in case if encoding is
enabled but complex type is used. In case of complex type, the encoding
should be performed manually according to business logic and automatic
encoding should be explicitly disabled.

This enforces stricter, but more secure template rendering rules.

**Note**: this is a breaking change for customers who use Handlebars or
Liquid template with complex type arguments. Code changes are required
when initializing template arguments:
```diff
var arguments = new KernelArguments()
{
    { "customer", new
        {
-             firstName = userInput.FirstName,
-             lastName = userInput.LastName,
+             firstName = HttpUtility.HtmlEncode(userInput.FirstName),
+             lastName = HttpUtility.HtmlEncode(userInput.LastName),
        }
    }
};

var templateFactory = new LiquidPromptTemplateFactory();
var promptTemplateConfig = new PromptTemplateConfig()
{
    TemplateFormat = "liquid"
+   InputVariables = new()
+   {
+       // We set AllowDangerouslySetContent to 'true' because each property of this argument is encoded manually. 
+       new() { Name = "customer", AllowDangerouslySetContent = true },
+   }
};

var promptTemplate = templateFactory.Create(promptTemplateConfig);
var renderedPrompt = await promptTemplate.RenderAsync(kernel, arguments); 
```

### 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 😄
2025-08-26 22:09:00 -07:00
Dmytro Struk 2a47ba9b7d Python: Removed usage of DefaultAzureCredential (#12964)
### 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 usage of `DefaultAzureCredential` by default is unsafe and raises
security issues. Instead, users should provide their own credential
types such as `AzureCliCredential`, `ManagedIdentityCredential` and so
on. More information here:

https://learn.microsoft.com/en-us/python/api/azure-identity/azure.identity.aio?view=azure-python

In this PR:
1. Removed the usage of `DefaultAzureCredential` from authentication
logic.
2. Replaced `DefaultAzureCredential` with `AzureCliCredential` in all
examples.

**Note**: this is breaking change for Azure users, who relies on
`DefaultAzureCredential`. Users will need to update the code and pass
the credential type of their choice by using `credential` parameter when
initializing one of the Azure clients.

Before:
```python
chat_completion = AzureChatCompletion()
```

After:
```python
chat_completion = AzureChatCompletion(credential=AzureCliCredential())
```

### 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 😄
2025-08-25 18:29:13 +00:00
Evan Mattson 96bad5ceac Python: Update MCP streamable sample (#12950)
### Motivation and Context

The MCPStreamableHttpPlugin concept sample pointing to GitHub isn't
working. Updating it to use the Microsoft Learn site MCP server instead.

<!-- 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

Update sample.

<!-- 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 😄
2025-08-14 15:13:10 +00:00
45fe60545c Python: Fix issue with orphaned tool/tool_calls (#12923)
### Motivation and Context

Tool/tool_calls are getting orphaned.

Issue : https://github.com/microsoft/semantic-kernel/issues/12708

How to reproduce :

```python
from semantic_kernel.contents import (
    AuthorRole,
    ChatMessageContent,
    FunctionCallContent,
    FunctionResultContent,
    ChatHistoryTruncationReducer,
)

messages = [
    ChatMessageContent(role=AuthorRole.SYSTEM, content="sys"),
    ChatMessageContent(role=AuthorRole.USER, content="user A"),
    ChatMessageContent(
        role=AuthorRole.ASSISTANT,
        items=[
            FunctionCallContent(
                id="123", function_name="search", plugin_name="plugin", arguments={"q": "x"}
            )
        ],
    ),
    ChatMessageContent(
        role=AuthorRole.TOOL,
        items=[
            FunctionResultContent(
                id="123", function_name="search", plugin_name="plugin", result="RESULT"
            )
        ],
    ),
    ChatMessageContent(role=AuthorRole.USER, content="user B"),
    ChatMessageContent(role=AuthorRole.ASSISTANT, content="done"),
]

reducer = ChatHistoryTruncationReducer(target_count=3, threshold_count=0)
reducer.messages = messages

print("Before reduce:", [m.role for m in reducer.messages])
await reducer.reduce()
print("After reduce:", [m.role for m in reducer.messages])

# After reduce: [<AuthorRole.TOOL: 'tool'>, <AuthorRole.USER: 'user'>, <AuthorRole.ASSISTANT: 'assistant'>]
```

### Description

Move backward as long as we are in a tool/tool_call island when reducing
the messages.

---------

Co-authored-by: Allaoua Benchikh <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2025-08-14 00:23:04 +00:00
Evan Mattson 09fb007bb1 Python: Bump Python version to 1.35.3 for a release (#12945)
### Motivation and Context

Bump Python version to 1.35.3 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.35.3 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 😄
2025-08-14 09:17:46 +09:00
Tao Chen 6416c58b90 Python: Add arguments and results attributes to execute tool span (#12940)
### 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 adding two new attributes to the execute tool span according to
this proposal to Otel Semantic Conventions:
https://github.com/open-telemetry/semantic-conventions/pull/2528

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
The following two attributes are added to the `execute_tool` span:
1. `gen_ai.tool.call.arguments`
2. `gen_ai.tool.call.result`

### 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 😄
2025-08-13 23:35:42 +00:00
Evan Mattson 40734345dc Python: Fix the Responses agent msg chaining with reasoning models (#12907)
### Motivation and Context

When running a reasoning model with the OpenAI responses agent, it was
producing 400s due to the way we were either including or not including
FCC related to tool calls. This PR fixes it for both the default
(store_enabled=True) and the case where uses don't want to use OpenAI's
previous response id as a pseudo-thread (store_enabled=False).

<!-- 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

- Closes #12843

<!-- 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 😄
2025-08-13 10:35:38 +00:00
SergeyMenshykh c11d5e4a06 .Net: Exclude folders having docs with not reachable links (#12924)
Exclude folders with documents containing unreachable links and remove
files that were previously excluded because the links they contained
have become reachable.
2025-08-12 09:17:53 +00:00
Evan Mattson d4e0278330 Python: Bump Python version to 1.35.2 for a release (#12894)
### Motivation and Context

Bump Python version to 1.35.2 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.35.2 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 😄
2025-08-08 01:14:45 +00:00
Mehdi MoshtaghiandEvan Mattson 73ad6e8923 Python: Fix: Implement __deepcopy__ on KernelFunction to handle non-serializable OTEL metrics (#12803)
### Description

This PR fixes TypeError: cannot pickle '_thread.RLock' object which
occurs when kernel.clone() is called while OpenTelemetry metrics are
enabled.

-   Fixes: #12802

### Motivation and Context

When using features like `HandoffOrchestration`, the agent's `Kernel` is
cloned. This process uses `copy.deepcopy`, which fails on the
`KernelFunction`'s OpenTelemetry `Histogram` fields
(`invocation_duration_histogram` and `streaming_duration_histogram`).
These histogram objects contain thread locks, making them
non-serializable.

Previous solutions, like the one in **PR #9292**, used
`Field(exclude=True, default_factory=...)`. While that was a necessary
step, it was insufficient because `deepcopy` does not respect the
`exclude` flag in the same way that Pydantic's serialization does. This
bug blocks the use of certain agentic features in any application that
has metrics-based observability enabled.

### Description of the change

This solution introduces a custom __deepcopy__ method to the
KernelFunction Pydantic model. This method correctly handles the
deep-copying process for KernelFunction instances:

1.  It intercepts the deepcopy call for KernelFunction objects.
2. It uses self.model_copy(deep=False) to create a new instance of the
Pydantic model. Using deep=False allows the default_factory for the
histogram fields to create new, clean instances on the copied object,
while other fields are shallow-copied.
3. It then manually deep-copies all other attributes from the original
object to the new one, ensuring that any other mutable objects (like
metadata`) are correctly duplicated. The histogram fields are explicitly
skipped in this step, as they have already been recreated by
`model_copy.
4. Standard deepcopy memoization is used to prevent infinite recursion
in the case of cyclic object graphs.

This approach ensures that the non-serializable fields are
re-initialized instead of copied, resolving the TypeError while
maintaining the integrity of the cloned object.

### How has this been tested?

The fix was validated using the reproduction steps outlined in the
associated issue. Running an agent orchestration that triggers
kernel.clone() with OpenTelemetry metrics enabled now completes
successfully without any errors.

### 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: Evan Mattson <[email protected]>
2025-08-07 22:48:43 +00:00
Eduard van Valkenburg a6b5f34d9b Python: fix parsing of types in mcp server (#12871)
### 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 parsing of tool call output was not working correctly, this fixes
that.
Solves #12850 

### 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 😄
2025-08-07 21:49:37 +00:00
dependabot[bot]andEvan Mattson 433b2874b7 Python: Update boto3 requirement from <1.40.0,>=1.36.4 to >=1.36.4,<1.41.0 in /python (#12857)
Updates the requirements on [boto3](https://github.com/boto/boto3) to
permit the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/boto/boto3/commit/ad48a219e467d13a50f6ffeeec5191d75c454ea7"><code>ad48a21</code></a>
Merge branch 'release-1.40.2'</li>
<li><a
href="https://github.com/boto/boto3/commit/0a92fe40bf86d48a5e8dd7ee6b06fcfbae52b597"><code>0a92fe4</code></a>
Bumping version to 1.40.2</li>
<li><a
href="https://github.com/boto/boto3/commit/b1d3cd4e4b46ade160224ad589e9918f5da84ca8"><code>b1d3cd4</code></a>
Add changelog entries from botocore</li>
<li><a
href="https://github.com/boto/boto3/commit/72d9a28a0c79ff7966226855593a366a40076d74"><code>72d9a28</code></a>
Merge branch 'release-1.40.1'</li>
<li><a
href="https://github.com/boto/boto3/commit/1c32a227314c9d8fa38baa9e0da5d373cf61683f"><code>1c32a22</code></a>
Merge branch 'release-1.40.1' into develop</li>
<li><a
href="https://github.com/boto/boto3/commit/a3ffa6102045e1ec958c7e9548105339b2c195b9"><code>a3ffa61</code></a>
Bumping version to 1.40.1</li>
<li><a
href="https://github.com/boto/boto3/commit/c643766d437bc994f2d94966fa9dd3bc39662402"><code>c643766</code></a>
Add changelog entries from botocore</li>
<li><a
href="https://github.com/boto/boto3/commit/e2fb47b057930792b8bfe192063207b8c4794395"><code>e2fb47b</code></a>
Merge branch 'release-1.40.0'</li>
<li><a
href="https://github.com/boto/boto3/commit/e19cb9fbb32d6187d731fecf374de5ac2b851ce0"><code>e19cb9f</code></a>
Merge branch 'release-1.40.0' into develop</li>
<li><a
href="https://github.com/boto/boto3/commit/9e895ba0a527098909b07b98412f0fb962a3466b"><code>9e895ba</code></a>
Bumping version to 1.40.0</li>
<li>Additional commits viewable in <a
href="https://github.com/boto/boto3/compare/1.36.4...1.40.2">compare
view</a></li>
</ul>
</details>
<br />


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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2025-08-06 02:42:11 +00:00
Evan Mattson 91392a77e0 Python: Fix ResponsesAgent image duplication in chat history preparation (#12859)
### Motivation and Context

The ResponsesAgent is duplicating messages in chat history preparation
when messages contained multiple content items (text + images). The
`response_inputs.append()` call is inside the content processing loop,
causing each message to be added once per content item.

The fix:
- Moved `response_inputs.append()` outside the content processing loop
- Added unit test to verify multiple images don't get duplicated

<!-- 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

- Fixed loop placement in `_prepare_chat_history_for_request`
- Added test `test_prepare_chat_history_multiple_images_no_duplication`
- Fixes #12848

<!-- 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 😄
2025-08-05 14:58:35 +00:00
Evan Mattson 58c3c4d27f Python: Bump Python version to 1.35.1 for a release. (#12856)
### Motivation and Context

Bump Python version to 1.35.1 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.35.1 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 😄
2025-08-05 11:09:38 +09:00
dependabot[bot]andEvan Mattson 7300b843c1 Python: Update pyarrow requirement from <21.0,>=12.0 to >=12.0,<22.0 in /python (#12836)
Updates the requirements on [pyarrow](https://github.com/apache/arrow)
to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/apache/arrow/releases">pyarrow's
releases</a>.</em></p>
<blockquote>
<h2>Apache Arrow 21.0.0</h2>
<p>Release Notes URL: <a
href="https://arrow.apache.org/release/21.0.0.html">https://arrow.apache.org/release/21.0.0.html</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/apache/arrow/commit/ee4d09ebef61c663c1efbfa4c18e518a03b798be"><code>ee4d09e</code></a>
MINOR: [Release] Update versions for 21.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/f13a5796008e3a5e546af1a7b2be0fbd3c148c26"><code>f13a579</code></a>
MINOR: [Release] Update .deb/.rpm changelogs for 21.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/6fd2a167e0ed74dbe4c059e579a561fcc2aae11f"><code>6fd2a16</code></a>
MINOR: [Release] Update CHANGELOG.md for 21.0.0</li>
<li><a
href="https://github.com/apache/arrow/commit/cf261bf58ae74a1f7fa99d81c201ca8e1d679c9b"><code>cf261bf</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47078">GH-47078</a>:
[Release] Ensure using cloned apache/arrow for reproducible check
(...</li>
<li><a
href="https://github.com/apache/arrow/commit/ddbc3dc005dfdde5a79d42cb5953190479b12b73"><code>ddbc3dc</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47074">GH-47074</a>:
[Release] Use reproducible mtime for csharp/ in source archive (<a
href="https://redirect.github.com/apache/arrow/issues/47">#47</a>...</li>
<li><a
href="https://github.com/apache/arrow/commit/0534eb2d279f445ac67b99a22eca344484749b6f"><code>0534eb2</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47071">GH-47071</a>:
[Release] Dereference all hard links in source archive (<a
href="https://redirect.github.com/apache/arrow/issues/47072">#47072</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/f845b4184664aee522f7fd73864d3093e84b6580"><code>f845b41</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47069">GH-47069</a>:
[Release] Add missing &quot;needs: target&quot; (<a
href="https://redirect.github.com/apache/arrow/issues/47070">#47070</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/1c08f8ee6947bd2a9bffb441af946c6a7373015b"><code>1c08f8e</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47067">GH-47067</a>:
[Release] Fix wrong GitHub Actions context in verify_rc.yml (<a
href="https://redirect.github.com/apache/arrow/issues/47068">#47068</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/70e5c51e6d5de1ca6f669b47ff0b98e1075336d0"><code>70e5c51</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47065">GH-47065</a>:
[Release] Fix timeout key in verify_rc.yml (<a
href="https://redirect.github.com/apache/arrow/issues/47066">#47066</a>)</li>
<li><a
href="https://github.com/apache/arrow/commit/254a85c8bddb52eef03d623882836717f027061d"><code>254a85c</code></a>
<a
href="https://redirect.github.com/apache/arrow/issues/47063">GH-47063</a>:
[Release] Define missing RELEASE_TARBALL (<a
href="https://redirect.github.com/apache/arrow/issues/47064">#47064</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/apache/arrow/compare/go/v12.0.0...apache-arrow-21.0.0">compare
view</a></li>
</ul>
</details>
<br />


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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evan Mattson <[email protected]>
2025-08-05 01:33:57 +00:00
Tao ChenandDmytro Struk 8336c320d9 Python: Add bedrock model provider parameter (#12853)
### 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.
-->
Fixes #12833 

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Add an optional setting to the Bedrock AI connectors to allow users to
specify the Bedrock model providers (i.e. amazon, anthropic, etc) so
that they can use application inference profiles.


### 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: Dmytro Struk <[email protected]>
2025-08-05 00:43:00 +00:00
Evan Mattson 1198b573d1 Python: Add ability to specify encoding when adding a plugin. Add tests. (#12797)
### Motivation and Context

Right now when adding a plugin, we don't allow one to specify the type
of encoding used.

<!-- 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

Allow configuration for the type of encoding used.
- Adds unit tests
- Closes #12440

<!-- 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 😄
2025-08-04 22:00:30 +00:00
Evan Mattson e5972e2430 Python: Add incomplete details reason to AzureAIAgent error message (#12796)
### Motivation and Context

When errors occur processing a run of an AzureAIAgent, we surface the
error message but not the incomplete_details reason if it exists.

<!-- 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

This PR adds handling for the incomplete details reason, if it exists,
so it can be passed back via the error message.
- Closes #12752

<!-- 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 😄
2025-08-04 21:59:19 +00:00
Tao ChenandEvan Mattson b7bb2832aa Python: Input & output attributes in invoke_agent span (#12834)
### 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 OTel workgroup has been thinking about enhancing tracing for agents.
This is a proposal from our tracing team:
https://github.com/open-telemetry/semantic-conventions/pull/2528. This
PR implements part of the proposal so that when the proposal gets
merged, we can quickly follow.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Two new attributes are added to the `invoke_agent` span, namely the
`gen_ai.agent.invocation_input` and `gen_ai.agent.invocation_output`.

<img width="747" height="583" alt="image"
src="https://github.com/user-attachments/assets/d8b81f68-915b-48ee-8f86-66a0d4f686cc"
/>


### 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: Evan Mattson <[email protected]>
2025-08-04 21:54:45 +00:00
Tao ChenandChris 358b0f343b Python: .Net: Magentic orchestration to return the last agent message when limits reached (#12839)
### 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.
-->
Related to #12687
Related to #12656 

Currently, the Magentic orchestration returns a static message if the
max reset limit or the max invocation limit is reached.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Return the last agent response if either of the limit is reached.

### 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: Chris <[email protected]>
2025-08-04 18:17:44 +00:00
Nava-7andEvan Mattson c16db27622 Python: Update README.md (#12737)
Update links due to renamed files

### 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: -->

- [x] 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
- [x] I didn't break anyone 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2025-08-04 07:22:25 +00:00
Evan Mattson 30391ade09 Python: AzureAI Agent int test update to pass (#12849)
### Motivation and Context

The AzureAI Agent code interpreter is failing when asking it to use the
code interpreter to create bar charts. Updating the unit test so that it
uses the code interpreter and doesn't fail/block.

<!-- 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

Update integration test while trying to understand the root cause of the
failure.

<!-- 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 😄
2025-08-04 15:51:41 +09:00