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.
This commit is contained in:
parent
951d1bb677
commit
e9e5104a73
|
|
@ -689,12 +689,9 @@ pub fn model_token_limit(model: &str) -> Option<ModelTokenLimit> {
|
||||||
max_output_tokens: 16_384,
|
max_output_tokens: 16_384,
|
||||||
context_window_tokens: 200_000,
|
context_window_tokens: 200_000,
|
||||||
}),
|
}),
|
||||||
// Generic fallback for any model: assume 128K context, 8K output.
|
// Unknown models return None so preflight skips the context-window
|
||||||
// This prevents the "unknown model → no limit check → context overflow" bug.
|
// check and lets the API enforce its own limits.
|
||||||
_ => Some(ModelTokenLimit {
|
_ => None,
|
||||||
max_output_tokens: 8_192,
|
|
||||||
context_window_tokens: 131_072,
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue