Skip to content

Fix AI health-check 500 when AI is not configured - #314

Merged
pellecchialuigi merged 1 commit into
mainfrom
fix/ai-health-check-unconfigured
Aug 27, 2026
Merged

Fix AI health-check 500 when AI is not configured#314
pellecchialuigi merged 1 commit into
mainfrom
fix/ai-health-check-unconfigured

Conversation

@pellecchialuigi

@pellecchialuigi pellecchialuigi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

GET /ai/health-check crashed with ValueError: unknown url type 'None/models' because validate_settings() only rejected None. Default placeholders (empty host/model, port 0) passed validation, _base_url stayed unset, and urllib raised outside the try/except.

Treat empty values as unconfigured, avoid str(None) becoming the string "None", and return False from ai_health_check() when the base URL is missing so the UI can hide AI features instead of 500.

Solves #317

GET /ai/health-check crashed with ValueError: unknown url type
'None/models' because validate_settings() only rejected None.
Default placeholders (empty host/model, port 0) passed validation,
_base_url stayed unset, and urllib raised outside the try/except.

Treat empty values as unconfigured, avoid str(None) becoming the
string "None", and return False from ai_health_check() when the
base URL is missing so the UI can hide AI features instead of 500.

Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
@pellecchialuigi
pellecchialuigi marked this pull request as ready for review August 27, 2026 10:28
@pellecchialuigi
pellecchialuigi merged commit 0fff954 into main Aug 27, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant