mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#3602
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1675
Author: @nekomario28
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:fix-1615-overflow-phrase📝 Commits (1)
bbfe6feserve: say llama.cpp's phrase in the context-overflow 400 (#1615)📊 Changes
2 files changed (+9 additions, -2 deletions)
View changed files
📝
serve/server.py(+6 -2)📝
serve/test_server.py(+3 -0)📄 Description
Fixes #1615.
Agent harnesses detect a context overflow by matching the error text against the phrases servers already use (llama.cpp's
exceeds the available context size, OpenAI'sexceeds the context window,context_length_exceeded, ...). Strata's two refusal messages matched none, so a prompt bigger than the context failed the turn instead of running the client's compact-and-retry.Change
Both
ValueErrors keep their wording and guidance and now also carry llama.cpp's phrase:the request exceeds the available context size. Docs and tests match the kept prefix (exceeds the context), so nothing else had to move.Not done (the issue marks it optional): llama.cpp's
"type": "exceed_context_size_error"+n_prompt_tokens/n_ctxfields — the emit sites all share the plaininvalid_request_errorshape and the text alone is enough for the reporter's matcher; happy to add the typed error if you'd like it.Test plan
test_explicit_budget_over_the_context_is_rejected(OpenAI + Anthropic 400s) and theroom < 1branch test to assert the phrase.serve.test_server.MaxTokens+VisionTempFiles: 13 tests pass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.