Skip to content

Commit 88675d0

Browse files
author
Wojciech Napierała
committed
Update health checks for Azure embedding configuration and enhance CHANGELOG
- Added a new function to validate Azure embedding deployment configurations, preventing false warnings during health checks. - Updated CHANGELOG to document the addition of Azure embedding validation in health checks and suppression of related warnings.
1 parent 8a98fab commit 88675d0

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file. The format
1414

1515
### Fixed
1616
- Prevented GUI startup from crashing on systems without a graphical backend by falling back to CLI mode.
17+
- Suppressed false Azure embedding deployment warnings when the deployment is configured in `config.json`.
1718

1819
### Documentation
1920
- Expanded README with revision logging guidance and clarified ChromaDB deployment model.

core/health.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Updates:
44
v0.1 - 2025-11-06 - Added runtime checks for Redis, ChromaDB, litellm, and
55
credential prerequisites with informative warnings.
6+
v0.2 - 2025-11-07 - Treated configured Azure embedding deployments as valid.
67
"""
78

89
from __future__ import annotations
@@ -13,7 +14,7 @@
1314
from pathlib import Path
1415
from typing import Any, List, cast
1516

16-
from config.settings import AppConfig
17+
from config.settings import AppConfig, EmbeddingConfig
1718
from core.exceptions import HealthCheckError
1819

1920

@@ -111,9 +112,27 @@ def _check_credentials(config: AppConfig) -> List[str]:
111112

112113
embedding = config.embedding
113114
if embedding and embedding.provider.lower() == "azure":
114-
if not os.getenv("AZURE_OPENAI_EMBEDDING_DEPLOYMENT"):
115+
if not _is_azure_embedding_configured(embedding):
115116
warnings.append(
116117
"Azure embedding deployment not set; defaulting to model identifier."
117118
)
118119

119120
return warnings
121+
122+
123+
_OPENAI_STANDARD_EMBEDDING_MODELS = {
124+
"text-embedding-3-large",
125+
"text-embedding-3-small",
126+
}
127+
128+
129+
def _is_azure_embedding_configured(embedding: EmbeddingConfig) -> bool:
130+
"""Return True when an Azure embedding deployment name is configured."""
131+
if os.getenv("AZURE_OPENAI_EMBEDDING_DEPLOYMENT"):
132+
return True
133+
134+
model_name = embedding.model.strip()
135+
if not model_name:
136+
return False
137+
138+
return model_name.lower() not in _OPENAI_STANDARD_EMBEDDING_MODELS

0 commit comments

Comments
 (0)