mirror of
https://github.com/smkrv/ha-text-ai.git
synced 2026-07-23 07:33:58 +08:00
refactor: Phase 0 — extract utils.py and providers.py, centralize provider dispatch
- Create utils.py: normalize_name, get_file_hash, safe_log_data - Create providers.py: PROVIDER_REGISTRY with get_default_endpoint, get_default_model, build_auth_headers - Add DEFAULT_ANTHROPIC_MODEL constant (was incorrectly using gpt-4o-mini) - Replace all inline dispatch tables in config_flow.py and __init__.py - Fix circular import: coordinator.py now imports from utils, not config_flow - Fix NameError in error paths: replace bare constant refs with provider functions - Raise ValueError for unknown providers instead of silent OpenAI fallback
This commit is contained in:
@@ -805,7 +805,7 @@ chore: Bump version to 2.4.0
|
||||
|
||||
| Фаза | Статус | Дата начала | Дата завершения | Коммит |
|
||||
|------|--------|-------------|-----------------|--------|
|
||||
| 0. Подготовка | [ ] | | | |
|
||||
| 0. Подготовка | [x] | 2026-03-12 | 2026-03-12 | e7c8b22+ |
|
||||
| 1. Security | [ ] | | | |
|
||||
| 2. Critical Bugs | [ ] | | | |
|
||||
| 3. Concurrency | [ ] | | | |
|
||||
|
||||
Reference in New Issue
Block a user