mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1319] [CLOSED] serve: add opt-in bounded Responses history and continuation #3380
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#3380
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/1319
Author: @mdwsk88
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:codex/responses-state-v2📝 Commits (1)
81d5c8fserve: add opt-in bounded Responses history and continuation📊 Changes
8 files changed (+579 additions, -26 deletions)
View changed files
📝
docs/AI_SETUP.md(+2 -1)📝
docs/DETAILS.md(+39 -5)➕
serve/response_store.py(+112 -0)📝
serve/responses.py(+19 -10)📝
serve/runconfig.py(+2 -0)📝
serve/server.py(+70 -10)➕
serve/test_response_store.py(+326 -0)📝
serve/test_runconfig.py(+9 -0)📄 Description
A local client using the OpenAI Python SDK cannot currently continue a Strata response with
previous_response_idor retrieve/delete its result by ID. This adds opt-in bounded history to the existing Responses adapter so the client can send only new input on later turns.Enable it with
--responses-store-mib 64,"responses_store_mib": 64in the config, or Model settings. With storage disabled, POST /v1/responses keeps the existing stateless behavior, including accepting/ignoringstore: true.store: false.Storage is process memory only and is lost on restart. The serialized JSON budget includes replay history, with a maximum of 256 records and a default 3,600-second lifetime. Oldest records are evicted; oversized records are refused. Python bookkeeping and temporary copies need additional memory. This does not change the inference engine or its KV cache.
Validation on current main: rebased onto
fb58e0d(v0.1.41), without conflicts. On this base all 617servetests ran (macOS, mock engine): 0 failed, 8 environment-dependent skips.On the earlier base
82f46a8: 476 tests exercised on Windows: 470 passed, 6 environment-dependent skips. The 54 Responses/config tests passed, as did the 422 service regression tests using a long-path TEMP/TMP directory. The report records a pre-existing short-path TEMP assertion failure, reproduced on unmodified upstream main.Native IQ2_XS validation (on
82f46a8; the feature code is unchanged since) also passed on the RX 7900 XT (HIP), 32K context and a 64 MiB store, using the installed engine. All 10 helper checks and the official OpenAI SDK 3.24.0 round trip passed, including streaming and a bodyless DELETE from an allowed CORS origin. A continuation reused 777/812 input tokens (95.69%) and took 1.109 s for the whole request; this was a functional check, not a throughput benchmark.Commands, source-tree identity and measured results.
This replaces #1032 after main's history rewrite, following the maintainer's instructions. It contains one feature commit on
fb58e0d(first opened on82f46a8), with the existing implementation, tests and documentation carried forward.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.