Files
mesh/testdata/chat_paths.json
T
waozi 81ea61c998 Deliver slow Lumi answers and accept up to 64 app tools
Lumi's chat, spelling and habit-icon answers can take as long as the node
waits for the model: 35 seconds, or 60 for spelling. The node's 15-second
write timeout cut those answers off, so the app never received them. These
routes now keep the response open for the model's wait plus 15 seconds;
every other route keeps its 15 seconds.

Inner Breeze now offers exactly 32 tools, the old maximum, so a chat
request may now carry up to 64.
2026-10-13 19:22:07 -03:00

339 lines
10 KiB
JSON

{
"/api/v1/chat/completions": {
"post": {
"summary": "Account-limited online app conversation",
"description": "Requires a Daochi bearer token and X-Daochi-User. The node keeps the provider key private, bounds context and output, and enforces persistent daily account and node limits. Each model request, including tool continuations and failed provider attempts, uses one allowance unit. Tools execute only in the client harness. A disabled or unavailable provider returns 503; exhausted allowances return 429.",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"messages"
],
"properties": {
"messages": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"type": "object"
}
},
"context": {
"type": "object"
},
"tools": {
"type": "array",
"maxItems": 64,
"items": {
"type": "object"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Assistant message or tool calls, and remaining allowance"
},
"400": {
"description": "Malformed or oversized context"
},
"401": {
"description": "Account authentication required"
},
"429": {
"description": "Daily allowance exhausted"
},
"503": {
"description": "Online chat unavailable"
}
}
}
},
"/api/v1/feedback": {
"post": {
"summary": "Deliver an account's app feedback",
"description": "Idempotent by account and 64-character report ID. Up to 20 reports per account per UTC day. Feedback contains only the authored report and bounded app diagnostics, and is private to its account and node operator.",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"app_id",
"title",
"message"
],
"properties": {
"id": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"app_id": {
"const": "inbe"
},
"title": {
"type": "string",
"maxLength": 160
},
"message": {
"type": "string",
"maxLength": 4096
},
"context": {
"type": "string",
"maxLength": 2048
}
}
}
}
}
},
"responses": {
"200": {
"description": "Saved report ID"
},
"400": {
"description": "Invalid feedback"
},
"401": {
"description": "Account authentication required"
},
"429": {
"description": "Daily report allowance exhausted"
},
"503": {
"description": "Feedback service unavailable"
}
}
},
"get": {
"summary": "Read the account's reports and developer replies",
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Up to 100 reports with replies"
},
"401": {
"description": "Account authentication required"
},
"503": {
"description": "Feedback service unavailable"
}
}
}
},
"/api/v1/admin/feedback": {
"get": {
"summary": "Private developer feedback inbox",
"description": "Requires X-Daochi-Admin with the feedback token or the existing admin token. Disabled when neither is configured.",
"responses": {
"200": {
"description": "Up to 100 newest reports"
},
"401": {
"description": "Operator authentication required"
},
"403": {
"description": "Remote operator access disabled"
}
}
}
},
"/api/v1/admin/feedback/reply": {
"post": {
"summary": "Reply to an app feedback report",
"description": "Requires X-Daochi-Admin and the account_id returned by the private inbox. Replies target exactly one account's report. The reporting account can read replies through GET /api/v1/feedback. Use replies=1 and a numeric offset to retrieve at most two replies per page without report diagnostics.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"account_id",
"id",
"reply"
],
"properties": {
"id": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"reply": {
"type": "string",
"maxLength": 4096
},
"account_id": {
"type": "string",
"minLength": 64,
"maxLength": 64
}
}
}
}
}
},
"responses": {
"200": {
"description": "Report replied to"
},
"400": {
"description": "Invalid reply"
},
"401": {
"description": "Operator authentication required"
},
"404": {
"description": "Report not found"
}
}
}
},
"/api/v1/chat/spelling": {
"post": {
"summary": "Account-limited spelling correction",
"description": "Requires a Daochi bearer token and X-Daochi-User. Corrects only misspelled words in one text of up to 8192 bytes and returns the whole text with its surrounding blank space unchanged. The text is not stored. Each request uses one unit of the same daily account and node allowance as online chat. A disabled or unavailable provider returns 503; exhausted allowances return 429.",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string",
"maxLength": 8192
}
}
}
}
}
},
"responses": {
"200": {
"description": "Corrected text and remaining allowance"
},
"400": {
"description": "Empty or oversized text"
},
"401": {
"description": "Account authentication required"
},
"429": {
"description": "Daily allowance exhausted"
},
"503": {
"description": "Online chat unavailable"
}
}
}
},
"/api/v1/chat/habit-icons": {
"post": {
"summary": "Account-limited habit icon choice",
"description": "Requires a Daochi bearer token and X-Daochi-User. Chooses, for each habit in order, one of the offered icon names that obviously fits it, or an empty string when none clearly fits. Offer 1 to 64 distinct icon names of 1 to 32 lowercase letters, digits or underscores, and 1 to 32 habits with a non-blank name of up to 64 bytes and an optional description of up to 256 bytes. Habits and answers are not stored. Each request uses one unit of the same daily account and node allowance as online chat. A disabled or unavailable provider or an unusable model answer returns 503; exhausted allowances return 429.",
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"icons",
"habits"
],
"properties": {
"icons": {
"type": "array",
"minItems": 1,
"maxItems": 64,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[a-z0-9_]{1,32}$"
}
},
"habits": {
"type": "array",
"minItems": 1,
"maxItems": 32,
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 64
},
"description": {
"type": "string",
"maxLength": 256
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "One icon name or empty string per habit, in order, and remaining allowance"
},
"400": {
"description": "Invalid icon names or habits"
},
"401": {
"description": "Account authentication required"
},
"429": {
"description": "Daily allowance exhausted"
},
"503": {
"description": "Online chat unavailable or invalid model response"
}
}
}
}
}