Skip to content

.NET: [Bug]: FunctionCall regressions in 1.0.0-preview.260209.1 #3849

@mdesalvo

Description

@mdesalvo

Description

Up to version 1.0.0-preview.260205.1 I had this correct behavior from LLM, showing access to prompted application tools for reading/writing context variables (user identifier to show a carousel of invoices):

[0]: [user] Text = "Show me my billing details"
[1]: [assistant] FunctionCall = call_FZfVUNL4B1INRx40uw6Bk58w, GetContextVariable([variableName, userId])
[2]: [tool] FunctionResult = call_FZfVUNL4B1INRx40uw6Bk58w, Information userId not available in context: you need to engage SetContextVariable to set it.
[3]: [assistant] Text = "To retrieve your billing details, could you kindly share your identification code?"
[4]: [user] Text = "U99"
[5]: [assistant] FunctionCall = call_1TnmhMcVqw2NpUbP3hqxjKaL, SetContextVariable([variableName, userId], [variableValue, U99])
[6]: [tool] FunctionResult = call_1TnmhMcVqw2NpUbP3hqxjKaL, Information userId inserted in context with value: U99
[7]: [assistant] FunctionCall = call_my2AmDTdENExCOzihDbaIfxV, GetInvoices([userId, U99], [count, 5])
[8]: [tool] FunctionResult = call_my2AmDTdENExCOzihDbaIfxV, {"userId":"U99","totalCount":4,"invoices":[{"invoiceId":"INV-2025-001","period":"October 2025","issueDate":"01/11/2025","dueDate":"15/12/2025","total":130.00,"status":"Pending","statusIcon":"\u23F3","paidDate":null,"daysOverdue":58},{"invoiceId":"INV-2025-002","period":"September 2025","issueDate":"01/10/2025","dueDate":"15/11/2025","total":150.00,"status":"Paid","statusIcon":"\u2705","paidDate":"14/11/2025","daysOverdue":null},{"invoiceId":"INV-2025-003","period":"June - August 2025","issueDate":"01/09/2025","dueDate":"15/10/2025","total":125.00,"status":"Paid","statusIcon":"\u2705","paidDate":"13/10/2025","daysOverdue":null},{"invoiceId":"INV-2025-004","period":"May 2025","issueDate":"01/06/2025","dueDate":"15/07/2025","total":100.00,"status":"Paid","statusIcon":"\u2705","paidDate":"13/09/2025","daysOverdue":null}]}
[9]: [assistant] FunctionCall = call_x5ZfrOxXJH6lY0wq3r4ypBCb, SetRichCard([richCard, {"title":"Recent Invoices","subtitle":"Latest billing details","components":[{"type":"section","title":"Invoice INV-2025-001","components":[{"type":"key_value","key":"Period","value":"October 2025"},{"type":"key_value","key":"Issued","value":"01/11/2025"},{"type":"key_value","key":"Due","value":"15/12/2025"},{"type":"key_value","key":"Total Amount","value":"€130.00"},{"type":"badge","text":"Pending","variant":"warning"}]},{"type":"divider"},{"type":"section","title":"Invoice INV-2025-002","components":[{"type":"key_value","key":"Period","value":"September 2025"},{"type":"key_value","key":"Issued","value":"01/10/2025"},{"type":"key_value","key":"Due","value":"15/11/2025"},{"type":"key_value","key":"Total Amount","value":"€150.00"},{"type":"badge","text":"Paid","variant":"success"}]},{"type":"divider"},{"type":"section","title":"Invoice INV-2025-003","components":[{"type":"key_value","key":"Period","value":"June - August 20
25"},{"type":"key_va...
[10]: [tool] FunctionResult = call_x5ZfrOxXJH6lY0wq3r4ypBCb, Rich card set successfully. The user will see a structured visual card titled 'Recent Invoices'. You can now provide additional context or explanation in text if needed.
[11]: [assistant] FunctionCall = call_VuZcJhFNW6s8Ocxrv7RwTGew, SetQuickReplies([quickReplies, [{"id":"INV-2025-001","label":"📄 Invoice INV-2025-001 (€130)","value":"Show details for invoice INV-2025-001"},{"id":"INV-2025-002","label":"📄 Invoice INV-2025-002 (€150)","value":"Show details for invoice INV-2025-002"},{"id":"INV-2025-003","label":"📄 Invoice INV-2025-003 (€125)","value":"Show details for invoice INV-2025-003"},{"id":"INV-2025-004","label":"📄 Invoice INV-2025-004 (€100)","value":"Show details for invoice INV-2025-004"},{"id":"continue_agent","label":"💬 Ask me something else","value":"I want to ask you something else"},{"id":"exit_agent","label":"✨ We're done, thanks","value":"We're done, thanks","termination":true}]])
[12]: [tool] FunctionResult = call_VuZcJhFNW6s8Ocxrv7RwTGew, Quick reply buttons set successfully. The user will see 6 interactive options. Now provide your text response to the user - the quick reply buttons will appear below your message.
[13]: [assistant] Text = "I have summoned your recent invoices for examination. Select any below to delve into its deeper wisdom or to inquire further."

Now with version 1.0.0-preview.260209.1 I see a wrong behavior from LLM, showing that LLM gets stuck by apparently loosing initial context and not being aware of all the prompted tools:

[0]: [user] Text = "Show me my billing details"
[1]: [assistant] FunctionCall = call_dvCIHyqLpwe0uTvDmn1TBf0O, GetContextVariable([variableName, userId])
[2]: [tool] FunctionResult = call_dvCIHyqLpwe0uTvDmn1TBf0O, Information userId not available in context: you need to engage SetContextVariable to set it.
[3]: [assistant] Text = "To retrieve your billing details, I'll need your identification code first. Could you provide it?"
[4]: [user] Text = "U99"
[5]: [assistant] FunctionCall = call_v4iOVnvGIbxGNcoFnQTh5y37, GetContextVariable([variableName, userId])
[6]: [tool] FunctionResult = call_v4iOVnvGIbxGNcoFnQTh5y37, Information userId not available in context: you need to engage SetContextVariable to set it.
[7]: [assistant] Text = "To proceed, could you confirm whether "U99" is your user ID?"
[8]: [user] Text = "yes it is"
[9]: [assistant] Text = "Could you clarify your request so I may assist you better?"
[10]: [user] Text = "I asked Show me my billing details"
[11]: [assistant] FunctionCall = call_OxrNlqyGOyqbZbBVWA2eIDuy, GetContextVariable([variableName, userId])
[12]: [tool] FunctionResult = call_OxrNlqyGOyqbZbBVWA2eIDuy, Information userId not available in context: you need to engage SetContextVariable to set it.
[13]: [assistant] Text = "To unveil your billing details, I first need your identification code. Could you kindly provide it for me?"

The correct behavior is restored if I just rollback nuget packages of Microsoft.Agents.AI to the working version (up to 1.0.0-preview.260205.1), so it is not a problem of the LLM itself (AzureOpenAI) or my application (tests done at 100% code parity, with just changed framework nugets).

Code Sample

Error Messages / Stack Traces

Package Versions

1.0.0-preview.260209.1

.NET Version

.NET 10.0

Additional Context

The session is consumed by the agent in streaming mode.

Metadata

Metadata

Assignees

Labels

.NETagentsIssues related to single agentsbugSomething isn't workingv1.0Features being tracked for the version 1.0 GA

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions