Commit Graph

11 Commits

Author SHA1 Message Date
Alex O'Connell
136a25f91b code cleanup to remove explicit constant name references to openai and anthropic 2026-01-04 09:10:29 -05:00
Thomas
489c1fa1e0 Address PR feedback for Anthropic backend
- Remove cloud-first defaults, require base URL to be specified
- Use CONF_OPENAI_API_KEY instead of separate CONF_ANTHROPIC_API_KEY
- Merge anthropic_connection_schema into remote_connection_schema
- Use existing get_file_contents_base64 utility from utils
- Use Anthropic models list endpoint instead of hardcoded list
- Update anthropic SDK version requirement to >=0.75.0
- Remove trademark reference from UI labels
2025-12-29 22:43:53 -05:00
Thomas
202bc4aade Remove debug logging 2025-12-28 23:15:45 -05:00
Thomas
c00e357b33 Add debug logging for model fetching 2025-12-28 23:07:14 -05:00
Thomas
fd0a1d4926 Fetch available models from API for compatible endpoints 2025-12-28 23:03:30 -05:00
Thomas
55248216b6 Fix auth headers for z.ai - remove Bearer prefix 2025-12-28 22:59:32 -05:00
Thomas
21b71d86a7 Fix auth for compatible APIs - use both Bearer and x-api-key headers 2025-12-28 22:48:14 -05:00
Thomas
c90676e081 Add Bearer auth header for Anthropic-compatible APIs 2025-12-28 22:43:36 -05:00
Thomas
738671d6b8 Add better error logging for Anthropic connection validation 2025-12-28 22:38:12 -05:00
Thomas
3c2257d9a6 Fix blocking SSL call by creating Anthropic client in executor 2025-12-28 22:23:40 -05:00
Thomas
e84e4c21f8 Add Anthropic API backend support
Adds a new backend for Anthropic API alongside existing backends
(Ollama, OpenAI, llama.cpp, etc.).

Features:
- Support for official Anthropic API (api.anthropic.com)
- Custom base URL support for Anthropic-compatible servers
- Streaming responses via Messages API
- Tool calling support with Home Assistant integration
- Vision support for image attachments

Files changed:
- backends/anthropic.py: New AnthropicAPIClient implementation
- const.py: Added backend type and configuration constants
- __init__.py: Registered new backend
- config_flow.py: Added connection schema and options
- manifest.json: Added anthropic>=0.40.0 dependency
- translations/en.json: Added UI labels
2025-12-28 21:51:23 -05:00