feat: tools bei Modellen ohne Werkzeug-Vorlage klar ablehnen, nicht bestandenen Werkzeug-Test anzeigen (#1268)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 12:28:21 +01:00
parent 21d419aab1
commit 2ad3121c7c
9 changed files with 168 additions and 3 deletions

View File

@ -35,6 +35,18 @@ impl ApiError {
self
}
/// Das Modell kann `tools` nicht entgegennehmen (→ #1268).
pub fn tools_unsupported(model: &str) -> Self {
Self::new(
StatusCode::BAD_REQUEST,
"invalid_request_error",
"tools_unsupported",
format!(
"Das Modell \"{model}\" kann keine Werkzeuge: Seine Chat-Vorlage kennt sie nicht. Bitte ohne \"tools\" anfragen oder ein anderes Modell wählen."
),
)
}
/// Die Warteschlange ist voll.
pub fn queue_full() -> Self {
Self::new(