def is_valid()

in backend.py [0:0]


    def is_valid(self):
        prefs = bpy.context.preferences.addons[__package__].preferences
        if prefs.backend_type == "LOCAL":
            return prefs.current_model in get_available_models()
        elif prefs.backend_type == "REMOTE":
            return (
                (
                    prefs.llm_provider == "ollama"
                    and prefs.ollama_endpoint
                    and prefs.ollama_model_name
                )
                or (
                    prefs.llm_provider == "huggingface"
                    and prefs.huggingface_model_id
                    and prefs.huggingface_api_key
                )
                or (
                    prefs.llm_provider == "anthropic"
                    and prefs.anthropic_model_id
                    and prefs.anthropic_api_key
                )
                or (
                    prefs.llm_provider == "openai"
                    and prefs.openai_model_id
                    and prefs.openai_api_key
                )
            )