package provider

import (
	"testing"

	"github.com/rose_cat707/luminary/internal/model"
)

func TestTypesForCategory(t *testing.T) {
	llm := TypesForCategory(model.CategoryLLM)
	if len(llm) != 6 {
		t.Fatalf("llm types: got %d want 6", len(llm))
	}
	image := TypesForCategory(model.CategoryImage)
	if len(image) != 1 || image[0].Key != model.ProviderComfyUI {
		t.Fatalf("image types: %+v", image)
	}
	embedding := TypesForCategory(model.CategoryEmbedding)
	for _, m := range embedding {
		if m.Key == model.ProviderAnthropic {
			t.Fatal("anthropic should not support embedding category")
		}
	}
	if !IsTypeValidForCategory(model.CategoryRerank, model.ProviderCustom) {
		t.Fatal("custom should be valid for rerank")
	}
	if IsTypeValidForCategory(model.CategoryRerank, model.ProviderAnthropic) {
		t.Fatal("anthropic should not be valid for rerank")
	}
}
