""" AIModel model — registered AI model configurations. Maps to AGENT.md DBML: `ai_models` table (Lines 505-513). """ from django.db import models from core.models import BaseModel class AIModel(BaseModel): """ Stores configuration for AI models (OpenAI, local, Ollama, etc.). """ name = models.CharField(max_length=100) # "gpt-4", "llama-3-8b" provider = models.CharField(max_length=50) # "openai", "local", "ollama" base_url = models.URLField(blank=True, default="") api_key_ref = models.CharField(max_length=255, blank=True, default="") is_active = models.BooleanField(default=True) class Meta: db_table = "ai_models" ordering = ["-created_at"] def __str__(self) -> str: return f"{self.name} ({self.provider})"