From c00e357b33d034b68504ff7c35cafeadb3dcf0da Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 28 Dec 2025 23:07:14 -0500 Subject: [PATCH] Add debug logging for model fetching --- custom_components/llama_conversation/backends/anthropic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/custom_components/llama_conversation/backends/anthropic.py b/custom_components/llama_conversation/backends/anthropic.py index eca3899..e2a5641 100644 --- a/custom_components/llama_conversation/backends/anthropic.py +++ b/custom_components/llama_conversation/backends/anthropic.py @@ -156,6 +156,7 @@ class AnthropicAPIClient(LocalLLMClient): self.api_key = client_options.get(CONF_ANTHROPIC_API_KEY, "") self.base_url = client_options.get(CONF_ANTHROPIC_BASE_URL, DEFAULT_ANTHROPIC_BASE_URL) + _LOGGER.debug("AnthropicAPIClient init: base_url=%s, has_api_key=%s", self.base_url, bool(self.api_key)) async def _async_build_client(self, timeout: float | None = None) -> AsyncAnthropic: """Build an async Anthropic client (runs in executor to avoid blocking SSL ops).""" @@ -253,6 +254,8 @@ class AnthropicAPIClient(LocalLLMClient): """Return available models from the API.""" is_custom_api = self.base_url and self.base_url != DEFAULT_ANTHROPIC_BASE_URL + _LOGGER.debug("async_get_available_models: base_url=%s, is_custom_api=%s", self.base_url, is_custom_api) + if not is_custom_api: # Official Anthropic API doesn't have a models list endpoint return RECOMMENDED_ANTHROPIC_MODELS