fix(doctor): validate providers with real test calls, not /models (#48) - #62
Conversation
The doctor diagnostic warned/failed when a provider's configured model name wasn't advertised in GET /models. Proxy gateways (e.g. 9Router) that don't expose /models, or expose different model naming, produced false positives even though the provider was fully functional. Replace the /models-list check with the same real test-call logic the setup/dashboard flows already use: - HttpEmbedderProvider::probe() issues a real POST /embeddings and reports the returned dimension. - HttpLlmProvider::probe() issues a real POST /chat/completions. - doctor now reports success when the real call succeeds, and still fails on 401/5xx/unreachable/parse errors. Regression tests use a mock with no /models endpoint at all (404) but working /embeddings and /chat/completions, covering both raw (embedder) and llm modes, plus a 500 misconfigured-provider case.
|
Review of PR #62 at 🔴 BlockingNone. CI green: 🟡 Warning #1 — LLM
|
The doctor diagnostic warned/failed when a provider's configured model name wasn't advertised in GET /models. Proxy gateways (e.g. 9Router) that don't expose /models, or expose different model naming, produced false positives even though the provider was fully functional.
Replace the /models-list check with the same real test-call logic the setup/dashboard flows already use:
Regression tests use a mock with no /models endpoint at all (404) but working /embeddings and /chat/completions, covering both raw (embedder) and llm modes, plus a 500 misconfigured-provider case.