mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-09 21:58:00 -05:00
Add debug logging for model fetching
This commit is contained in:
@@ -156,6 +156,7 @@ class AnthropicAPIClient(LocalLLMClient):
|
|||||||
|
|
||||||
self.api_key = client_options.get(CONF_ANTHROPIC_API_KEY, "")
|
self.api_key = client_options.get(CONF_ANTHROPIC_API_KEY, "")
|
||||||
self.base_url = client_options.get(CONF_ANTHROPIC_BASE_URL, DEFAULT_ANTHROPIC_BASE_URL)
|
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:
|
async def _async_build_client(self, timeout: float | None = None) -> AsyncAnthropic:
|
||||||
"""Build an async Anthropic client (runs in executor to avoid blocking SSL ops)."""
|
"""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."""
|
"""Return available models from the API."""
|
||||||
is_custom_api = self.base_url and self.base_url != DEFAULT_ANTHROPIC_BASE_URL
|
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:
|
if not is_custom_api:
|
||||||
# Official Anthropic API doesn't have a models list endpoint
|
# Official Anthropic API doesn't have a models list endpoint
|
||||||
return RECOMMENDED_ANTHROPIC_MODELS
|
return RECOMMENDED_ANTHROPIC_MODELS
|
||||||
|
|||||||
Reference in New Issue
Block a user