.NET: Improve inline skill argument error guidance - #8118
Conversation
Point users to the custom argument marshaler when a model supplies inline skill arguments in an unsupported JSON format. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 406e0b5c-da2c-40f2-9232-4ff2742aad2c
There was a problem hiding this comment.
🟢 Approval recommended
The focused diagnostic change is accurate and adequately tested.
Pull request overview
Improves diagnostics for unsupported inline skill argument formats.
Changes:
- Adds guidance to configure a custom argument marshaler.
- Verifies the guidance in the existing string-argument test.
File summaries
| File | Description |
|---|---|
AgentInlineSkillScript.cs |
Extends the exception message. |
SkillScriptArgumentMarshalerTests.cs |
Asserts the new guidance. |
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.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): b85d427eea49
Model: gpt-5.6-sol-fast
Overview
The PR preserves the strict default argument-marshaling contract while adding actionable guidance to the existing invalid-kind exception. Public skill- and class-level marshaler configuration already provides the suggested recovery path, and tests cover strict rejection, custom marshaling, and propagation across construction paths. No publishable Critical, High, or Medium concern was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Motivation & Context
Local and smaller models may serialize inline skill arguments into a JSON string instead of emitting a JSON object. The resulting exception explains the type mismatch but does not point users to the supported custom argument marshaler, making the recovery path difficult to discover.
Description & Review Guide
Related Issue
Closes #7989
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.