(kind: ValidationFailureKind)
| 770 | } |
| 771 | |
| 772 | fn validation_next_steps(kind: ValidationFailureKind) -> &'static str { |
| 773 | match kind { |
| 774 | ValidationFailureKind::Credentials => { |
| 775 | "verify the provider API key and any required auth headers" |
| 776 | } |
| 777 | ValidationFailureKind::RateLimited => { |
| 778 | "retry later or verify quota/limits on the upstream provider" |
| 779 | } |
| 780 | ValidationFailureKind::RequestShape => { |
| 781 | "confirm the provider type, base URL, and model identifier" |
| 782 | } |
| 783 | ValidationFailureKind::Connectivity => { |
| 784 | "check that the service is running, confirm the base URL and protocol, and verify credentials" |
| 785 | } |
| 786 | ValidationFailureKind::UpstreamHealth => { |
| 787 | "check whether the endpoint is healthy and serving requests" |
| 788 | } |
| 789 | ValidationFailureKind::Unexpected => { |
| 790 | "confirm the endpoint URL, protocol, credentials, and model identifier" |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | async fn verify_provider_endpoint( |
| 796 | provider_name: &str, |
no outgoing calls
no test coverage detected