[GH-ISSUE #1950] 0.1.42: stop match in assistant prefill ends generation with finish=stop #773

Closed
opened 2026-11-04 01:45:44 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @antoniovitale on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1950

Environment: Strata 0.1.42 release binary with serve/server.py at the same tag, Windows 11, RTX 5070 12 GB, single GPU. Reproduced with two models and their stock configs (Swift IQ2_XS, IQ3_XXS). Did not occur on 0.1.39 with the same stop list and full prompt shape.

Repro (<served-model> = the loaded model name):

curl -s http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"<served-model>","messages":[{"role":"user","content":"Write the body."},{"role":"assistant","content":"Here:\n```python\nfrom typing import List\n\n\ndef f(x):\n    pass\n"}],"max_tokens":2048,"temperature":0,"reasoning_budget_tokens":1024,"stream":true,"stop":["\ndef"]}'

Expected: the model continues the body. Actual: finish_reason: stop after ~35 served chars (fence and imports echo). The served text contains no newline-def.

Notes, each run repeatedly with identical results:

  • "stop": [] or an impossible stop string: full correct body.
  • ["\ndef"]: 35-char stub. Same on the 337-token variant of this prompt.
  • ["\nclass"] on the same prompt: full 550-char body.
  • "\ndef" in the user message only, or "\n#" in a prefill: full answers.
  • stream: false and omitting the budget key give the same result on the full prompt.

Effect: any client that prefills the assistant turn and passes code stops gets truncated completions with a stop finish reason.

Originally created by @antoniovitale on GitHub (Oct 11, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1950 Environment: Strata 0.1.42 release binary with `serve/server.py` at the same tag, Windows 11, RTX 5070 12 GB, single GPU. Reproduced with two models and their stock configs (Swift IQ2_XS, IQ3_XXS). Did not occur on 0.1.39 with the same stop list and full prompt shape. Repro (`<served-model>` = the loaded model name): ```bash curl -s http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"model":"<served-model>","messages":[{"role":"user","content":"Write the body."},{"role":"assistant","content":"Here:\n```python\nfrom typing import List\n\n\ndef f(x):\n pass\n"}],"max_tokens":2048,"temperature":0,"reasoning_budget_tokens":1024,"stream":true,"stop":["\ndef"]}' ``` Expected: the model continues the body. Actual: `finish_reason: stop` after ~35 served chars (fence and imports echo). The served text contains no newline-`def`. Notes, each run repeatedly with identical results: - `"stop": []` or an impossible stop string: full correct body. - `["\ndef"]`: 35-char stub. Same on the 337-token variant of this prompt. - `["\nclass"]` on the same prompt: full 550-char body. - `"\ndef"` in the user message only, or `"\n#"` in a prefill: full answers. - `stream: false` and omitting the budget key give the same result on the full prompt. Effect: any client that prefills the assistant turn and passes code stops gets truncated completions with a `stop` finish reason.
Author
Owner

@Niko1221 commented on GitHub (Oct 19, 2026):

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270722685 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#773
No description provided.