Skip to content

Commit 70d5c9d

Browse files
chore: sync OpenAPI contract from monorepo
Source commit: trylitmus/litmus@25274156c014dca5bee2a4dd236a2b947dbe6fa2
1 parent 84ea6dd commit 70d5c9d

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

contract/openapi.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,13 @@ components:
9797
$view, $partial_copy, $refine, $followup, $rephrase, $undo, $share, $flag,
9898
$rate, $escalate, $switch_model, $retry_context, $post_accept_edit,
9999
$blur, $return, $scroll_regression, $navigate, $interrupt,
100-
$startup, $pageleave.
100+
$startup, $pageleave, $sessionend.
101+
102+
$abandon vs $sessionend: $abandon is a user-initiated negative quality
103+
signal (closed editor without using the output, clicked stop, rejected).
104+
$sessionend is auto-emitted by the JS SDK when the tab closes or the
105+
user idles out with a generation still open — a session boundary, not
106+
a quality signal.
101107
102108
Event:
103109
type: object
@@ -129,6 +135,31 @@ components:
129135
user_id:
130136
type: string
131137
description: Identifier for the end user. Required for cross-session signals (Tier 4+).
138+
model:
139+
type: string
140+
description: Model identifier (e.g. "claude-sonnet-4-20250514", "gpt-4o"). Typically set on $generation events.
141+
provider:
142+
type: string
143+
description: LLM provider (e.g. "anthropic", "openai", "openrouter").
144+
input_tokens:
145+
type: integer
146+
description: Number of input tokens consumed.
147+
output_tokens:
148+
type: integer
149+
description: Number of output tokens produced.
150+
total_tokens:
151+
type: integer
152+
description: Total tokens (input + output).
153+
duration_ms:
154+
type: integer
155+
description: End-to-end generation latency in milliseconds.
156+
ttft_ms:
157+
type: integer
158+
description: Time to first token in milliseconds.
159+
cost:
160+
type: number
161+
format: double
162+
description: Generation cost in USD.
132163
metadata:
133164
type: object
134165
additionalProperties: true

0 commit comments

Comments
 (0)