Don't swallow Tetrate errors (#6998)

This commit is contained in:
David Katz
2026-02-05 23:39:08 -05:00
committed by GitHub
parent 44ac5dc1ce
commit 6fb76306ba
+8 -3
View File
@@ -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