Block deepseek-r1-distill models with broken tool calling format

This commit is contained in:
Thomas Marchand
2025-12-19 20:45:48 +00:00
parent a8acb3bbe2
commit 9216aebb6b

View File

@@ -339,6 +339,16 @@ impl ModelPricing {
return false;
}
// Blocklist: models with broken tool calling formats
const BROKEN_TOOL_CALLING: &[&str] = &[
"deepseek/deepseek-r1-distill", // Uses non-standard <tool▁calls▁begin> format
];
// Skip models with broken tool calling
if BROKEN_TOOL_CALLING.iter().any(|blocked| m.model_id.starts_with(blocked)) {
return false;
}
// Must match an allowed model base (exact match or with version suffix)
CAPABLE_MODEL_BASES.iter().any(|base| {
// Exact match