fix: read anthropic 1m flag from live model cache state
This commit is contained in:
@@ -27,12 +27,12 @@ const TOOL_SPECIFIC_MAX_TOKENS: Record<string, number> = {
|
||||
}
|
||||
|
||||
interface ToolOutputTruncatorOptions {
|
||||
anthropicContext1MEnabled?: boolean
|
||||
modelCacheState?: { anthropicContext1MEnabled: boolean }
|
||||
experimental?: ExperimentalConfig
|
||||
}
|
||||
|
||||
export function createToolOutputTruncatorHook(ctx: PluginInput, options?: ToolOutputTruncatorOptions) {
|
||||
const truncator = createDynamicTruncator(ctx, options?.anthropicContext1MEnabled)
|
||||
const truncator = createDynamicTruncator(ctx, options?.modelCacheState)
|
||||
const truncateAll = options?.experimental?.truncate_all_tool_outputs ?? false
|
||||
|
||||
const toolExecuteAfter = async (
|
||||
|
||||
Reference in New Issue
Block a user