openai-go icon indicating copy to clipboard operation
openai-go copied to clipboard

Implicit ignore of omitempty struct tags

Open l0nedigit opened this issue 1 month ago • 0 comments

Just a thought, but it may be worthwhile to add a note on structured outputs (docs & codebase) in that if your struct tags have omitempty that the openai-go api will silently ignore them and the model will not populate that field.

Chased my tail on this one for a while. Is there a way to specify to not ignore omitempty tags?

l0nedigit avatar Oct 15 '25 12:10 l0nedigit