fix: improve url construction in provider (#985)

This commit is contained in:
Salman Mohammed
2025-01-31 12:20:16 -05:00
committed by GitHub
parent 31e0b72b4f
commit 23ae315907
10 changed files with 93 additions and 38 deletions
+9
View File
@@ -230,6 +230,15 @@ impl ProviderTester {
dbg!(&result);
println!("===================");
// Ollama and OpenRouter truncate by default even when the context window is exceeded
if self.name.to_lowercase() == "ollama" || self.name.to_lowercase() == "openrouter" {
assert!(
result.is_ok(),
"Expected to succeed because of default truncation"
);
return Ok(());
}
assert!(
result.is_err(),
"Expected error when context window is exceeded"