tweak: adjust chat.params hook to allow altering of the maxOutputTokens (#21220)

This commit is contained in:
Aiden Cline
2026-04-06 11:13:30 -07:00
committed by GitHub
parent 5a6d10cd53
commit 40e4cd27a1
2 changed files with 14 additions and 7 deletions

View File

@@ -212,7 +212,13 @@ export interface Hooks {
*/
"chat.params"?: (
input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage },
output: { temperature: number; topP: number; topK: number; options: Record<string, any> },
output: {
temperature: number
topP: number
topK: number
maxOutputTokens: number | undefined
options: Record<string, any>
},
) => Promise<void>
"chat.headers"?: (
input: { sessionID: string; agent: string; model: Model; provider: ProviderContext; message: UserMessage },