Skip to content

Commit 7be20c0

Browse files
committed
fix: 修复上下文限制逻辑
1 parent 1028d40 commit 7be20c0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/core/segments/usage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use std::path::Path;
88
/// Get context limit for a specific model
99
/// Returns 1M for Sonnet[1M] models, 200K for all others
1010
fn get_context_limit(model_name: &str) -> u32 {
11-
if model_name.contains("[1m]") {
12-
1_000_000 // 1M for Sonnet[1M] model
11+
if model_name.contains("[1m]") || model_name.contains("1M token context") {
12+
1_000_000 // 1M for Sonnet[1M] models
1313
} else {
1414
200_000 // 200K default for all other models
1515
}

0 commit comments

Comments
 (0)