docs: document System One endpoint and stream-retry semantics

POST /v1/systemone existed since v1.3.3 with zero README coverage:
add the route to the endpoint table, a usage section (verbatim relay,
no translation, streaming replies relayed without reset recovery) in
both English and Chinese, and soften the absolute no-retry sentence to
match the stale-reasoning repair behavior.
This commit is contained in:
sk-dev-ai committed 2026-10-04 19:54:18 +05:30
1 parent 79a208a467
commit 437fab54ea
2 files changed
+26 -2

No files matched your search

+13 -1
View File
@@ -111,6 +111,7 @@ Send `Authorization: Bearer YOUR_LOCAL_API_KEY` or `x-api-key: YOUR_LOCAL_API_KE
| POST | `/v1/chat/completions` | Chat Completions. |
| POST | `/v1/responses` | Responses. |
| POST | `/v1/messages` | Anthropic Messages. |
| POST | `/v1/systemone` | System One structured decisions. |
| GET | `/healthz` | Readiness and resource summary. |
Discover an available model first:
@@ -152,6 +153,17 @@ curl http://localhost:8080/v1/messages \
For streaming, add `"stream": true` to the body and use `curl -N`. Responses include an `x-request-id` for correlation. API request bodies are limited to 32 MiB.
**System One**
```bash
curl http://localhost:8080/v1/systemone \
-H "Authorization: Bearer YOUR_LOCAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"MODEL_ID","state":"...","questions":[...]}'
```
System One pairs a free-form state with typed questions and returns typed answers, so the payload shares no shape with the chat/responses bridge and is relayed verbatim, never translated. Only models whose native protocol is System One are served here; a decision payload submitted on a message endpoint (`/v1/chat/completions`, `/v1/responses`) is likewise relayed verbatim instead of converted. Streaming upstream replies are relayed as-is without reset recovery.
### Compatibility boundaries
Requests using the upstream's native protocol retain provider-specific fields. Requests crossing protocols pass through a common representation; not every option has an equivalent. For example, Chat JSON output constraints and `seed` are not forwarded to Anthropic Messages. Unsupported content or tool types may be rejected.
@@ -198,7 +210,7 @@ The routing sequence is:
Anonymous attempts are not cut short by `retry.max_attempts`, but all attempts share the request timeout. Network errors, authentication failures, rate limits, and server errors can rotate keys. Other 4xx responses end the current tier; another available tier may still be tried.
Requests are encoded for each tier's own protocol. Once a stream has started, the gateway does not retry generation on another node. A recognized stale Responses reasoning reference can trigger one repair pass; selected-key diagnostics never use that replay.
Requests are encoded for each tier's own protocol. Once a stream has started, the gateway does not retry generation on another node, except when the upstream resets before anything reached downstream (the turn is replayed once inside the same connection). A recognized stale Responses reasoning reference can trigger one repair pass; selected-key diagnostics never use that replay.
When only anonymous access is configured, `/v1/models` exposes only models eligible for that lane.