Skip to content

fix(backend): replace hardcoded available_providers with real health checks#3303

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-3276
Apr 3, 2026
Merged

fix(backend): replace hardcoded available_providers with real health checks#3303
mrveiss merged 1 commit intoDev_new_guifrom
issue-3276

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 3, 2026

Closes #3276

Summary

  • Added _get_available_providers() async helper that calls ProviderHealthManager.check_all_providers() with a 3-second timeout and caching enabled
  • Replaced the hardcoded ["ollama", "openai", "anthropic"] list in get_agent_config with await _get_available_providers()
  • Only providers where available=True are returned, reflecting real reachability
  • Fails open — returns empty list on exception (logs a warning) so the endpoint remains stable

Test plan

  • Provider reports unavailable when endpoint is unreachable
  • Provider reports available when endpoint responds
  • flake8 passes (verified: clean)

🤖 Generated with Claude Code

…checks (#3276)

Replaces the static list ["ollama", "openai", "anthropic"] in
get_agent_config with a call to ProviderHealthManager.check_all_providers()
(3 s timeout, cache enabled). Only providers where available=True are
returned, so the UI reflects actual reachability rather than a fixed list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mrveiss
Copy link
Copy Markdown
Owner Author

mrveiss commented Apr 3, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@mrveiss mrveiss merged commit d43baeb into Dev_new_gui Apr 3, 2026
3 of 4 checks passed
@mrveiss mrveiss deleted the issue-3276 branch April 3, 2026 13:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

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