Skip to content

.NET: [Bug]: "Empty" AIContextProvider breaks skill loading #7210

Description

@VaclavK

Description

we have agent decorated with skill loading provider context provider - no issue

we wanted to add another augmenting context provider but even if the provider literally returns

new AIContext()

in ProvideAIContextAsync and nothing else, we see skill loading breaking with

Task failed: HTTP 400 (invalid_request_error: )
Parameter: input

Item 'fc_007f6e0e4e84d6ca006a5e107039ec8196aea3835af4b14dce' of type 'function_call' was provided without its required 'reasoning' item: 'rs_007f6e0e4e84d6ca006a5e106fd43881969b6860989376dab2'.

that's when the agent is invoked w/o session

Code Sample

protected override async ValueTask<AIContext> ProvideAIContextAsync(InvokingContext context, CancellationToken cancellationToken = default)
   {
      
       return new AIContext();

   }

Error Messages / Stack Traces

Task failed: HTTP 400 (invalid_request_error: )
Parameter: input

Item 'fc_007f6e0e4e84d6ca006a5e107039ec8196aea3835af4b14dce' of type 'function_call' was provided without its required 'reasoning' item: 'rs_007f6e0e4e84d6ca006a5e106fd43881969b6860989376dab2'.

Package Versions

1.13

.NET Version

.net 10

Additional Context

No response

Metadata

Metadata

Assignees

Labels

.NETUsage: [Issues, PRs], Target: .Netlikely-fixed

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions