You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-issue of #8125 (please link it as a child; I cannot add sub-issues). Siblings #8446 (Hyperlight, PR #8528) and #8445 (Python, merged in #8459) are separate. A fix for this issue should reference #8125 as partially addressed and must not close the parent.
Confirmed behavior
At upstream/main, dotnet/src/Microsoft.Agents.AI.LocalCodeAct/Internal/InstructionBuilder.cs::BuildExecuteCodeDescription emits each host AIFunction name and description but never reads JsonSchema. The model does not receive parameter names, requiredness, descriptions, enums, or nested shapes for tools registered on LocalCodeActProviderOptions.Tools.
Both LocalExecuteCodeFunction and LocalCodeActProvider use this shared builder, so both entry points are affected. This is the same defect as #8446 in a different package; the Python fix (#8459) covered both of its runtimes (Hyperlight and Monty) in one change, but the .NET child was scoped to Hyperlight only.
Reproduction
Register a tool with a required parameter, for example AIFunctionFactory.Create((string partNumber) => ..., "get_stock"), on LocalCodeActProviderOptions.Tools, then inspect new LocalExecuteCodeFunction(pythonPath, options).Description. The tool listing contains only the name and description. Generated code then fails at runtime with "The arguments dictionary is missing a value for the required parameter 'partNumber'".
Parent issue
Sub-issue of #8125 (please link it as a child; I cannot add sub-issues). Siblings #8446 (Hyperlight, PR #8528) and #8445 (Python, merged in #8459) are separate. A fix for this issue should reference #8125 as partially addressed and must not close the parent.
Confirmed behavior
At upstream/main,
dotnet/src/Microsoft.Agents.AI.LocalCodeAct/Internal/InstructionBuilder.cs::BuildExecuteCodeDescriptionemits each hostAIFunctionname and description but never readsJsonSchema. The model does not receive parameter names, requiredness, descriptions, enums, or nested shapes for tools registered onLocalCodeActProviderOptions.Tools.Both
LocalExecuteCodeFunctionandLocalCodeActProvideruse this shared builder, so both entry points are affected. This is the same defect as #8446 in a different package; the Python fix (#8459) covered both of its runtimes (Hyperlight and Monty) in one change, but the .NET child was scoped to Hyperlight only.Reproduction
Register a tool with a required parameter, for example
AIFunctionFactory.Create((string partNumber) => ..., "get_stock"), onLocalCodeActProviderOptions.Tools, then inspectnew LocalExecuteCodeFunction(pythonPath, options).Description. The tool listing contains only the name and description. Generated code then fails at runtime with "The arguments dictionary is missing a value for the required parameter 'partNumber'".Acceptance criteria
JsonSchemain the model-facing execute-code description for both entry points, using the same rendering as .NET: include host-tool JsonSchema in Hyperlight execute_code descriptions #8528 so the two .NET packages stay consistent.tool_description_format) are out of scope and tracked separately.Status
I have an implementation with tests ready and will open a PR referencing this issue.