POST /api/v1/{context_id}/chat
Changed onPhase 7.5 — Spectron-as-agent chat endpoint. Resolves the session, retrieves context via the unified /query router, and calls the configured LLM provider; then, only after a successful synthesis (or a tier-2 cache hit), stores the user message and the assistant response via /facts and emits a response_trace. A failed synthesis writes no turn, fact, or response_trace (a retrieval_trace recording the query may still be written). Set stream=true for SSE.
Request
- The document declares no server URL.
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Spectron context id
Request body
Response
Changes
- info
added the new optional request property
- info
added the non-success response with the status
- info
added the required property
to the response with the status - info
added the required property
/to the response with the status
- info
- warning
removed the request property
- info
added the new optional request property
- warning