Repository navigation
Conversation
…s endpoint for raw-prompt clients (Niko1221#2277) Source: Niko1221#2278 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…up robustness, conversation cache memory) Serve: Niko1221#2290 Niko1221#2284 Niko1221#2285 Niko1221#2170 Niko1221#2140 Niko1221#2278. Setup: Niko1221#2161 Niko1221#2287. Engine: Niko1221#2253 Niko1221#2265 Niko1221#2247 Niko1221#2217 Niko1221#2243. New opt-in engine flags: --session-state-codec (enabled in the local configs), --conversation-cache-park-gain and --drop-file-cache (left off: no measured benefit on the RX 7600 XT box). Bench: bench/results/upstream-prs-2026-10-13. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Two findings (Linux, Python 3.14;
|
|
Thanks for catching both. Fixed in the latest push. I accidentally moved the The final completion chunk now has empty You were also right about |
43916b0 to
ac6aeed
Compare
|
Thanks for the pull request. 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 review 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:
The rules are in CONTRIBUTING.md. |
|
/reopen |
|
The check passed, but GitHub would not reopen it (Validation Failed: ). If the branch was deleted, restore it or open a new pull request and link this one. |
|
/reopen |
|
The check passed, but GitHub would not reopen it (Validation Failed: ). If the branch was deleted, restore it or open a new pull request and link this one. |
Problem and result
Clients that apply their own chat template need to send a raw prompt to
/v1/completions. Strata currently has no endpoint for that.This adds the legacy OpenAI endpoint with streaming and non-streaming responses,
text_completionobjects, and token usage. The server doesn't apply the chat template again.Related discussion
#2277
Approach
The handler uses the existing generation path and accepts one string prompt.
max_tokens: 0or a negative value uses the remaining context.Explicit thinking-disable flags append the template's no-thinking tail. Without those flags, the prompt passes through unchanged.
Streaming sends each piece of text once. With
echo: true, it sends the prompt once at the start; the finish chunk has empty text.This also keeps the structured-output error handler in the chat endpoint, so a failed streamed response sends an SSE error and
[DONE], not another HTTP response inside the stream. Engine errors after streaming starts are handled as SSE errors too.Validation
Rebased onto main
e88ee39d(0.2.0-beta). These local checks ran on7e08755f.Passed:
Windows, Python 3.13.2, with jsonschema installed:
368 tests, OK, 3 skipped.
Linux, Python 3.11 in Docker, using a dedicated venv with only the pinned
requirements.txtpackages:Reported
"passed": true.git diff --check upstream/mainalso passed.Failed:
The full suite in the same Linux venv:
python -m unittest discover -s serve -p 'test_*.py'888 tests, 2 failures, 18 skipped:
test_lifeline.Lifeline.test_the_portable_watcher_ends_the_child_when_the_server_is_killedtest_server.VisionTempFiles.test_work_dir_has_no_space_when_temp_has_oneI reran both tests on clean main
e88ee39dwith the same container and dependencies. Both fail there with the same assertions. I haven't changed either behavior in this PR.Not run:
Limits
Only a string prompt and
n=1/best_of=1are supported. Suffix and logprobs are rejected.stream_optionsaccepts onlyinclude_usage, and only with streaming. Usage still comes on the finish chunk, not a separatechoices: []chunk, so this doesn't yet implement the full OpenAI streaming-usage format.