| 1 | package provider |
| 2 | |
| 3 | import "testing" |
| 4 | |
| 5 | func TestModelInfoSupportsInputRequiresExplicitModality(t *testing.T) { |
| 6 | if !(ModelInfo{ID: "vision", InputModalities: []ModelModality{ModalityText, ModalityImage}}).SupportsInput(ModalityImage) { |
| 7 | t.Fatal("image modality should be supported when explicitly declared") |
| 8 | } |
| 9 | if (ModelInfo{ID: "text", InputModalities: []ModelModality{ModalityText}}).SupportsInput(ModalityImage) { |
| 10 | t.Fatal("text-only model must not support image input") |
| 11 | } |
| 12 | if (ModelInfo{ID: "unknown"}).SupportsInput(ModalityImage) { |
| 13 | t.Fatal("unknown modality must not be treated as supported") |
| 14 | } |
| 15 | } |
| 16 |