CREATE TABLE IF NOT EXISTS ai_model (
    id UUID PRIMARY KEY,
    provider_id UUID NOT NULL,
    name VARCHAR(255) NOT NULL,
    modality VARCHAR(255) NOT NULL,
    capability VARCHAR(255) NOT NULL,
    context_length BIGINT NOT NULL,
    max_output_tokens BIGINT,
    training_cutoff TIMESTAMPTZ,
    is_open_source BOOLEAN NOT NULL DEFAULT false,
    status VARCHAR(255) NOT NULL,
    created_at TIMESTAMPTZ NOT NULL,
    updated_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_ai_model_provider_id ON ai_model (provider_id);
