Commit Graph
2562 Commits
Author SHA1 Message Date
westey 27971e118b .Net: Sk release version 2026 04 27 (#13929)
### 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 😄
2026-04-29 11:14:15 +00:00
westey c8e3cd0d74 .Net: Upgrade dependencies (#13927)
### 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 😄
2026-04-28 15:38:22 +00:00
SergeyMenshykhandCopilot 95b1bf85d8 .Net: Harden AllowedBaseUrls validation in RestApiOperationRunner (#13910)
### Motivation and Context

Improved the URL validation logic in
`RestApiOperationRunner.ValidateUrl()` to ensure stricter matching when
checking request URLs against configured `AllowedBaseUrls`. The previous
implementation could match unintended URLs in certain edge cases
involving path-prefixed base URLs.

### Description

Strengthened the base URL comparison to enforce proper path-boundary
matching, preventing URLs outside the intended allowed scope from
passing validation.

### Changes

- **`RestApiOperationRunner.cs`**: Tightened the base URL matching logic
in `ValidateUrl` to enforce path-boundary alignment.
- **`RestApiOperationRunnerTests.cs`**: Added two new tests to verify
the stricter validation behavior and confirm legitimate sub-paths remain
allowed.

### Risk

Low — the fix tightens existing validation without changing the public
API surface. All URL validation tests pass.

Co-authored-by: Copilot <[email protected]>
2026-04-23 08:20:41 +00:00
westey 84ab8221c7 .Net: Validate step types (#13901)
### 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 😄
2026-04-21 14:59:00 +00:00
westey ba37e8e49b .Net: Add backslash escaping to redis text search values (#13902)
### Motivation and Context

### Description

- Add backslash escaping to redis text search values

### 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 😄
2026-04-21 14:17:31 +00:00
Shay RojanskyandCopilot bf1b19c84c .Net: Fix single-quote escaping in OBJECT_ID and dynamic SQL string literals (#13900)
In the SQL Server MEVD provider, table/schema/column names embedded
inside SQL string literals (`N'...'`) were not escaping single quotes.
This could produce broken SQL when names contain single quotes.

For example, a table named `it's` would generate:
```sql
IF OBJECT_ID(N'[dbo].[it's]', N'U') IS NULL
```
which is invalid SQL. The fix produces:
```sql
IF OBJECT_ID(N'[dbo].[it''s]', N'U') IS NULL
```

### Changes

Added `AppendTableNameInsideLiteral` and `AppendIdentifierInsideLiteral`
helper methods that escape single quotes by doubling them, and updated
the 5 call sites where identifiers appear inside string literals:

- `OBJECT_ID` in `CreateTable` (ifNotExists check)
- `OBJECT_ID` in full-text index PK lookup
- Dynamic SQL table name, column names, and catalog name for full-text
indexes

### Tests

Added unit tests for `AppendTableNameInsideLiteral`,
`AppendIdentifierInsideLiteral`, and a
`CreateTable_WithSingleQuoteInName` integration test. All 283 tests pass
(unit + conformance).

Co-authored-by: Copilot <[email protected]>
2026-04-21 12:28:39 +00:00
Shay Rojansky 1b2f318a61 .Net: Remove MEVD components from SK-release.slnf (#13892)
With the ongoing move of MEVD components out of the SK repo, this
disables publishing them.
2026-04-20 11:59:42 +00:00
Shay RojanskyandCopilot 7e216a0f5c .Net: Update SQL Server vector search to latest VECTOR_SEARCH() syntax (#13863)
Updates the SQL Server vector store connector to support the latest
Azure SQL VECTOR_SEARCH() features, matching what was done in EF Core
(dotnet/efcore#38075).

## Changes

### VECTOR_SEARCH syntax update
- Replace deprecated `TOP_N` parameter with `SELECT TOP(N) WITH
APPROXIMATE`
- Enable iterative WHERE predicates are now applied during the vector
search process, not after retrievalfiltering
- Support `skip` via subquery wrapping (`TOP` and `OFFSET/FETCH` cannot
coexist in the same SELECT)

### Hybrid search
- Same VECTOR_SEARCH syntax changes in the semantic search CTE
- Filter support added in the vector search CTE (iterative filtering)

### Azure SQL runtime detection
- DiskAnn vector indexes and VECTOR_SEARCH require Azure SQL Database or
SQL database in Microsoft Fabric
- Added runtime check via `SERVERPROPERTY('EngineEdition')` at table
creation and query time
- Throws informative `NotSupportedException` when used against on-prem
SQL Server
- Result is cached per collection instance

### Test infrastructure
- Deleted `SqlServerDiskAnnVectorSearchTests.cs` (read-only table
workaround no longer tables with latest vector indexes now support full
DML)needed
- Created `SqlServerConnectionStringRequiredAttribute` to gate DiskAnn
tests on Azure SQL connection string availability
- Rewrote DiskAnn conformance test to handle 100-row minimum requirement
for vector index creation
- Updated all command builder unit tests for new SQL syntax

### Kept
- `PREVIEW_FEATURES` command in `CreateTable` (needed for future on-prem
SQL Server support)

---------

Co-authored-by: Copilot <[email protected]>
2026-04-16 07:15:46 +00:00
Shay RojanskyandCopilot 134e52e754 Use newest Npgsql when targeting net8.0 and above (#13724)
We are currently using Npgsql 8.0 because that's the last version that's
still compatible with .NET Standard 2.0/netfx; but it seems wrong to
force an older version of Npgsql on modern .NET users just because netfx
users require it

So for the versions of the PgVector MEVD provider targeting
net8.0/net10.0, use the latest Npgsql 10.0; netstandard2.0/net462 still
use Npgsql 8.0. It's not ideal to use different versions of Npgsql
across different TFM targets of the same library, but it seems like the
lesser of the possible evils here.

This incidentally also takes care of the ReloadTypesAsync problem in
#13706.

---------

Co-authored-by: Copilot <[email protected]>
2026-03-31 16:45:10 +00:00
Shay RojanskyandCopilot 5f282a9128 Refactor CollectionModel/builder and introduce read-only property interfaces (#13699)
## Changes

* **Extract `ConfigureVectorPropertyEmbedding()`**: Deduplicated
embedding resolution logic that was repeated across
`ProcessTypeProperties` and `ProcessRecordDefinition`.
* **Replace `IRecordCreator` with `Func<object>`**: Removed
`IRecordCreator` interface and two implementing classes
(`ActivatorBasedRecordCreator`, `DynamicRecordCreator`), replacing them
with simple lambdas.
* **Rename `TemporaryStorageName` → `SerializedKeyName`**: Moved from
`PropertyModel` base to `KeyPropertyModel` where it belongs (only used
by CosmosNoSql for key property JSON serializer name remapping).
* **Delegate-based property accessors**: Replaced virtual
`GetValueAsObject`/`SetValueAsObject` overrides with delegate fields
(`_getter`/`_setter`), configured via
`ConfigurePocoAccessors()`/`ConfigureDynamicAccessors()`. Converted
null-coalescing throws to `Debug.Assert`.
* **Improved xmldoc** on `VectorPropertyModel.EmbeddingType` explaining
the `[AllowNull]` invariant.
* **Introduce read-only interfaces** (`IPropertyModel`,
`IKeyPropertyModel`, `IDataPropertyModel`, `IVectorPropertyModel`):
`CollectionModel` now exposes `IReadOnlyList<IVectorPropertyModel>`
etc., giving providers an immutable view post-build. All provider code
updated to consume interface types.

Note that the last is a non-trivial breaking change for providers (not
users), which I think is fine (note that the provider-facing APIs are
flagged as [Experimental]).

---------

Co-authored-by: Copilot <[email protected]>
2026-03-26 14:09:43 +00:00
Copilotandadamsitnik 6ed2bb26d5 [MEVD] Fix VectorStoreKeyAttribute.IsAutoGenerated to be usable as a compile-time attribute argument (#13698)
### Motivation and Context

`VectorStoreKeyAttribute.IsAutoGenerated` was typed as `bool?`, which C#
does not permit as a compile-time attribute argument. This made the
following valid-looking code fail to compile:

```csharp
[VectorStoreKey(StorageName = "name", IsAutoGenerated = true)]
public Guid Key { get; set; }
```

### Description

- **`VectorStoreKeyAttribute.IsAutoGenerated`**: Changed from `public
bool?` to a `public bool` property. Its setter stores the value into a
new `internal bool? IsAutoGeneratedNullable` backing property. The
getter returns `IsAutoGeneratedNullable.GetValueOrDefault()` rather than
throwing; an inline comment explains this is a workaround for the C#
compiler restriction that prevents `Nullable<bool>` from being used as a
compile-time attribute argument. The `bool?` backing preserves the "not
explicitly set" vs. "explicitly set" distinction the framework relies
on.

- **`CollectionModelBuilder`**: Updated to read
`keyAttribute.IsAutoGeneratedNullable` (the `bool?` backing) instead of
the former `bool?` public property, keeping the existing `??
SupportsKeyAutoGeneration(...)` fallback behaviour intact.

- **`KernelFunctionFromMethod`**: Fixed a pre-existing operator
precedence bug in a pattern match expression (`value is not JsonElement
or JsonDocument or JsonNode`) that caused CS9336 redundant-pattern
errors on the .NET 10 compiler. Added parentheses to correctly express
the intended negation of all three types: `value is not (JsonElement or
JsonDocument or JsonNode)`.

- **`CollectionModelBuilderTests`**: Added four new unit tests covering
all `IsAutoGenerated` attribute scenarios: explicitly set to `true`,
explicitly set to `false`, omitted on a `Guid` key (fallback to
`SupportsKeyAutoGeneration` returns `true`), and omitted on an `int` key
(fallback returns `false`).

```csharp
// Now compiles and works correctly
[VectorStoreKey(IsAutoGenerated = true)]
public Guid Key { get; set; }

[VectorStoreKey(IsAutoGenerated = false)]
public Guid Key { get; set; }

[VectorStoreKey]  // IsAutoGeneratedNullable remains null, fallback to SupportsKeyAutoGeneration()
public Guid Key { get; set; }
```

### Contribution Checklist

- [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
- [x] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>[MEVD] Can't set IsAutoGenerated property of
VectorStoreKeyAttribute at compile time</issue_title>
> <issue_description>The following code fails to compile:
> 
> ```csharp
> [VectorStoreKey(StorageName = "name", IsAutoGenerated = true)]
> public Guid Key { get; set; }
> ```
> 
> Because the `IsAutoGenerated` is `bool?`:
> 
>
https://github.com/microsoft/semantic-kernel/blob/082e28e52ec2b45ad8cf287176d844150617e8b5/dotnet/src/VectorData/VectorData.Abstractions/RecordAttributes/VectorStoreKeyAttribute.cs#L30
> 
> Which in C# maps to `System.Nullable<bool>` (a struct) and can't be
set at compile time.
> 
> Could we make it just a `bool` like what it's mapped to at the end?
> 
>
https://github.com/microsoft/semantic-kernel/blob/082e28e52ec2b45ad8cf287176d844150617e8b5/dotnet/src/VectorData/VectorData.Abstractions/ProviderServices/KeyPropertyModel.cs#L18
> 
> Context:
https://github.com/dotnet/extensions/pull/7423/changes#r2974567816
> 
> cc @roji </issue_description>
> 
> <agent_instructions>1. Make
[this](https://github.com/microsoft/semantic-kernel/blob/082e28e52ec2b45ad8cf287176d844150617e8b5/dotnet/src/VectorData/VectorData.Abstractions/RecordAttributes/VectorStoreKeyAttribute.cs#L30)
property be a `bool` rather than `bool?` property.
> 2. Implement the getter and setter for it.
> 3. The setter should set an internal `bool?` property that should be
used instead of the public property everywhere in the repo.
[Example]https://github.com/microsoft/semantic-kernel/blob/082e28e52ec2b45ad8cf287176d844150617e8b5/dotnet/src/VectorData/VectorData.Abstractions/ProviderServices/CollectionModelBuilder.cs#L162)
> 3. Proof of concept code that I've used to verify it's going to get us
what we need:
> 
> ```csharp
> using System.Reflection;
> 
> namespace ConsoleApp15
> {
>     public class Program
>     {
>         static void Main()
>         {
> TestAttribute setToTrue =
typeof(Program).GetMethod(nameof(SetToTrue))!.GetCustomAttribute<TestAttribute>()!;
> Console.WriteLine($"IsAutoGenerated_Core for [Test(IsAutoGenerated =
true)]: {setToTrue.IsAutoGenerated_Core}");
> 
> TestAttribute setToFalse =
typeof(Program).GetMethod(nameof(SetToFalse))!.GetCustomAttribute<TestAttribute>()!;
> Console.WriteLine($"IsAutoGenerated_Core for [Test(IsAutoGenerated =
false)]: {setToFalse.IsAutoGenerated_Core}");
> 
> TestAttribute notSet =
typeof(Program).GetMethod(nameof(NotSet))!.GetCustomAttribute<TestAttribute>()!;
> Console.WriteLine($"IsAutoGenerated_Core for [Test]:
{notSet.IsAutoGenerated_Core}");
>         }
> 
>         [Test(IsAutoGenerated = true)]
>         public static void SetToTrue() { }
> 
>         [Test(IsAutoGenerated = false)]
>         public static void SetToFalse() { }
> 
>         [Test]
>         public static void NotSet() { }
>     }
> 
>     [AttributeUsage(AttributeTargets.All)]
>     public class TestAttribute : Attribute
>     {
>         public bool IsAutoGenerated
>         {
> get => throw new InvalidOperationException(); // provided to satisfy
compiler requirements
>             set => IsAutoGenerated_Core = value;
>         }
> 
>         internal bool? IsAutoGenerated_Core { get; set; }
>     }
> }
> ```</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft/semantic-kernel#13697

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Send tasks to Copilot coding agent from
[Slack](https://gh.io/cca-slack-docs) and
[Teams](https://gh.io/cca-teams-docs) to turn conversations into code.
Copilot posts an update in your thread when it's finished.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: adamsitnik <[email protected]>
2026-03-23 19:35:05 +00:00
Shay Rojansky 082e28e52e .Net: Remove legacy filtering from MEVD providers (#13636)
Removes all legacy filtering logic from MEVD, leaving only (obsoleted)
FilterClause and subclasses, which are still needed by ITextSearch (see
conversation in
https://github.com/microsoft/semantic-kernel/pull/13384#discussion_r2867207653).

As suggested by @westey-m let's do an SK release before merging this
(see above).

Closes #10456

/cc @alzarei
2026-03-21 07:51:42 +00:00
0e2e6bd777 .Net: feat: Add support for dimensions in Vertex AI embedding services (#13612)
### Motivation and Context

**Why is this change required?**
PR #10489 added support for configuring embedding [dimensions]
(outputDimensionality) for the Google AI connector, but the equivalent
Vertex AI connector was not updated. This means specifying [Dimensions]
in [EmbeddingGenerationOptions] or via the constructor has no effect
when using Vertex AI — the API always returns the model's default
dimensionality.

**What problem does it solve?**
When using [VertexAIEmbeddingGenerator] or
[VertexAITextEmbeddingGenerationService]with a [dimensions] value (e.g.
128), the output embedding length is the model default (e.g. 3072)
instead of the requested size.

**What scenario does it contribute to?**
Users who need to control embedding dimensionality for storage
optimization, performance, or compatibility with downstream systems when
using the Vertex AI endpoint.

Fixes: #12988

### Description

This PR adds outputDimensionality support to the Vertex AI embedding
connector, mirroring the existing Google AI implementation from PR
#10489.

The Google connector has two parallel embedding paths — Google AI (uses
API key, calls generativelanguage.googleapis.com) and Vertex AI (uses
bearer token, calls [{location}-aiplatform.googleapis.com]). PR #10489
only wired up dimensions for the Google AI path. This PR applies the
same pattern to every layer of the Vertex AI path.

The key structural difference between the two APIs is where
outputDimensionality goes in the request JSON:

Google AI puts it per-content-item: `{ "requests": [{ "content": {...},
"outputDimensionality": 128 }] }`
Vertex AI puts it in the shared parameters block: `{ "instances": [...],
"parameters": { "autoTruncate": false, "outputDimensionality": 128 } }`
The implementation follows this difference. In
[VertexAIEmbeddingRequest], outputDimensionality is added to the
existing [RequestParameters] class (alongside autoTruncate), rather than
on each instance item.

Dimensions flow through the same chain as Google AI:

1. Extension methods accept int? dimensions = null and pass it to the
generator/service constructor
2. [VertexAIEmbeddingGenerator] passes it to
[VertexAITextEmbeddingGenerationService]
3. The service passes it to [VertexAIEmbeddingClient], which stores it
as a default
4. At request time, the client resolves the final value as
[options?.Dimensions ?? this._dimensions] — runtime
[EmbeddingGenerationOptions] take priority over the constructor default
5. [VertexAIEmbeddingRequest.FromData()] sets it on the parameters
block, and [JsonIgnore(WhenWritingNull)] ensures it's omitted when not
specified

All new parameters default to null, preserving full backward
compatibility.

### 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 Autofix powered by AI <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: abbottdev <[email protected]>
Co-authored-by: westey <[email protected]>
2026-03-20 19:43:03 +00:00
westey 14ea2fcabb SK .NET Release version bump (#13685)
### 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 😄
2026-03-20 12:25:16 +00:00
30aec16700 Update OpenAI to 2.9.1, Azure.AI.OpenAI to 2.9.0-beta.1, Azure.AI.Projects to 2.0.0-beta.2, Microsoft.Extensions.AI* to 10.4.0 (#13668)
### Motivation and Context

Bumps core AI SDK dependencies to their latest versions to pick up new
features and fixes.

### Description

Updates the following packages in `Directory.Packages.props`:

- **OpenAI** 2.8.0 → 2.9.1
- **Azure.AI.OpenAI** 2.8.0-beta.1 → 2.9.0-beta.1
- **Azure.AI.Projects** 1.1.0 → 2.0.0-beta.2
- **Azure.Identity** 1.17.1 → 1.19.0 (cascading dependency from
Azure.AI.Projects 2.0.0-beta.2)
- **Microsoft.Extensions.AI\*** 10.3.0 → 10.4.0
- **System.Text.Json, System.Numerics.Tensors,
Microsoft.Extensions.Logging.Abstractions,
Microsoft.Bcl.AsyncInterfaces, System.Threading.Channels** → 10.0.4

Addresses the following breaking changes introduced by OpenAI 2.9.1:

- `CreateInputImagePart` BinaryData overload removed (replaced with data
URI approach)
- Realtime API type renames (`ConversationTool` → `RealtimeTool`,
`ConversationSessionOptions` → `RealtimeConversationSessionOptions`,
etc.)
- `ResponsesClient` constructor no longer accepts a model parameter;
model is now specified on `CreateResponseOptions.Model`
- `ResponseResult.Instructions` is now read-only

Code changes to adapt:

- Added `ModelId` property to `OpenAIResponseAgent` and propagated it
through `ResponseCreationOptionsFactory`
- Updated unit tests (`BaseOpenAIResponseClientTest`,
`OpenAIResponseAgentExtensionsTests`, `OpenAIResponseExtensionsTests`)
- Updated integration tests (`OpenAIResponseAgentTests`,
`OpenAIResponseAgentFixture`)
- Updated `BaseResponsesAgentTest` and `GettingStartedWithAgents`
samples
- Updated `AgentFrameworkMigration` samples (`GetResponsesClient`,
`AsIChatClient`, `CreateAIAgent`, modelId propagation)
- Rewrote `OpenAIRealtime` demo for the restructured Realtime API event
model

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

<!-- START COPILOT CODING AGENT TIPS -->
---

📍 Connect Copilot coding agent with [Jira](https://gh.io/cca-jira-docs),
[Azure Boards](https://gh.io/cca-azure-boards-docs) or
[Linear](https://gh.io/cca-linear-docs) to delegate work to Copilot in
one click without leaving your project management tool.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: stephentoub <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Roger Barreto <[email protected]>
2026-03-19 15:41:43 +00:00
Roger BarretoandCopilot 2c880ea4b2 .Net: [Breaking] Harden plugin security defaults for WebFileDownloadPlugin (#13644)
### Motivation and Context

Improve control and security settings for WebFileDownloadPlugin

- Change AllowedDomains and AllowedFolders defaults from null
(allow-all) to empty (deny-all)
- Change DisableFileOverwrite default to true
- Set MaximumDownloadSize default to 10 MB
- Add path canonicalization via Path.GetFullPath() to prevent directory
traversal
- Switch folder matching from exact to prefix-based with separator
handling
- Fix fileMode variable not being used in FileStream constructor
- Add XML doc security remarks to all three plugins
- Update tests for new defaults

Co-authored-by: Copilot <[email protected]>
2026-03-18 21:52:44 +00:00
Roger BarretoandCopilot 12a7d55d3a .Net: [Breaking] Harden DocumentPlugin security defaults with deny-by-default AllowedDirectories (#13683)
### Motivation and Context

Improve control and security settings for DocumentPlugin, addressing the
same class of vulnerability (arbitrary file read/write via AI agent
indirect prompt injection) that was patched in SessionsPythonPlugin.

DocumentPlugin previously had **zero security controls** at the plugin
level. Both `ReadTextAsync` and `AppendTextAsync` accepted arbitrary
file paths, delegating directly to `LocalFileSystemConnector` which
calls `File.Open(Environment.ExpandEnvironmentVariables(filePath))` with
no validation.

### Description

- Add `AllowedDirectories` property with deny-by-default (empty HashSet,
no directories allowed)
- Add `IsFilePathAllowed` private method with:
- `Path.GetFullPath()` canonicalization to prevent `../` directory
traversal
  - UNC path rejection
  - Fully qualified path enforcement
  - Prefix matching with directory separator for subdirectory support
- Gate both `ReadTextAsync` and `AppendTextAsync` with path validation
- Add security XML doc remarks documenting secure-by-default behavior

### Tests

- Updated 4 existing tests to configure `AllowedDirectories`
- Added 6 new security tests:
  - Deny-by-default (empty AllowedDirectories blocks all paths)
  - Path traversal prevention (`../../` canonicalized and rejected)
  - UNC path rejection
  - Disallowed folder rejection
- Subdirectory prefix matching (subdirectories of allowed folders
succeed)
  - Relative path rejection

All 10 DocumentPlugin tests pass.

### Breaking Change

**Yes** — `DocumentPlugin` now denies all file operations by default.
Users must explicitly configure `AllowedDirectories` before any
read/write operations will succeed:

```csharp
var plugin = new DocumentPlugin(documentConnector, fileSystemConnector)
{
    AllowedDirectories = ["/path/to/allowed/folder"]
};
```

Co-authored-by: Copilot <[email protected]>
2026-03-18 21:51:39 +00:00
TsengSRandwestey 41cc2487d2 .Net: Fixes Qdrant 1.17 issue with returning empty vectors (#13638)
### Motivation and Context

With Qdrant server 1.17 Embeddings stopped being returned.  

Fixes #13587



### Description

The `VectorOutput.Data` property became deprecated in `Qdrant.Client`
1.17. The alternative is to use `VectorOutput.Dense.Data` instead or
`VectorOutput.GetDenseVector()` (from `Qdrant.Client` 1.16.0 or later).

Since the `.Dense` already exyists in `Qdrant.Client` 1.15.1 that is
used by the current connector, I used these. The `.GetDenseVector()`
also returns nullable `DenseVector`, so I was unsure how to handle in
context of Semantic Kernel, as as far as I see it Semantic Kernel only
supports Dense Vectors (the other two are `.Sparse` for sparse vectors
and `.MultiDense`).

So this may need special handling in future to throw an exception, when
the server returns one of the other two vector types and not dense
vectors.

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

I'm currently unable (or rather I don't know how) to run the local
integration/unit tests against the qdrant database. But I validated the
change in my personal project mentioned in #13587 by directly
referencing the connector in my project and it correctly returned the
vectors on the sample code where it failed previously

```csharp
    VectorStoreCollection<ulong, VectorModels.Project> projects = await GetProjectsCollection();
    VectorModels.Project? project = await projects.GetAsync((ulong)projectId, new()
    {
        IncludeVectors = true
    });

    // project at this poind hat 0 sized Embedding property
    if (project is null)
    {
        return;
    }
    await projects.UpsertAsync(project);
```

---------

Co-authored-by: westey <[email protected]>
2026-03-18 19:35:06 +00:00
Roger BarretoandCopilot 301d7dc923 .Net: Migrate from deprecated DALL-E models to gpt-image-1 (#13650)
### Motivation and Context

- Update default image model from dall-e-2 to gpt-image-1 in ClientCore
and OpenAITextToImageService
- Handle base64 responses in GenerateImageAsync (gpt-image-1 returns
base64 only, no URLs)
- Add Medium, Low, and Auto quality options to GetGeneratedImageQuality
- Update AzureOpenAI integration tests to use api-version
2025-04-01-preview
- Remove URL-specific assertions since gpt-image-1 returns base64 only
- Update OpenAI integration tests to reference gpt-image-1
- Update testsettings.json defaults from Dalle3/dall-e-2 to gpt-image-1
- Update OpenAITextToImageExecutionSettings XML docs for gpt-image-1

Co-authored-by: Copilot <[email protected]>
2026-03-18 18:32:54 +00:00
Roger Barreto c2945847ea .NET: Update system package dependencies for CVE-2026-26127 (#13656)
## Summary

Update NuGet package dependencies to address
[CVE-2026-26127](https://github.com/advisories/GHSA-73j8-2gch-69rq), a
high severity denial of service vulnerability caused by an out of bounds
read during malformed Base64Url decoding.

This mirrors the fix applied in Agent Framework [PR
#4647](https://github.com/microsoft/agent-framework/pull/4647).

### Package Updates (Directory.Packages.props)

| Package | Old Version | New Version |
|---------|-------------|-------------|
| Microsoft.Bcl.Memory | 10.0.2 | 10.0.4 |
| Microsoft.Bcl.AsyncInterfaces | 10.0.3 | 10.0.4 |
| System.Linq.AsyncEnumerable | 10.0.2 | 10.0.4 |

### Transitive Vulnerability Fix

Added direct `PackageReference` to `Microsoft.Bcl.Memory` in 3 projects
that transitively pulled in the vulnerable 9.0.4 version via
`Microsoft.ML.Tokenizers.Data.Cl100kBase`. The direct reference forces
NuGet to resolve the centrally managed 10.0.4 version instead.

Affected projects:
- `SemanticKernel.UnitTests`
- `IntegrationTests`
- `Concepts` (sample)

### Validation

- `dotnet restore` completes with zero vulnerability warnings
- `dotnet build` succeeds with zero errors
2026-03-18 17:40:36 +00:00
SergeyMenshykhandCopilot 4d67592957 .Net: Add server URL validation options for OpenAPI plugins (#13631)
### Motivation and Context

When loading OpenAPI specifications, the SDK uses the `servers[].url`
field to construct HTTP request targets. This PR adds an opt-in
mechanism for consumers to validate and restrict which URLs the OpenAPI
plugin is allowed to call at runtime.

### Description

Introduces `RestApiOperationServerUrlValidationOptions`, a new options
class that can be configured via
`OpenApiFunctionExecutionParameters.ServerUrlValidationOptions` to
control outbound request targets:

- **AllowedSchemes** (`IReadOnlyList\<string\>?`) — restricts which URI
schemes are permitted. When null/empty, defaults to `https` only.
- **AllowedBaseUrls** (`IReadOnlyList\<Uri\>?`) — restricts requests to
URLs matching one of the specified base URL prefixes. When null, no base
URL restriction is applied.

Validation is performed in `RestApiOperationRunner` before any HTTP
request is sent. When `ServerUrlValidationOptions` is not set (default),
behavior is unchanged — no validation is performed.

### Changes

- New class: `RestApiOperationServerUrlValidationOptions`
- `OpenApiFunctionExecutionParameters`: added
`ServerUrlValidationOptions` property (`[Experimental("SKEXP0040")]`)
- `RestApiOperationRunner`: added `ValidateUrl()` with scheme and base
URL checks
- `OpenApiKernelPluginFactory`: wires validation options through to the
runner
- 7 new unit tests covering scheme blocking, base URL allowlisting, and
mixed configurations

### Usage Example

```csharp
var plugin = await kernel.ImportPluginFromOpenApiAsync(
    pluginName: "myApi",
    filePath: specPath,
    executionParameters: new OpenApiFunctionExecutionParameters
    {
        ServerUrlValidationOptions = new RestApiOperationServerUrlValidationOptions
        {
            AllowedBaseUrls = [new Uri("https://api.example.com")],
            AllowedSchemes = ["https"]
        }
    });
```

### 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] New unit tests added

---------

Co-authored-by: Copilot <[email protected]>
2026-03-06 18:49:24 +00:00
86d7a49843 .Net: Feature text search linq (#13384)
### 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 😄

---------

Co-authored-by: Alexander Zarei <[email protected]>
Co-authored-by: Alexander Zarei <[email protected]>
Co-authored-by: Chris <[email protected]>
Co-authored-by: Copilot <[email protected]>
2026-03-05 10:43:15 +00:00
westey e901020793 .Net: Bump SK and MEVD versions for release (#13630)
### 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 😄
2026-03-04 11:41:22 +00:00
Shay Rojansky b36a327d76 .Net: Fix input checking in Cosmos NoSQL, Redis and Weaviate providers (#13629) 2026-03-04 10:52:33 +00:00
Shay Rojansky e9641a9106 .Net: Fix column nullability in SQL MEVD providers (#13622)
Closes #12560
2026-03-04 08:41:41 +00:00
Shay Rojansky 781881a34f .Net: Deduplicate embedding generation management (#13615)
Closes #12508
2026-03-02 13:15:56 +00:00
Shay Rojansky 74d4310fd4 .Net: Handle installation of pgvector on PostgreSQL (#13600) 2026-02-27 09:23:23 +00:00
Shay Rojansky f077655fd6 .Net: [MEVD] Add validation for mismatched collection key (#13594)
Closes #11355
2026-02-26 11:19:03 +00:00
Shay Rojansky f59e395230 .Net: [MEVD] Make PG schema nullable (#13593)
Closes #10853
2026-02-25 19:47:14 +00:00
Shay RojanskyandMark Wallace ea864bf697 .Net: [MEVD] Support DateTime/DateTimeOffset/DateOnly/TimeOnly across providers (#13569)
See
https://github.com/microsoft/semantic-kernel/issues/11286#issuecomment-3904027209
for some design notes.

Closes #11286
Closes #11086

---------

Co-authored-by: Mark Wallace <[email protected]>
2026-02-25 13:45:19 +00:00
889807dfda .Net: Update Microsoft.Extensions.AI dependencies to 10.3.0 and OpenAI SDK to 2.8.0 (#13544)
### Motivation and Context

Updates Microsoft.Extensions.AI packages to latest stable releases
(10.3.0) and OpenAI SDK to 2.8.0. The new versions require transitive
dependency updates and fixing breaking type renames in the OpenAI
Responses API. Additionally, the new `ChatOptions.Reasoning` property is
now mapped from `PromptExecutionSettings` and used in samples instead of
`RawRepresentationFactory`.

### Description

**Package Updates:**
- `Microsoft.Extensions.AI` and `Microsoft.Extensions.AI.Abstractions`:
10.2.0 → 10.3.0
- `Microsoft.Extensions.AI.OpenAI`: 10.0.1-preview → 10.3.0 (stable)
- `OpenAI`: 2.7.0 → 2.8.0
- `Azure.AI.OpenAI`: 2.7.0-beta.2 → 2.8.0-beta.1
- Transitive dependencies → 10.0.3:
  - `System.Text.Json`
  - `System.Numerics.Tensors`
  - `Microsoft.Extensions.Logging.Abstractions`
  - `Microsoft.Bcl.AsyncInterfaces`
  - `System.Threading.Channels`

**OpenAI 2.8.0 Breaking Changes Fixed (~23 files):**
- `OpenAIResponseClient` → `ResponsesClient`
- `ResponseCreationOptions` → `CreateResponseOptions`
- `OpenAIResponse` → `ResponseResult`
- `GetOpenAIResponseClient()` → `GetResponsesClient()`
- API: Input items now passed via `CreateResponseOptions.InputItems`
instead of separate parameter
- API: `StreamingEnabled = true` required for streaming calls
- `OpenAIResponsesModelFactory` removed → using public constructors in
tests

**ChatOptions.Reasoning Mapping:**
- Added `reasoning_effort` → `ChatOptions.Reasoning.Effort` mapping in
`PromptExecutionSettingsExtensions.ToChatOptions`, supporting `low`,
`medium`, `high`, and `xhigh` (→ ExtraHigh) effort levels per OpenAI API
documentation
- Replaced `RawRepresentationFactory` with `ChatOptions.Reasoning` in
the OpenAI and AzureOpenAI Step02_ReasoningModel sample files
- Updated migration documentation in
`.github/upgrades/prompts/SemanticKernelToAgentFramework.md` to use
`TruncationMode` as the provider-specific options example (since
reasoning now has a direct `ChatOptions` equivalent)

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

<!-- 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: stephentoub <[email protected]>
Co-authored-by: Roger Barreto <[email protected]>
Co-authored-by: Copilot <[email protected]>
2026-02-25 12:10:01 +00:00
Shay Rojansky c086d09442 .Net: [MEVD] SQL Server approximate vector search (#13573)
Closes #13270
2026-02-23 10:50:29 +00:00
Shay Rojansky 9f2dafca48 .Net: [TINY] [MEVD] Remove SupportsMultipleKeys (#13572)
We have the model building option SupportsMultipleKeys to allow multiple
(composite) keys, but no provider uses them at this point (note that
Cosmos NoSQL has a sort of composite key - document + partition key, but
does not go through this support in any case).

Removing this - we can always add it when we actually need to support it
(and providers aren't blocked from implementing composite keys if they
really want to).
2026-02-19 19:07:35 +00:00
westey cec0cba23c .Net: Bump SK to 1.7.2 and MEVD to 10.0.0 (#13567)
### Motivation and Context

### Description

- Bump version numbers of SK

### 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 😄
2026-02-19 15:41:14 +00:00
Copilotandmarkwallace-microsoft c86a59ae04 .Net: Update Microsoft.SemanticKernel packages to 1.71.0 (#13571)
### Motivation and Context

Bumps external `Microsoft.SemanticKernel` package references to the
latest released version 1.71.0.

### Description

- Updated `dotnet/Directory.Packages.props`:
  - `Microsoft.SemanticKernel.Abstractions`: `1.70.0` → `1.71.0`
  - `Microsoft.SemanticKernel.Connectors.OpenAI`: `1.70.0` → `1.71.0`
  - `Microsoft.SemanticKernel.Core`: `1.70.0` → `1.71.0`

> `Microsoft.SemanticKernel.Planners.OpenAI` remains pinned at
`1.47.0-preview` (separate versioning scheme). `nuget-package.props`
already had `VersionPrefix=1.71.0` (packages produced by this repo) with
`PackageValidationBaselineVersion=1.70.0` (previous stable baseline) —
no changes needed there.

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

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Update Microsoft.SemanticKerne packages to
1.71.0</issue_title>
> <issue_description>
> Update dollowing dependencies to use version 1.71.0
> 
> <PackageVersion Include="Microsoft.SemanticKernel.Abstractions"
Version="1.70.0" />
> <PackageVersion Include="Microsoft.SemanticKernel.Connectors.OpenAI"
Version="1.70.0" />
> <PackageVersion Include="Microsoft.SemanticKernel.Core"
Version="1.70.0" /></issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft/semantic-kernel#13570

<!-- 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]>
2026-02-19 15:40:30 +00:00
Shay Rojansky 8513c2ac00 .Net: [MEVD] Cosmos NoSQL provider work on keys, partition keys and point reads (#13550)
This is a sizable cleanup/redo of large chunks of the Cosmos NoSQL
provider; I've broken it down to three commits for easier reviewing.

* Cosmos NoSQL collections can now have either string/Guid as their key,
or CosmosNoSqlKey. In the former case, this configures the partition key
to be the same as the string/Guid document key - this is a sensible
default that's common (and encouraged) in Cosmos. All other scenarios
require CosmosNoSqlKey:
    * A single partition key that isn't the document ID
    * A hierarchical partition key (more than one property)
    * No partition key (legacy/discouraged)
* Note that CosmosNoSqlKey is only passed to GetAsync and DeleteAsync;
on the user's .NET record type, the properties are there as usual (e.g.
a string document Id property, an int partition key property). This
introduces a discrepancy for the first time between the collection's
TKey (CosmosNoSqlKey) and its actual key property on the .NET type (a
string); this made some things trickier, but is the correct way to do
things for composite key cases (we'd do the same if we implement
composite keys for relational providers).
* Added support for Cosmos hierarchical partition keys (2-3 properties
instead of just one).
* GetAsync no longer does a SQL query with a WHERE clause, but rather an
efficient point read via ReadItem. The multiple-key overload does
ReadManyItemsAsync, which again is far more efficient.
* UpdateAsync and DeleteAsync now correctly supply the partition key in
the call's request options, again making it much more efficient.
* Various other cleanup and fixes all around.
2026-02-17 13:57:34 +00:00
Roger BarretoandCopilot 91f795605e .Net: Bumping - Version 1.71.0 (#13552)
### Motivation and Context

.Net: Bumping - Version 1.71.0

Co-authored-by: Copilot <[email protected]>
2026-02-16 10:25:11 +00:00
Shay Rojansky c6f07d65f4 .Net: Implement SQL Server hybrid search (#13512)
Closes #11080
2026-02-11 10:54:47 +00:00
Shay Rojansky e8b4862d03 .Net: [MEVD] Map DateTime to timestamptz on PostgreSQL (#13514)
DateTime now maps to the PG timestamptz type by default, which
represents a UTC timestamp; this aligns with Npgsql and EF Core.

However, now that we have property annotations, I've also added a new
`WithStoreType()` that allows the user to specify a database type
explicitly. For now, this is only supported for setting `timestamp with
time zone` (short: `timestamp`), which is the other PG date/time type,
for unspecified timestamps (timezone is unknown or implicitly assumed).
This allows users who do want to store non-UTC timestamp to do so.

Closes #10641
2026-02-11 10:54:37 +00:00
CopilotandSergeyMenshykh 7a74a26227 .Net: Update DirectoryObjects.yml URL from dev to main branch (#13526)
### Motivation and Context

The `msgraph-sdk-powershell` repository has moved its default branch
from `dev` to `main`. The raw GitHub URLs for OpenAPI specs in our test
manifests now point to a stale branch.

### Description

Updates the `apiDescriptionUrl` for MicrosoftGraph in two test manifest
files:

- `example-apimanifest.json`
- `example-apimanifest-local.json`

**Change:**
```diff
- https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/openApiDocs/v1.0/DirectoryObjects.yml
+ https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/main/openApiDocs/v1.0/DirectoryObjects.yml
```

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

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Replace the old url:
https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/openApiDocs/v1.0/DirectoryObjects.yml
by the new one:
https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/main/openApiDocs/v1.0/DirectoryObjects.yml
in the example-apimanifest.json and example-apimanifest-local.json files


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: SergeyMenshykh <[email protected]>
2026-02-10 09:13:13 +00:00
Copilotandmarkwallace-microsoft c4d0a623f2 .Net: Update Microsoft.SemanticKernel packages from 1.68.0 to 1.70.0 (#13524)
### Motivation and Context

Updates Semantic Kernel package references to align with the latest
1.70.0 release.

### Description

Updated three package versions in `dotnet/Directory.Packages.props`:

- `Microsoft.SemanticKernel.Abstractions`: 1.68.0 → 1.70.0
- `Microsoft.SemanticKernel.Connectors.OpenAI`: 1.68.0 → 1.70.0
- `Microsoft.SemanticKernel.Core`: 1.68.0 → 1.70.0

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

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Update the Microsoft.SemanticKernel packages from 1.68.0
to 1.70.0</issue_title>
> <issue_description>In this file
`https://github.com/microsoft/semantic-kernel/blob/main/dotnet/Directory.Packages.props`
> 
> Update the Microsoft.SemanticKernel packages from 1.68.0 to 1.70.0
> </issue_description>
> 
> <agent_instructions>Update the Microsoft.SemanticKernel packages from
1.68.0 to 1.70.0</agent_instructions>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes microsoft/semantic-kernel#13523

<!-- 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]>
2026-02-09 11:13:23 +00:00
Shay Rojansky b0d621f2a6 .Net: Implement PostgreSQL hybrid search (#13502)
**Note: this PR is based on top of #13501, skip first commit**

And add provider-specific annotation support

Closes #11084
Closes #10359
2026-02-05 17:52:16 +00:00
Shay Rojansky 7d7a6494e5 .Net: [MEVD] Implement support for score threshold (#13501)
For providers which don't natively support score threshold, I've gone
with applying the filter client-side - the other option would be to
throw.
* In EF we're quite strict on not bringing back database data in order
to client-evaluate; in other words, if the user wants to load database
rows from the database and then perform some post-filtering, they need
to write that explicitly in code, to avoid scenarios where tons of data
gets unintentionally transferred.
* In MEVD we already implement Skip in various providers by bringing
back the entire matching resultset and then filtering client-side. This
is potentially much worse than filtering for score threshold
client-side, as the amount of extra data brought back by threshold
post-filtering is limited to top (k), whereas with Skip/pagination
queries that amount of data grows with each page.
* Ultimately, MEVD is simpler and more high-level, and is also
explicitly designed for layers to be composed on top (e.g. MEDI). So
there does seem to be more value in features "just working" across
providers.

Closes #9566
2026-02-05 14:45:28 +00:00
Shay Rojansky cbb1f219d0 .Net: [MEVD] Introduce FilterTranslatorBase and remove duplication (#13485) 2026-02-01 07:08:39 +00:00
dependabot[bot] 8f301a1879 Bump mdast-util-to-hast from 13.2.0 to 13.2.1 in /dotnet/samples/Demos/ProcessWithCloudEvents/ProcessWithCloudEvents.Client (#13409)
Bumps
[mdast-util-to-hast](https://github.com/syntax-tree/mdast-util-to-hast)
from 13.2.0 to 13.2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/syntax-tree/mdast-util-to-hast/releases">mdast-util-to-hast's
releases</a>.</em></p>
<blockquote>
<h2>13.2.1</h2>
<h4>Fix</h4>
<ul>
<li>ab3a795 Fix support for spaces in class names</li>
</ul>
<h4>Types</h4>
<ul>
<li>efb5312 Refactor to use <code>@import</code>s</li>
<li>a5bc210 Add declaration maps</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1">https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/174795b21f7757fffb54dd8d5fb4012f4751f791"><code>174795b</code></a>
13.2.1</li>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/3d05b3a715133df55689fe3753c2e47101315b4e"><code>3d05b3a</code></a>
Update Node in Actions</li>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7"><code>ab3a795</code></a>
Fix support for spaces in class names</li>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/efb531231020055e0dab7b39a18d80b569d5b566"><code>efb5312</code></a>
Refactor to use <code>@import</code>s</li>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/a5bc210f1aa308e4c6141ac374893c9237fcd746"><code>a5bc210</code></a>
Add declaration maps</li>
<li><a
href="https://github.com/syntax-tree/mdast-util-to-hast/commit/b54955d4e123b0167eac13646333c809bb8f301c"><code>b54955d</code></a>
Add <code>.tsbuildinfo</code> to <code>.gitignore</code></li>
<li>See full diff in <a
href="https://github.com/syntax-tree/mdast-util-to-hast/compare/13.2.0...13.2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mdast-util-to-hast&package-manager=npm_and_yarn&previous-version=13.2.0&new-version=13.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR 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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/semantic-kernel/network/alerts).

</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 16:56:14 +00:00
dependabot[bot] 1b9d5f142c Bump vite from 6.2.7 to 6.4.1 in /dotnet/samples/Demos/ProcessFrameworkWithSignalR/src/ProcessFramework.Aspire.SignalR.ReactFrontend (#13388)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite)
from 6.2.7 to 6.4.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>[email protected]</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/[email protected]/packages/create-vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.1</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>[email protected]</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/[email protected]/packages/create-vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.0</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.7</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.7/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.6</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.5</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.5/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.4</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.4/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.3</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.3/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.2</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.2/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.1</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.0</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.0-beta.2</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.0-beta.2/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.0-beta.1</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.0-beta.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.0-beta.0</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.0-beta.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/a7349ef31e3c2d7d9889ca629d43935745b7044e"><code>a7349ef</code></a>
release: v6.3.1</li>
<li><a
href="https://github.com/vitejs/vite/commit/a152b7cbac72e05668f8fc23074d531ecebb77a5"><code>a152b7c</code></a>
fix: backward compat for internal plugin <code>transform</code> calls
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19878">#19878</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/35c7f35e2b67f2158ededf2af58ecec53b3f16c5"><code>35c7f35</code></a>
fix: avoid using <code>Promise.allSettled</code> in preload function (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19805">#19805</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/5fdcfe77a93ca7bc90a5427a2a20eceaee1c4da1"><code>5fdcfe7</code></a>
release: v6.3.0</li>
<li><a
href="https://github.com/vitejs/vite/commit/d4ee5e8655a85f4d6bebc695b063d69406ab53ac"><code>d4ee5e8</code></a>
fix(hmr): avoid infinite loop happening with <code>hot.invalidate</code>
in circular dep...</li>
<li><a
href="https://github.com/vitejs/vite/commit/50034340401b4043bb0b158f18ffb7ae1b7f5c86"><code>5003434</code></a>
fix(preview): use host url to open browser (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19836">#19836</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/bf9728e79e8df905de457e15001e65e33cf13f0e"><code>bf9728e</code></a>
release: v6.3.0-beta.2</li>
<li><a
href="https://github.com/vitejs/vite/commit/380c10e665e78ef732a8d7b6c8f60a1226fc4c3b"><code>380c10e</code></a>
fix(hmr): run HMR handler sequentially (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19793">#19793</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/8bed1de5710f2a097af0e22a196545446d98f988"><code>8bed1de</code></a>
fix: addWatchFile doesn't work if base is specified (fixes <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19792">#19792</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19794">#19794</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/0a0c50a7ed38017469ed6dcec941c2d8d0efd0d0"><code>0a0c50a</code></a>
refactor: simplify pluginFilter implementation (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19828">#19828</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/[email protected]/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=6.2.7&new-version=6.4.1)](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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/semantic-kernel/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-29 16:55:32 +00:00
Shay Rojansky d3ac002ac9 .Net: Remove old MEVD integration tests (#13484)
And port a few missing cases to the new compliance tests.

Closes #12506
2026-01-29 13:36:45 +00:00
Roger Barreto 5b27a727a2 Python: Add file upload security controls to SessionsPythonPlugin (#13478)
Overriding merge checks as there are unrelated Python integration test failures

### Motivation and Context

- Uploads: Require both EnableDangerousFileUploads = true AND
AllowedUploadDirectories configured
- Downloads: Permissive by default, but if AllowedDownloadDirectories is
configured, path validation
  applies
- Both use path canonicalization to prevent traversal attacks

### 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 😄
2026-01-29 10:53:44 +00:00
Shay Rojansky 7918395b47 .Net: [MEVD] Implement key auto-generation (#13466)
* Adds IsAutoGenerated to key property definition and attribute.
* When auto-generation is on, saving a record where the key property is
the default (empty GUID, zero integer) triggers the auto-generation.
It's still possible to set the key property to a non-default value,
overriding the auto-generation.
* Auto-generation can happen in the database (mainly on the relational
databases), or on the cilent side (Guid.NewGuid()).
* IsAutoGenerated is null by default, meaning that the provider decides
whether to turn on autogeneration by default, based on the property
type. This means that GUID properties are always auto-generated by
default (if the key property is left unassigned), and int/long
properties are auto-generated on relational providers. This aligns with
the behavior in Entity Framework.
* All providers support GUID generation, by doing it on the client
before sending the record (Guid.NewGuid()). Some providers have special
behavior, e.g. PG generates UUIDv7 and SQL Server generates sequential
IDs in the database (much better for indexing). Universal GUID
auto-generation makes things much simpler for upper layers, specifically
Microsoft.Extensions.DataIngestion.

Closes #11485
2026-01-28 09:31:06 +00:00
Shay Rojansky fe11ab6ab5 .Net: [MEVD] Support .Any(x => x.Contains(...)) in filters (#13471)
~**NOTE: This PR is based on top of #13470, review 2nd commit only**~

Closes #13152
2026-01-27 16:53:00 +00:00