mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1804] [CLOSED] structured: one-string-field json_schema answered as plain text (opt-in), progress in structured keep-alives #3686
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#3686
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/1804
Author: @gt50
Created: 10/10/2026
Status: ❌ Closed
Base:
main← Head:plain-string📝 Commits (1)
468c6dfstructured: a one-string-field json_schema answered as plain text (opt-in structured_plain_string); progress in structured keep-alives📊 Changes
4 files changed (+197 additions, -13 deletions)
View changed files
📝
docs/DETAILS.md(+13 -1)📝
serve/server.py(+27 -6)📝
serve/structured.py(+90 -6)📝
serve/test_structured.py(+67 -0)📄 Description
Title
Structured output: a one-string-field schema answered as plain text (opt-in), and progress in structured keep-alives
Summary
Split out of #1789 (which now only carries the Windows AMD images), as AGENTS.md asks: one change per PR, a new feature opt-in.
What changed
"structured_plain_string": true(opt-in): ajson_schemathat is one required string field, with an optional description/title and no enum, pattern or length limit, is answered as plain text, and the server builds the object around it.Measured on a scanned rent roll (UD-IQ4_XS, temperature 0, a "write out every word on this page" prompt):
{"text": ...}A model that writes the JSON object anyway is taken at its word, and that object is validated as before; an invalid one is still an error. Not with tools.
: keep-alive: structured output buffered until it is validated, N pieces (M characters) written so far), so a long answer can be told from a stuck one. They are SSE comments, which clients ignore.docs/DETAILS.md.Extra Notes
prepare_formatwrites the same directive andvalidated_jsonvalidates as before.serve/test_structured.pycovers the wrap (streamed and not), JSON-anyway, off by default, which schemas qualify, and the progress notes. Allserveand setup test files pass onmainfb58e0d.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.