mirror of
https://github.com/ollama/ollama
synced 2026-04-23 08:45:14 +00:00
The default branch in unmarshalResponsesInputItem had two issues: - It referenced typeField.Type instead of itemType; these differ when the shorthand role-based format promotes an empty type to "message", meaning an unhandled type would show the wrong value in the error string. - It used %s formatting, so an empty type field produced the unhelpful message "unknown input item type: " with no indication what was missing. Fix by using itemType (the resolved value) with %q quoting, and add a dedicated message when itemType is empty (both type and role absent): "input item missing required 'type' field". Tests added for the empty-type and missing-type cases. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| openai.go | ||
| openai_encoding_format_test.go | ||
| openai_test.go | ||
| responses.go | ||
| responses_test.go | ||