Breaking Changes
-
CreateAnnotationBodyno longer accepts the flatmessageIndex/partIndex/startOffset/endOffsetfields at the top level. The nestedanchorobject is now the only supported shape:- client.annotations.create("project-slug", { - value: 1, passed: true, feedback: "…", - trace: { by: "id", id: "…" }, - messageIndex: 2, - partIndex: 0, - startOffset: 10, - endOffset: 25, - }) + client.annotations.create("project-slug", { + value: 1, passed: true, feedback: "…", + trace: { by: "id", id: "…" }, + anchor: { messageIndex: 2, partIndex: 0, startOffset: 10, endOffset: 25 }, + })
-
CreateAnnotationBodyno longer acceptssessionIdorspanId. Both fields are now auto-resolved server-side from the target trace: the session is lifted off the trace, and the span is pinned to the trace's last LLM completion. Callers that were passing either field should remove them — the resolved values are returned on the response. (Internal use cases keep accepting concrete values; only the public API was simplified.) -
CreateAnnotationBodyno longer acceptsannotatorId. API keys are organization-scoped, not user-scoped, so there is no real Latitude user behind an API request. Annotations created via the public API persist withannotatorId = nullto avoid letting any token holder attribute work to any teammate. Callers that were passing this field should remove it. -
client.annotations.createno longer acceptsidordraftin the body. The public annotations API is creation-only and always publishes immediately:idis gone — every submission creates a new annotation; client-supplied ids are no longer accepted. Editing an existing annotation is not exposed through the public API.draftis gone — every API-submitted annotation is written withdraftedAt = nulland emitsScoreCreatedwithstatus: "published". Draft state is reserved for the managed UI's editing flow.
- await client.annotations.create("my-project", { - value: 1, passed: true, feedback: "…", - trace: { by: "id", id: "…" }, - draft: false, - }) + await client.annotations.create("my-project", { + value: 1, passed: true, feedback: "…", + trace: { by: "id", id: "…" }, + // `id` and `draft` are no longer accepted. + })
-
CreateScoreBody(custom and_evaluationvariants) no longer acceptstraceId,sessionId, orspanId. Trace association is now done via a requiredtracefield — the sameTraceRefdiscriminated union used byCreateAnnotationBody({ by: "id", id }for an exact trace id, or{ by: "filters", filters }to resolve a single trace from attribute filters).sessionIdis lifted from the trace andspanIdis pinned to the trace's last LLM completion server-side:- client.scores.create("project-slug", { - sourceId: "my-eval", - traceId: "0123456789abcdef0123456789abcdef", - sessionId: "session-123", - spanId: "aaaaaaaaaaaaaaaa", - value: 0.87, passed: true, feedback: "…", - }) + client.scores.create("project-slug", { + sourceId: "my-eval", + trace: { by: "id", id: "0123456789abcdef0123456789abcdef" }, + value: 0.87, passed: true, feedback: "…", + })