Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

docs(server): publish /v1/systemone in the server OpenAPI spec

Rahul Parundekarf60269522581
diff --git a/packages/sie_server/openapi.json b/packages/sie_server/openapi.json
index c053e6cba..e4624543b 100644
--- a/packages/sie_server/openapi.json
+++ b/packages/sie_server/openapi.json
@@ -1074,6 +1074,83 @@
}
}
}
+ },
+ "/v1/systemone": {
+ "post": {
+ "tags": [
+ "systemone"
+ ],
+ "summary": "System One",
+ "description": "Answer typed questions about one state (System One-compatible).\n\nClients written for the System One API work by changing their base URL.",
+ "operationId": "system_one_v1_systemone_post",
+ "parameters": [
+ {
+ "name": "X-SIE-MACHINE-PROFILE",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "title": "X-Sie-Machine-Profile"
+ }
+ },
+ {
+ "name": "X-SIE-Remote",
+ "in": "header",
+ "required": false,
+ "schema": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The only accepted value is `forbid`. It keeps the request off remote upstreams: local capacity serves or refuses it, and a model served only by an upstream answers 400. Any other value answers 400.",
+ "title": "X-Sie-Remote"
+ },
+ "description": "The only accepted value is `forbid`. It keeps the request off remote upstreams: local capacity serves or refuses it, and a model served only by an upstream answers 400. Any other value answers 400."
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SystemOneRequest"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Every question answered",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/SystemOneResponse"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Model not found"
+ },
+ "422": {
+ "description": "Invalid request: a malformed question, a model that does not answer typed questions, or a state or question set that does not fit the model's window"
+ },
+ "503": {
+ "description": "Model loading or server busy; retry after Retry-After (at most 60 seconds)"
+ }
+ }
+ }
}
},
"components": {
@@ -1736,6 +1813,16 @@
],
"title": "Revision"
},
+ "description": {
+ "type": "string",
+ "title": "Description",
+ "default": ""
+ },
+ "release_date": {
+ "type": "string",
+ "title": "Release Date",
+ "default": ""
+ },
"capabilities": {
"anyOf": [
{
@@ -2705,6 +2792,95 @@
"title": "SparseVectorModel",
"description": "Sparse embedding vector."
},
+ "SystemOneRequest": {
+ "properties": {
+ "model": {
+ "type": "string",
+ "minLength": 1,
+ "title": "Model",
+ "description": "SIE model id of a decision model, e.g. fastino/GLiNER2.5-Decide."
+ },
+ "state": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ {
+ "items": {},
+ "type": "array"
+ }
+ ],
+ "title": "State",
+ "description": "The text to judge, or a JSON object, or a list of conversation turns."
+ },
+ "questions": {
+ "additionalProperties": true,
+ "type": "object",
+ "minProperties": 1,
+ "title": "Questions",
+ "description": "Typed questions by id: {\"type\": \"noul\" | \"choice\" | \"score\", \"instructions\"?, \"criteria\"?}."
+ }
+ },
+ "additionalProperties": true,
+ "type": "object",
+ "required": [
+ "model",
+ "state",
+ "questions"
+ ],
+ "title": "SystemOneRequest",
+ "description": "A System One request: one state and its typed questions."
+ },
+ "SystemOneResponse": {
+ "properties": {
+ "model": {
+ "type": "string",
+ "title": "Model"
+ },
+ "answers": {
+ "additionalProperties": {
+ "additionalProperties": true,
+ "type": "object"
+ },
+ "type": "object",
+ "title": "Answers"
+ },
+ "usage": {
+ "$ref": "#/components/schemas/SystemOneUsage"
+ }
+ },
+ "type": "object",
+ "required": [
+ "model",
+ "answers",
+ "usage"
+ ],
+ "title": "SystemOneResponse",
+ "description": "Answers by question id, in the System One response shape."
+ },
+ "SystemOneUsage": {
+ "properties": {
+ "input_tokens": {
+ "type": "integer",
+ "title": "Input Tokens"
+ },
+ "output_tokens": {
+ "type": "integer",
+ "title": "Output Tokens",
+ "default": 0
+ }
+ },
+ "type": "object",
+ "required": [
+ "input_tokens"
+ ],
+ "title": "SystemOneUsage",
+ "description": "Tokens the model read. Decision models generate no tokens."
+ },
"TimingInfoModel": {
"properties": {
"total_ms": {
diff --git a/packages/sie_server/src/sie_server/cli.py b/packages/sie_server/src/sie_server/cli.py
index 4d874f0e8..ecbaa56a3 100644
--- a/packages/sie_server/src/sie_server/cli.py
+++ b/packages/sie_server/src/sie_server/cli.py
@@ -285,6 +285,7 @@ def openapi_export(
from sie_server.api.openapi import setup_custom_openapi_schema
from sie_server.api.root import router as root_router
from sie_server.api.score import router as score_router
+ from sie_server.api.systemone import router as systemone_router
from sie_server.api.ws import router as ws_router
# Build a lightweight FastAPI app for the PUBLISHED API surface — no lifespan (no GPU
@@ -310,6 +311,7 @@ def openapi_export(
app_.include_router(openai_router)
app_.include_router(openai_completions_router)
app_.include_router(openai_responses_router)
+ app_.include_router(systemone_router)
setup_custom_openapi_schema(app_)
spec = app_.openapi()