File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -442,17 +442,18 @@ const DEFAULT_MODEL_ID = 'claude-sonnet-4-6'
442442
443443/**
444444 * 判断模型是否支持 1M context window beta(context-1m-2025-08-07)
445- * 当前支持:Claude Sonnet 4 / 4.5 / 4.6、Opus 4.6 / 4.7 / 4.8、DeepSeek V4 系列、
445+ * 当前支持:Claude Sonnet 4 / 4.5 / 4.6、Opus 4.6 / 4.7 / 4.8、Fable 5、 DeepSeek V4 系列、
446446 * 小米 MiMo V2.5 / V2.5 Pro / V2 Pro
447447 * 参考:https://docs.anthropic.com/en/docs/build-with-claude/context-windows
448448 */
449449function supports1MContext ( modelId : string ) : boolean {
450450 const m = modelId . toLowerCase ( )
451451 if ( m . includes ( 'haiku' ) ) return false
452- // Claude: Sonnet 4+ 与 Opus 4.6+ 都支持
452+ // Claude: Sonnet 4+ 与 Opus 4.6+、Fable 5 都支持
453453 if ( m . includes ( 'claude' ) ) {
454454 if ( m . includes ( 'sonnet-4' ) ) return true
455455 if ( m . includes ( 'opus-4-6' ) || m . includes ( 'opus-4-7' ) || m . includes ( 'opus-4-8' ) ) return true
456+ if ( m . includes ( 'fable-5' ) ) return true
456457 return false
457458 }
458459 // DeepSeek V4 系列(deepseek-v4-pro、deepseek-v4-flash)
Original file line number Diff line number Diff line change @@ -110,12 +110,13 @@ function inferContextWindow(model?: string): number | undefined {
110110 const m = model . toLowerCase ( )
111111 // Claude Haiku 为 200k
112112 if ( m . includes ( 'claude-haiku' ) ) return 200_000
113- // Claude Sonnet 4.6、Opus 4.6 / 4.7 / 4.8、DeepSeek V4 系列均为 1M 上下文
113+ // Claude Sonnet 4.6、Opus 4.6 / 4.7 / 4.8、Fable 5、 DeepSeek V4 系列均为 1M 上下文
114114 if (
115115 m . includes ( 'claude-sonnet-4-6' ) ||
116116 m . includes ( 'claude-opus-4-6' ) ||
117117 m . includes ( 'claude-opus-4-7' ) ||
118- m . includes ( 'claude-opus-4-8' )
118+ m . includes ( 'claude-opus-4-8' ) ||
119+ m . includes ( 'claude-fable-5' )
119120 ) return 1_000_000
120121 if ( m . includes ( 'deepseek-v4' ) ) return 1_000_000
121122 // MiniMax M3 为 1M 上下文
You can’t perform that action at this time.
0 commit comments