You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1862fb6
Browse filesBrowse the repository at this point in the historyBrowse files
feat: support explicit Responses message phases (#531)
Responses fixtures currently emit assistant message items without a
`phase`, so clients cannot distinguish intermediate commentary from a
final answer using the native Responses field.
Add optional `response.phase: "commentary" | "final_answer"` and
preserve it on HTTP unary, SSE and WebSocket message output. Omission
keeps the existing wire shape. The phase applies to each message in the
response; reasoning, tool items and other provider wires remain
unchanged. Fixture validation rejects other values. No phase is inferred
from text, completion or stop reason.
Validation on macOS with Node 22.22.3, pinned pnpm 10.28.2 and available
locale `en_US.UTF-8`:
- Formatting, lint and all TypeScript projects passed.
- Build and package export checks passed.
- Full maintained suite: 377 files passed; 14,121 tests passed and 3
skipped, including 39 new phase/validation cases.
- Dependency manifests and lockfile unchanged.
Copy file name to clipboardExpand all lines: skills/write-fixtures/SKILL.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -567,19 +567,20 @@ All providers share the same fixture pool — write fixtures once, they work for
567
567
568
568
Fixture responses can include optional override fields to control auto-generated envelope values. These are merged into the provider-specific response format (OpenAI, Claude, Gemini, Responses API).
|`role`| string |`"assistant"`| Override message role |
578
-
|`systemFingerprint`| string | (omitted) | Add `system_fingerprint` to response |
579
-
|`provider`| string | slug author | OpenRouter only: top-level serving-provider display name (default = the winning model slug's author). Override to assert who served the request |
580
-
|`nativeFinishReason`| string | mirrors `finishReason`| OpenRouter only: the raw upstream `native_finish_reason` alongside the normalized `finish_reason`|
581
-
|`usage.cost`| number | (omitted) | OpenRouter only: per-request `usage.cost` (scriptable — powers budget-guard tests). When set, `usage.cost_details` is emitted too. Never fabricated when omitted |
582
-
|`usage.is_byok`| bool | (omitted) | OpenRouter only: emit `usage.is_byok`. Also `usage.prompt_tokens_details`, `usage.completion_tokens_details` — emitted only when set |
|`role`| string |`"assistant"`| Override message role |
578
+
|`phase`|`"commentary" \| "final_answer"`| (omitted) | OpenAI Responses API (HTTP and WebSocket) only: labels each assistant `message` output item. Preserved in streaming added/done items, the completed response, and non-streaming output. Omitted by default; never inferred from content or finish reason. Does not label reasoning or tool-call items |
579
+
|`systemFingerprint`| string | (omitted) | Add `system_fingerprint` to response |
580
+
|`provider`| string | slug author | OpenRouter only: top-level serving-provider display name (default = the winning model slug's author). Override to assert who served the request |
581
+
|`nativeFinishReason`| string | mirrors `finishReason`| OpenRouter only: the raw upstream `native_finish_reason` alongside the normalized `finish_reason`|
582
+
|`usage.cost`| number | (omitted) | OpenRouter only: per-request `usage.cost` (scriptable — powers budget-guard tests). When set, `usage.cost_details` is emitted too. Never fabricated when omitted |
583
+
|`usage.is_byok`| bool | (omitted) | OpenRouter only: emit `usage.is_byok`. Also `usage.prompt_tokens_details`, `usage.completion_tokens_details` — emitted only when set |
0 commit comments