mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3356] [CLOSED] [Other] Add assistant prefill support for chat completions #4587
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#4587
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/3356
Author: @j-luwierski
Created: 10/20/2026
Status: ❌ Closed
Base:
main← Head:feat/assistant-prefix-rebased📝 Commits (2)
8ca3e17serve: "assistant_prefix" continues the assistant's turn from where the client starts itbaccd43serve: assistant_prefix hardening - exact text, tools, structured output, token text📊 Changes
4 files changed (+331 additions, -7 deletions)
View changed files
📝
docs/DETAILS.md(+25 -0)📝
serve/frontend.py(+15 -2)📝
serve/server.py(+42 -5)📝
serve/test_server.py(+249 -0)📄 Description
Problem and result: Strata's chat APIs could not continue generation from a partially written assistant turn. Requests can now provide an optional assistant_prefix; Strata prefills that text and returns only the generated continuation. When the field is absent, null, or empty, existing behavior is unchanged.
Related discussion: Replacement for #1189. Its /reopen check passed, but GitHub would not reopen that closed pull request.
Approach: Render the supplied prefix as the unfinished final assistant turn in the Python serving layer. Preserve the prefix text and existing tool, structured-output, streaming, reasoning, and context handling. Document the request field and add regression coverage.
Validation (revision
baccd430, rebased on maine88ee39d/ 0.2.0-beta; Linux):Passed:
Failed:
Not run:
Limits: The rebased revision has mock-engine test coverage; hardware behavior has not been revalidated on this revision.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.