package openai

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestDefaultModelIDs(t *testing.T) {
	ids := DefaultModelIDs()
	
	// Should return same number of IDs as DefaultModels
	require.Equal(t, len(DefaultModels), len(ids))
	
	// Check all expected IDs are present
	expected := []string{
		"gpt-5.4",
		"gpt-5.4-mini",
		"gpt-5.4-nano",
		"gpt-5.3-codex",
		"gpt-5.3-codex-spark",
		"gpt-5.2",
		"gpt-5.2-codex",
		"gpt-5.1-codex-max",
		"gpt-5.1-codex",
		"gpt-5.1",
		"gpt-5.1-codex-mini",
		"gpt-5",
	}
	require.Equal(t, expected, ids)
}

func TestDefaultModels(t *testing.T) {
	// Verify DefaultModels is not empty
	require.NotEmpty(t, DefaultModels)
	
	// Verify each model has required fields
	for _, m := range DefaultModels {
		require.NotEmpty(t, m.ID, "Model ID should not be empty")
		require.NotEmpty(t, m.DisplayName, "DisplayName should not be empty")
		require.NotEmpty(t, m.Object, "Object should not be empty")
		require.NotEmpty(t, m.OwnedBy, "OwnedBy should not be empty")
		require.NotZero(t, m.Created, "Created should not be zero")
	}
}

func TestDefaultTestModel(t *testing.T) {
	require.Equal(t, "gpt-5.1-codex", DefaultTestModel)
}
