Don't swallow Tetrate errors (#6998)
This commit is contained in:
@@ -254,8 +254,10 @@ impl Provider for TetrateProvider {
|
|||||||
{
|
{
|
||||||
Ok(response) => response,
|
Ok(response) => response,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tracing::warn!("Failed to fetch models from Tetrate Agent Router Service API: {}, falling back to manual model entry", e);
|
return Err(ProviderError::ExecutionError(format!(
|
||||||
return Ok(None);
|
"Failed to fetch models from Tetrate API: {}. Please check your API key and account at {}",
|
||||||
|
e, TETRATE_DOC_URL
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -278,7 +280,10 @@ impl Provider for TetrateProvider {
|
|||||||
"Tetrate Agent Router Service API returned an error: {}",
|
"Tetrate Agent Router Service API returned an error: {}",
|
||||||
msg
|
msg
|
||||||
);
|
);
|
||||||
return Ok(None);
|
return Err(ProviderError::ExecutionError(format!(
|
||||||
|
"Tetrate API error: {}. Please check your API key and account at {}",
|
||||||
|
msg, TETRATE_DOC_URL
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// The response format from /v1/models is expected to be OpenAI-compatible
|
// The response format from /v1/models is expected to be OpenAI-compatible
|
||||||
|
|||||||
Reference in New Issue
Block a user