Skip to content

[Bug]: TryResolve{Property}Array methods generate ModelReaderWriter.Write calls with missing arg in OpenAI #10838

@MaiLinhP

Description

@MaiLinhP

Describe the bug

The new TryResolve{Property}Array methods currently generate ModelReaderWriter.Write(collection, options);, which causes AOT trimming error in OpenAI as it's expecting ModelReaderWriter.Write(collection, options, OpenAIContext.Default);

This ModelReaderWriter.Write call is being generated correctly with the needed OpenAIContext.Default argument everywhere else.

Reproduction

Upgrade OpenAI to newest generator version, run Invoke_Codegen, and then run dotnet build.

Checklist

Metadata

Metadata

Labels

bugSomething isn't workingemitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions