chore: Remove blocking read strings
This commit is contained in:
parent
bc0be9a3c1
commit
b9af601943
26 changed files with 331 additions and 243 deletions
|
|
@ -1054,7 +1054,10 @@ impl Provider for OpenAiCompatibleProvider {
|
|||
|
||||
let url = self.chat_completions_url();
|
||||
let response = self
|
||||
.apply_auth_header(self.http_client().post(&url).json(&native_request), credential)
|
||||
.apply_auth_header(
|
||||
self.http_client().post(&url).json(&native_request),
|
||||
credential,
|
||||
)
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,14 +45,12 @@ fn is_non_retryable(err: &anyhow::Error) -> bool {
|
|||
return true;
|
||||
}
|
||||
|
||||
let model_catalog_mismatch = msg_lower.contains("model")
|
||||
msg_lower.contains("model")
|
||||
&& (msg_lower.contains("not found")
|
||||
|| msg_lower.contains("unknown")
|
||||
|| msg_lower.contains("unsupported")
|
||||
|| msg_lower.contains("does not exist")
|
||||
|| msg_lower.contains("invalid"));
|
||||
|
||||
model_catalog_mismatch
|
||||
|| msg_lower.contains("invalid"))
|
||||
}
|
||||
|
||||
/// Check if an error is a rate-limit (429) error.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue