[BREAKING] .NET: Fix strict skill script argument schemas - #8120
Draft
Manjunath Janardhan (manjunathshiva) wants to merge 1 commit into
Draft
Manjunath Janardhan (manjunathshiva) wants to merge 1 commit into
Manjunath Janardhan (manjunathshiva) wants to merge 1 commit into
Conversation
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:48 — with
GitHub Actions
Inactive
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:49 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Manjunath Janardhan (manjunathshiva)
September 7, 2026 11:50
View session
Manjunath Janardhan (manjunathshiva)
temporarily deployed
to
github-app-auth
September 7, 2026 11:50 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The intentional model-facing breaking change and custom-marshaler implications require maintainer design approval.
Pull request overview
Fixes strict-provider schema rejection while preserving flexible script payloads.
Changes:
- Exposes script arguments as nullable JSON-encoded strings.
- Decodes encoded arguments once while retaining structured invocations.
- Adds schema, compatibility, marshaling, and error-policy tests.
File summaries
| File | Description |
|---|---|
AgentSkillsProvider.cs |
Transforms the argument schema and decodes payloads. |
AgentSkillsProviderTests.cs |
Adds regression and compatibility coverage. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
run_skill_scriptadvertisesJsonElement? argumentsas an unconstrained schema ({"default":null}). Azure OpenAI rejects this tool with HTTP 400invalid_function_parameterswhen strict mode is enabled, including when a skill has no scripts and the request disables tool calls.Description & Review Guide
argumentsas a nullable JSON-encoded string using the function schema transformation hook. Decode strings exactly once at the provider boundary, then pass the resulting JSON value to the existing script runner or marshaler. Keep direct object/array invocation, tool names, approval wrapping, service-provider forwarding, and C# script interfaces. Add regression coverage for the schema, file arrays, inline objects, legacy structured calls, null, malformed JSON, and single decoding with a custom marshaler.{ "value": 42 }receives that object after the model suppliesarguments: "{\"value\":42}". Custom callers or marshalers that previously used raw string arguments must now JSON-encode those strings. The outer tool schema is strictly validated; payload validation remains with the script or marshaler. Malformed JSON follows the existingIncludeDetailedErrorspolicy.Reproduced before the fix against a live Azure OpenAI
gpt-5.5deployment using the v1 Chat Completions API, .NET SDK 10.0.303,Microsoft.Extensions.AI.OpenAI10.9.0, andOpenAI2.12.0. The original strict request returned HTTP 400. With the patch, strict and non-strict requests both returned HTTP 200. A further strict request generated an actualrun_skill_scriptcall with JSON-encoded arguments, and invoking it returned the expected result,42.Full solution build completed with zero warnings or errors. The affected core test project passed all 2,127 tests on .NET 10. The full .NET 10 unit run completed with 7,208 passed, 65 skipped, one failure in the unrelated
DevUIIntegrationTests.TestServerWithDevUI_ResolvesRequestToWorkflow_ByKeyAsynctest (null discovery collection). The entire DevUI project passed on an immediate isolated rerun. An earlier hosting telemetry assertion also passed on rerun. The all-tests checklist remains unchecked to reflect the full-run result. Local execution used the U.S. locale,DOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE=false, and permission for the Foundry test host to create its local state directory. Formatting and style checks passed.Related Issue
Fixes #8094
No competing open PR was found in the issue discussion or linked timeline when preparing this draft.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.