fix(session): add fallback for undefined output token limit (#860)
Some checks are pending
deploy / deploy (push) Waiting to run
publish / publish (push) Waiting to run

Co-authored-by: opencode <noreply@opencode.ai>
This commit is contained in:
Sergii Kozak 2025-07-11 07:55:13 -07:00 committed by GitHub
parent dfbef066c7
commit b4950a157c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -321,7 +321,7 @@ export namespace Session {
}
const previous = msgs.at(-1) as MessageV2.Assistant
const outputLimit = Math.min(model.info.limit.output, OUTPUT_TOKEN_MAX)
const outputLimit = Math.min(model.info.limit.output, OUTPUT_TOKEN_MAX) || OUTPUT_TOKEN_MAX
// auto summarize if too long
if (previous) {