mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #545] Error: 400: {"type":"invalid_request_error","message":"prompt (38963 tokens) + max tokens (226281) exceeds the context (262144); requests are never truncated"} #259
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#259
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @avarakin on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/545
Getting stuck with this error even after compacting. Increasing context does not help. I am using Pi.dev 1.0 harness. This issue does not happen with qwen 3.8 27b. Machine has 16g VRAM and 64g RAM.
@Niko1221 commented on GitHub (Oct 3, 2026):
Thanks. Pi asked for 226,281 output tokens on a 38,963-token prompt. Together that is about 3K over the 262,144-token context, and the server refuses such a request instead of cutting anything. Pi bases the output size on its context setting, so a larger context doesn't help. Two ways around it:
"fit_max_tokens": trueto the model'sstrata-<model>.jsonin the Strata folder and restart. The server then shortensmax_tokensto the room that's left;From 0.1.38 the error message itself says this and gives the largest
max_tokensthat fits.@avarakin commented on GitHub (Oct 3, 2026):
I added the parameter but still not able to open problematic session. I am able to open it with another qwen model and llama.cpp
@avarakin commented on GitHub (Oct 3, 2026):
one more thing: looks like it happens after compaction. I manually requested pi to compact, compact was successful, but after that i started getting this error and was not able to re-open session
@avarakin commented on GitHub (Oct 3, 2026):
Never mind, it worked. I applied the change incorrectly.