"""Ping configured model providers without printing secret values.""" from __future__ import annotations from core.router import _PROVIDER_CLASSES def main() -> int: failures = 0 for name, provider_class in _PROVIDER_CLASSES.items(): try: provider = provider_class() provider.chat( "Reply with JSON only.", [{"role": "user", "content": 'Reply exactly {"ok": true}'}], 0.1, True, ) print(f"{name}: OK") except Exception as exc: # noqa: BLE001 - diagnostic command failures += 1 print(f"{name}: FAILED ({type(exc).__name__}: {str(exc)[:240]})") return failures if __name__ == "__main__": raise SystemExit(main())