"""
Add is_system_vision_model to LLMModel and vision_analysis purpose to LLMUsage.
"""

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("llm_manager", "0002_add_bedrock_api_type"),
    ]

    operations = [
        migrations.AddField(
            model_name="llmmodel",
            name="is_system_vision_model",
            field=models.BooleanField(
                default=False,
                help_text=(
                    "Mark this as the system-wide vision model for image analysis. "
                    "Only ONE vision model should have this set to True."
                ),
            ),
        ),
        migrations.AddIndex(
            model_name="llmmodel",
            index=models.Index(
                fields=["is_system_vision_model", "model_type"],
                name="llm_manager__is_syst_b2f4e7_idx",
            ),
        ),
        migrations.AlterField(
            model_name="llmusage",
            name="purpose",
            field=models.CharField(
                choices=[
                    ("responder", "RAG Responder"),
                    ("reviewer", "RAG Reviewer"),
                    ("embeddings", "Document Embeddings"),
                    ("search", "Vector Search"),
                    ("reranking", "Re-ranking"),
                    ("multimodal_embed", "Multimodal Embedding"),
                    ("vision_analysis", "Vision Analysis"),
                    ("other", "Other"),
                ],
                db_index=True,
                default="other",
                max_length=50,
            ),
        ),
    ]
