POST /api/v1/{context_id}/chat

Changed on

Phase 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

Path parameters

context_idstring required

Spectron context id

Request body

bypassCacheboolean

Phase 7.6 — when true skips the tier-2 response cache and forces a fresh tier-3 call. Defaults to false.

labelsstring[]

Descriptive labels for rows the chat persists.

messagestring required
modelstring nullable
sessionIdstring nullable
streamboolean
suppressMarkersboolean

When true, the reply text carries no inline citation marker in either form ([S1] or bare S1); citations still names every source the reply cited before the markers were removed. Defaults to false.

Response

replystring required
sessionIdstring required
traceIdstring required

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

    • warning

      removed the request property

    • info

      added the new optional request property