feat(ai): add provider connection test (#38)

This commit is contained in:
2026-11-24 16:21:48 +01:00
parent 2e865204c8
commit 54fced1ffb
16 changed files with 599 additions and 18 deletions

View File

@ -116,6 +116,9 @@ func (p *OllamaProvider) ListModelsDetailed(ctx context.Context) ([]OllamaModelI
return nil, err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil, &summaryHTTPError{status: resp.StatusCode, err: fmt.Errorf("model discovery failed")}
}
raw, _ := io.ReadAll(resp.Body)
var result struct {