### 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.
-->
Agent failure results in timeout for `OrchestrationResult`.
Fixes: https://github.com/microsoft/semantic-kernel/issues/13149
Fixes: https://github.com/microsoft/semantic-kernel/issues/13040
Fixes: https://github.com/microsoft/semantic-kernel/issues/12987
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
`AgentActor` exception being eaten by the agent-runtime and not exposed
via the `TaskCompletionSource<>` used by the `OrchestrationResult`/
### 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 😄
This PR fixes the issue when an MCP function is called with an argument
that doesn't match the expected parameter type.
From chat:
```csharp
public async Task<string> GetDataAsync(
[Description("Optional modality type filter (CT, MRI, XA, etc.). Make sure it is a LIST of strings. Examples: ['CT'] or ['CT', 'MR']")] List<string>? modalityType = null,
(...............)
```
When we tested it using Semantic Kernel without MCP, it returned the
data in the correct format. However, when we integrated it into the tool
(one API Server where we initialize the Kernel and another MCP Server
with all the functions), we get the incorrect format:
<img width="1186" height="175" alt="image"
src="https://github.com/user-attachments/assets/9efd26e2-77fc-4ec2-85ed-60a35fa9e821"
/>
This PR fixes a bug reported offline by @jeffhandley
```log
fail: Microsoft.Extensions.DataIngestion.IngestionPipeline[6]
An error occurred while ingesting document 'Example_GPS_Watch.md'.
System.InvalidCastException: Unable to cast object of type 'System.Guid' to type 'System.String'.
at System.Linq.Enumerable.CastICollectionIterator`1.MoveNext()
at Azure.Search.Documents.Models.IndexDocumentsBatch.Delete(String keyName, IEnumerable`1 keyValues)
at Azure.Search.Documents.SearchClient.DeleteDocumentsAsync(String keyName, IEnumerable`1 keyValues, IndexDocumentsOptions options, CancellationToken cancellationToken)
at Microsoft.Extensions.VectorData.VectorStoreErrorHandler.RunOperationAsync[TResult,TException](VectorStoreCollectionMetadata metadata, String operationName, Func`1 operation)
at Microsoft.Extensions.DataIngestion.VectorStoreWriter`1.WriteAsync(IAsyncEnumerable`1 chunks, CancellationToken cancellationToken)
at Microsoft.Extensions.DataIngestion.IngestionPipeline`1.IngestAsync(IngestionDocument document, Activity parentActivity, CancellationToken cancellationToken)
at Microsoft.Extensions.DataIngestion.IngestionPipeline`1.ProcessAsync(IEnumerable`1 files, Activity rootActivity, CancellationToken cancellationToken)+MoveNext()
```
---------
Co-authored-by: Shay Rojansky <[email protected]>
### Motivation and Context
Moving sample from AF to SK repos to avoid circular package reference.
### Description
- Add OpenAPI tool call migration sample to AF migration samples which
can be linked from the AF repo.
### 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 😄
---------
Co-authored-by: Copilot <[email protected]>
### 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.
-->
OTel GenAI operation names have the following updates:
1. `chat.completion` to `chat`
2. `text.completion` to `text_completion`
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
This PR updates those operation names
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation 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.
-->
1. Why is this change required?
NonInvocableTool placeholder is created without a parameters field,
which causes 422 errors when used with Mistral models via LiteLLM since
Mistral enforces stricter JSON schema validation than other AI
providers.
2. What problem does it solve?
Current Issue:
When Semantic Kernel has no invocable tools but needs to send tools to
keep the service happy, it includes the NonInvocableTool placeholder.
This lacks a parameters field, causing Mistral APIs to reject requests.
3. What scenario does it contribute to?
This fix enables SK to work with:
- Mistral cloud APIs
- Any AI provider with strict schema validation requirements
Use Cases:
Applications using Mistral as their AI provider
Enterprise applications with strict API validation requirements
4. Fixes: #13232
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Solution
Updated the NonInvocableTool creation to include a proper empty
parameters schema that satisfies Mistral's validation requirements while
maintaining backward compatibility with all other providers
Changes Made
File: src/Connectors/Connectors.OpenAI/Core/ClientCore.ChatCompletion.cs
Line 61-64: Enhanced s_nonInvocableFunctionTool with proper parameters
schema
Added: Comprehensive unit tests verifying schema structure and Mistral
compatibility
Existing Tests: All 474 OpenAI connector tests pass (1 skipped)
Integration Tests: Verified with local Mistral via Ollama + LiteLLM
Backward Compatibility: Confirmed no breaking changes with OpenAI and
other providers
Note: I 've noticed that this similar empty schema is used as a property
called `s_zeroFunctionParametersSchema` that exists at
`OpenAIFunction.cs`
### 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: Roger Barreto <[email protected]>
### Motivation and Context
1. **Why is this change required?**
Because `LocalAgentStep` was passing `KernelProcessEventData` wrappers
directly into `KernelArguments`, unlike `LocalStep` which unwraps them.
This inconsistency caused agents to receive JSON-like data instead of
the actual payload.
2. **What problem does it solve?**
It ensures that agents receive the real value (e.g. the user’s message
text) instead of the wrapper object, preventing confusing model
responses like *“you seem to be passing a json”*.
3. **What scenario does it contribute to?**
Agent-based process pipelines (for example a simple chat process where
user input is sent to an agent). The agent now correctly sees the user
input as plain text or object, improving reliability and user
experience.
### Description
This PR updates `LocalAgentStep` so that it unwraps
`KernelProcessEventData` before passing it into
`KernelArguments["message"]`.
* If `TargetEventData` is a `KernelProcessEventData`, we now call
`.ToObject()` to get the real value.
* If it is not, we keep the value as it is.
* This makes `LocalAgentStep` consistent with
`LocalStep.AssignStepFunctionParameterValues`.
With this change, agents no longer receive the wrapper object but the
actual payload (for example the plain user input), which avoids the
model interpreting it as JSON.
### Contribution Checklist
- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass
- [X] I didn't break anyone 😄
Co-authored-by: Dmytro Struk <[email protected]>
Another batch of test cleanup work - this almost concludes what I have
planned for the tests.
* We no longer create any collections with GUID names; all collections
have a manually-defined name, and are deleted when a test starts
running. This ensures that no collections are left behind if a test
crashes or is stopped in the middle, and makes it easier to examine the
database.
* Removed global SimpleRecord and SimpleFixture, each test suite now has
its own record and fixture.
* Cleaned up and renamed DistanceFunctionTests to only focus on testing
the different distance functions, and added corresponding tests
elsewhere.
* Added IndexKindTests to specifically cover different index types.
1. Why is this change required?
AuthorRole.Developer was missing from the ModelDiagnostic.RoleToEventMap
configuration.
This was causing OpenTelemetry diagnostic to throw exceptions when the
Developer role was used
2. What problem does it solve?
Fixes the dictionary so exception are no longer occurring
3. What scenario does it contribute to?
Enabling open telemetry and using developer messages
4. If it fixes an open issue, please link to the issue here.
https://github.com/microsoft/semantic-kernel/issues/13302
Add missing usage variables in GeminiMetadata class
### Motivation and Context
Gemini gives us CachedContentTokenCount and ThoughtsTokenCount to know
how much of cost have the request.
The total input as Gemini eyes is not only PromptTokenCount, but a sum
of these 3 variables.
### Description
Added CachedContentTokenCount and ThoughtsTokenCount variables, filled
by the response and add test.
**As I am beginner in C#, I can build and pass the test, also I can make
an .nupkg of the code changed, but I can't test on other projects, so
PLEASE check that before submitting changes. Thank you so much**
### 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: Rodrigo <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: Roger Barreto <[email protected]>
The main motivation here was to ensure that our infrastructure and tests
properly support binary embeddings (and more in general, non-float/half
ones).
Closes#13321
### Motivation and Context
Resolves: #13131
### Description
The Gemini connector actually already supports arbitrary base64 PDF
content by prioritising binary data in the `CreateGeminiPartFromImage`
function in the `GeminiRequest.cs`.
I kept the current behaviour with the `ImageContent` and `AudioContent`
but also added explicit support for the `BinaryContent` KernelContent
type in the `GetGeminiPartFromKernelContent` function to bring it inline
with how the other connectors work.
I applied the same Chat Completion Unit test as those I found in the
OpenAI Connector for BinaryContent.
### 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 (I think...) 😄
---------
Co-authored-by: SergeyMenshykh <[email protected]>
* Added new KeyTypeTests to cover provider key support, alongside the
existing DataTypeTests and EmbeddingTypeTests; moved all three into
TypeTests folder.
* As discussed offline, this adds Guid-as-string key support for all
providers. From research this seems to be very standard practice across
a wide range of databases: JSON-based databases generally encode various
types (e.g. DateTime) as string, and Guids are standard there. Sqlite is
similar, with Microsoft.Data.Sqlite supporting it natively. This notably
allows upper layers to assume that they can always use Guid, which helps
MEDI ([see this
issue](https://github.com/dotnet/extensions/issues/6973)).
* Per-provider notes
* Azure AI Search: string only supported, added Guid-as-string as an
option
([docs](https://learn.microsoft.com/en-us/rest/api/searchservice/data-type-map-for-indexers-in-azure-search#bkmk_sql_search)
encouraging mapping Guid to strings)
* MongoDB/CosmosMongoDB: Added int and long support (Guid was already
supported).
* CosmosNoSql: Added Guid-as-string (standard practice)
* Pinecone: Added Guid-as-string
* Redis: Added Guid-as-string
* SQL Server: removed DateTime and `byte[]` as key types (as above) and
added Guid.
* SQLite: The Microsoft.Data.Sqlite (the low-level ADO.NET provider
we're built on top of) supports GUIDs as TEXT; so it's really not us
deciding to support - it's the lower-level driver. In addition, we
support mapping boolean to INTEGER (1/0), which seems similar. Added
support as data property as well, not just key.
Closes#11784Closes#12182
### 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.
-->
Using synchronous `WaitAll` creates extra CPU load at scale.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Use asynchronous `WhenAny` with timeout for modern .NET and using
`Delay` task for .netstandard.
### 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 😄
This is an (almost) entirely test-only cleanup (I plan to do a bit more
later).
* Remove BasicQueryTests, rename BasicFilterTests to FilterTests and
move out to the root
* BasicFilterTests and BasicQueryTests both run the same filter
scenarios, the former via SearchAsync and the latter via filtering
GetAsync. Although in theory, some filter query construct could work in
one but not in the other, in practice no such example exists in the 12
providers we have (all databases use the same filter language/engine for
both APIs. So we had needless duplication for all the various test
exceptions/customizations, which had to be overridden in exactly the
same way in both test suites.
* At least for now, decided to remove BasicQueryTests as it adds
maintenance burden without any real coverage; coverage (included missing
coverage) specifically for filtered GetAsync was added separately (e.g.
we weren't testing ordering, skip/take with filtered get).
* If we do want to add back support for all query constructs (I'd want
to have a good reason to do so), I'd do that within FilterTests: just
like each scenario already exercises both static and dynamic models, it
could run GetAsync as well.
* Renamed CollectionConformanceTests to CollecitonManagementTests and
moved it out to the root.
* In general, this PR removes "Conformance" from the test type names.
* Big cleanup/refactor of all the so-called CRUD tests.
* We now have a ModelTests folder with a test suite for each different
model; BasicModelTests covers Get/Upsert/Delete (and their batching
variants) for the basic scenario (strongly-typed model with data
properties and a single vector property). Alongside that we have
DynamicModelTests, NoDataModelTests, NoVectorModelTests (I'll be added
MultipleVectorsModelTests).
* These tests no longer use random GUIDs for the collection name
(difficult to debug, the collection never gets cleaned up if the test
crashes/is stopped in the middle), but rather has fixed names per test
suite.
* The collection is created once per test suite, but cleared and
reseeded between each test run, providing full isolation (previously we
had no isolation, and documented each record in the seed data as
belonging to this scenario or that - which is brittle).
* Many other small improvements and cleanup.
Part of #12507
### Motivation and Context
1. Why is this change required?
It appears that there's a quirk to how Gemini handles tool call results
in it's API. The tool responses need to be present in the same chat item
as the tool requests - rather than adding them individually as separate
chat history items.
2. What problem does it solve?
This _appears_ to fix (at least in my use case) the error whereby you
receive:
```
{
"error": {
"code": 400,
"message": "Please ensure that the number of function response parts is equal to the number of function call parts of the function call turn.",
"status": "INVALID_ARGUMENT"
}
}
```
4. Which appears to happen when an SK response auto invokes > 1 tool.
When it's a single tool result the API appears to handle the response
gracefully.
5. https://github.com/microsoft/semantic-kernel/issues/12823
6. https://github.com/microsoft/semantic-kernel/issues/12528
-->
### Description
Google Gemini expects the function responses to be grouped together in a
single message rather than split across multiple separate messages with
role "function". By adding a batch tool result overload to the
GeminiChatMessage we can correctly parse the multiple parts of the
function call into their respective function parts.
### 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 😄
FYI @stephentoub (As I see you're working in the Gemini connector
recently)
---------
Co-authored-by: Roger Barreto <[email protected]>
### Motivation and Context
1. Why is this change required?
When using AddOpenAIChatClient with a custom endpoint parameter but
without providing a custom httpClient, the code would create an
HttpClient without setting its BaseAddress property. This mismatch
between the HttpClient configuration and the
OpenAIClientOptions.Endpoint setting causes SSL/TLS handshake failures.
2. What problem does it solve?
This PR fixes the SSL connection error
(System.ClientModel.ClientResultException: The SSL connection could not
be established) that occurs when users call:
```
var kernel = Kernel.CreateBuilder()
.AddOpenAIChatClient(
modelId: "model-name",
apiKey: "api-key",
endpoint: new Uri("https://custom-endpoint.com")
)
.Build();
```
3. What scenario does it contribute to?
This enables users to easily connect to OpenAI-compatible endpoints
(such as Azure OpenAI, local LLM servers, or other OpenAI-compatible
APIs) without having to manually create and configure an HttpClient
instance.
Fixes SSL connection failures when using custom endpoints with the
default HttpClient.
4. Related Issue:
https://github.com/microsoft/semantic-kernel/issues/13183
### Description
Changes made:
Fixed invalid GetOpenAIClientOptions call in the first overload (lines
40-77):
Removed the unused GetOpenAIClientOptions call at lines 56-59
Added missing endpoint and orgId parameters to the
GetOpenAIClientOptions call used in OpenAIClient construction
Fixed SSL issue in the third overload with custom endpoint (lines
125-170):
Added logic to ensure the HttpClient has the correct BaseAddress when
using a custom endpoint
When no custom httpClient is provided and the default client has no
BaseAddress, creates a new HttpClient with BaseAddress set to the
provided endpoint
This ensures consistency between the HttpClient.BaseAddress and
OpenAIClientOptions.Endpoint, preventing SSL certificate validation
failures
Verified AddOpenAIEmbeddingGenerator methods:
Confirmed both overloads are correctly implemented with no similar
issues
The root cause was that HttpClientPipelineTransport uses the HttpClient
for making requests, but when the HttpClient.BaseAddress is null and the
endpoint is only set in OpenAIClientOptions.Endpoint, the SSL/TLS
handshake fails due to hostname mismatch during certificate validation.
The fix ensures that when a custom endpoint is provided, the HttpClient
is properly configured with the matching BaseAddress, allowing SSL/TLS
to validate the certificate correctly.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [V ] The code builds clean without any errors or warnings
- [ V] 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
- [V ] All unit tests pass, and I have added new tests where possible
- [V ] I didn't break anyone 😄
---------
Co-authored-by: Roger Barreto <[email protected]>
Co-authored-by: westey <[email protected]>
Update SqlClient to 6.1.2 and use the new `SqlVector<float>` type, which
allows efficient binary encoding of vector data (rather than the
previous JSON-basd transfer).
Closes#12220
/cc @yorek
This makes the provider filters compatible with C# 14 (see #12504, and
https://github.com/dotnet/runtime/issues/109757 on the runtime side).
Note that this changes the entire repo to build with dotnet SDK 10.0
(rc2) - that's probably a good idea regardless to test with the latest,
ensure compatibility etc. (but if this is problematic, let me know -
it's only truly necessary for test coverage and can be reverted).
I'm not happy to have the implementation duplicated across the
implementations: we have FilterTranslationPreprocessor for common LINQ
filter preprocessing, and that would be the ideal place for this.
However, rewriting MemoryExtensions.Contains to Enumerable.Contains
would require doing MethodInfo.MakeGenericMethod which is incompatible
with NativeAOT. I considered have a fake, non-invocable MethodInfo
implementation to represent the closed generic MethodInfo to
Enumerable.Contains (MethodInfo and Type are abstract, so we can create
custom implementations compatible with NativeAOT), but that's quite
involved/complicated. The better story here is probably to have a base
class implementation for the provider filter processors, which
recognizes specific patterns and dispatches to abstract handlers which
specific implementations override; it would take care of recognizing the
various Contains variants.
Note also that we already have duplication around Enumerable.Contains
and List.Contains (the instance method), so this just adds another
variant (for now). I'll think about cleaning this up.
Fixes#12504
### 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.
-->
SK .Net is missing two attributes to the `execute_tool` span:
`gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Add those two attributes to the span if sensitive data is turned on.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
### Motivation and Context
Resolvesmicrosoft/semantic-kernel#12916
While the repo already includes an `OpenAIRealtime` demo, this sample
shows how **Semantic Kernel** can power a classic, production-style
voice pipeline:
**VAD → STT → Chat (SK) → TTS → Speaker**
This is an end-to-end console app that:
- **Uses voice activity detection (VAD)** to skip silence, reducing
unnecessary API calls and latency.
- **Uses TPL Dataflow** for structured, asynchronous message passing and
backpressure, making the flow easier to extend or integrate.
- **Streams responses end-to-end**, so the user hears audio as the LLM
generates text.
- **Runs entirely in a console**, no additional UI frameworks required.
This makes the sample representative of real-world voice-agent
architecture while remaining minimal and easy to run. Please note that
demo is x64 due Web RTC VAD (WebRtcVadSharp) package.
---------
Co-authored-by: Andrew Syrov <[email protected]>
Co-authored-by: Roger Barreto <[email protected]>
### Motivation and Context
#13254
### Description
- Fix two bugs related to duplicate text output, one for final text and
the other for function results.
### 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 😄
---------
Co-authored-by: Roger Barreto <[email protected]>
### Motivation and Context
#12734
Redis alpine produces a different error message for not found indices to
redis stack.
### Description
- Support CollectionExistsAsync with redis alpine
### 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 😄
- [x] Analyze the repository structure and understand the issue
- [x] Review OpenAIPromptExecutionSettings implementation as reference
- [x] Build and test the current Ollama connector
- [x] Add Clone() method to OllamaPromptExecutionSettings
- [x] Add Freeze() method to OllamaPromptExecutionSettings
- [x] Change Stop property type from List<string> to IList<string> for
consistency with OpenAI
- [x] Add comprehensive tests for Clone() method
- [x] Add test for Freeze() method
- [x] Add ServiceId property to Clone() method (code review feedback)
- [x] Add test to verify ServiceId is cloned correctly
- [x] Build and test to verify all changes work correctly
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>.Net: Bug: OllamaPromptExecutionSettings Clone() method
does not clone Ollama specific settings</issue_title>
> <issue_description>**Describe the bug**
> Calling `Clone()` on `OllamaPromptExecutionSettings` instance returns
`PromptExecutionSettings` with Temperature, TopK, TopP and MaxTokens
settings lost
>
> **To Reproduce**
> ```c#
> var testSettings = new OllamaPromptExecutionSettings { Temperature =
(float)temperature, TopP = (float)topP };
>
> // Throws `InvalidCastExeception` always as testSettings is of
`PromptExecutionSettings` type.
> // Additionally, testSettings do not contain temperature or topP
parameter values (nothing in ExtensionData either)
> var result = (OllamaPromptExecutionSettings) testSettings.Clone();
> ```
>
> **Expected behavior**
> Object is cloned correctly like in OpenAI provider
>
> **Platform**
> - Language: C#
> - Source: 1.65.0
> - AI model: Ollama qwen3:32b
> - IDE: Visual Studio
> - OS: Windows
>
> **Additional context**
>
> I think it should work like `OpenAIPromptExecutionSettings`, where all
information is properly Cloned.
> </issue_description>
>
> <agent_instructions>Add the following methods to
`OllamaPromptExecutionSettings.cs`
> 1. `Clone`
> 2. `FromExecutionSettings`
>
> Use the implementations in `OpenAIPromptExecutionSettings.cs` as
examples for how the methods should be implemented.</agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
Fixesmicrosoft/semantic-kernel#13217
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: markwallace-microsoft <[email protected]>
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation 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 😄fixes#13193
### 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.
-->
Extra and affects downstream tests.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Looks left-over.
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
Some GenAI contents are not serialized correctly.
<img width="495" height="305" alt="image"
src="https://github.com/user-attachments/assets/371136f5-c195-49ee-bc85-e957652739ab"
/>
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Fix serialization.
After the fix:
<img width="487" height="357" alt="image"
src="https://github.com/user-attachments/assets/5b519b34-4873-4781-a7e8-bfb8b817606d"
/>
### 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 😄
This mechanism should really be done in a polymorphic way so as to
enable the derived PromptExecutionSettings to control how the
ChatOptions is configured. But for now, this can be extended to
recognize known names of instructions.
Fixes https://github.com/microsoft/semantic-kernel/issues/13150
---------
Co-authored-by: SergeyMenshykh <[email protected]>
Co-authored-by: SergeyMenshykh <[email protected]>
### 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 😄
### Motivation and Context
When using negative dot product scoring, the more negative the value,
the closer the vector is to the query vector.
### Description
Fixed the sorting used for negative dot product distance calculations
### Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
---------
Co-authored-by: westey <[email protected]>