From 334768249f3cc2de324b09cf19ea1b51e28857fb Mon Sep 17 00:00:00 2001 From: TheArchitectit Date: Sat, 25 Jul 2026 00:47:42 -0500 Subject: [PATCH] fix: model_token_limit catch-all returns None for unknown models Restores the fix from @Offwhite-Del that was lost during rebase. Unknown models now return None so preflight skips the context-window check and lets the API enforce its own limits. --- rust/crates/api/src/providers/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/crates/api/src/providers/mod.rs b/rust/crates/api/src/providers/mod.rs index 1584ed3a..7e503410 100644 --- a/rust/crates/api/src/providers/mod.rs +++ b/rust/crates/api/src/providers/mod.rs @@ -701,6 +701,8 @@ pub fn model_token_limit(model: &str) -> Option { max_output_tokens: 8_192, context_window_tokens: 131_072, }), + // Unknown models return None so preflight skips the context-window + // check and lets the API enforce its own limits. _ => None, } }