feat(ai): add provider connection test (#38)
This commit is contained in:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user