"""Default providers when no model backend is configured — AI features are off. They fail loudly (rather than silently doing nothing) so a caller that reaches for an unconfigured capability gets a clear, actionable error. """ from app.integrations.models.base import ( EmbeddingProvider, LLMProvider, ModelProviderNotConfigured, ) _MSG = ( "No model provider configured. Set MODEL_PROVIDER (e.g. 'anthropic') and the " "provider's credentials to enable AI features." ) class NullLLMProvider(LLMProvider): async def complete(self, *, prompt: str, system: str | None = None) -> str: raise ModelProviderNotConfigured(_MSG) class NullEmbeddingProvider(EmbeddingProvider): dimensions = 0 async def embed(self, texts: list[str]) -> list[list[float]]: raise ModelProviderNotConfigured( "No embedding provider configured. Set EMBEDDING_PROVIDER and its " "credentials to enable match ranking." )