@arizeai/phoenix-client 6.10.1 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +62 -0
  2. package/dist/esm/__generated__/api/v1.d.ts +202 -2
  3. package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
  4. package/dist/esm/jest/index.d.ts +5 -0
  5. package/dist/esm/jest/index.d.ts.map +1 -0
  6. package/dist/esm/jest/index.js +49 -0
  7. package/dist/esm/jest/index.js.map +1 -0
  8. package/dist/esm/jest/reporter.d.ts +13 -0
  9. package/dist/esm/jest/reporter.d.ts.map +1 -0
  10. package/dist/esm/jest/reporter.js +19 -0
  11. package/dist/esm/jest/reporter.js.map +1 -0
  12. package/dist/esm/prompts/sdks/toAI.d.ts +2 -2
  13. package/dist/esm/prompts/sdks/toAI.d.ts.map +1 -1
  14. package/dist/esm/prompts/sdks/toAI.js.map +1 -1
  15. package/dist/esm/prompts/sdks/toAnthropic.d.ts +2 -2
  16. package/dist/esm/prompts/sdks/toAnthropic.d.ts.map +1 -1
  17. package/dist/esm/prompts/sdks/toAnthropic.js.map +1 -1
  18. package/dist/esm/prompts/sdks/toOpenAI.d.ts +2 -2
  19. package/dist/esm/prompts/sdks/toOpenAI.d.ts.map +1 -1
  20. package/dist/esm/prompts/sdks/toOpenAI.js.map +1 -1
  21. package/dist/esm/prompts/sdks/toSDK.d.ts +8 -8
  22. package/dist/esm/prompts/sdks/toSDK.d.ts.map +1 -1
  23. package/dist/esm/prompts/sdks/toSDK.js.map +1 -1
  24. package/dist/esm/prompts/sdks/types.d.ts +2 -2
  25. package/dist/esm/prompts/sdks/types.d.ts.map +1 -1
  26. package/dist/esm/schemas/llm/anthropic/converters.d.ts +8 -8
  27. package/dist/esm/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
  28. package/dist/esm/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
  29. package/dist/esm/schemas/llm/constants.d.ts +3 -3
  30. package/dist/esm/schemas/llm/converters.d.ts +12 -12
  31. package/dist/esm/schemas/llm/openai/converters.d.ts +3 -3
  32. package/dist/esm/schemas/llm/schemas.d.ts +2 -2
  33. package/dist/esm/testing/acceptance.d.ts +20 -0
  34. package/dist/esm/testing/acceptance.d.ts.map +1 -0
  35. package/dist/esm/testing/acceptance.js +129 -0
  36. package/dist/esm/testing/acceptance.js.map +1 -0
  37. package/dist/esm/testing/define-api.d.ts +157 -0
  38. package/dist/esm/testing/define-api.d.ts.map +1 -0
  39. package/dist/esm/testing/define-api.js +78 -0
  40. package/dist/esm/testing/define-api.js.map +1 -0
  41. package/dist/esm/testing/helpers.d.ts +55 -0
  42. package/dist/esm/testing/helpers.d.ts.map +1 -0
  43. package/dist/esm/testing/helpers.js +179 -0
  44. package/dist/esm/testing/helpers.js.map +1 -0
  45. package/dist/esm/testing/phoenix-test-tracking.d.ts +68 -0
  46. package/dist/esm/testing/phoenix-test-tracking.d.ts.map +1 -0
  47. package/dist/esm/testing/phoenix-test-tracking.js +521 -0
  48. package/dist/esm/testing/phoenix-test-tracking.js.map +1 -0
  49. package/dist/esm/testing/report-artifacts.d.ts +45 -0
  50. package/dist/esm/testing/report-artifacts.d.ts.map +1 -0
  51. package/dist/esm/testing/report-artifacts.js +218 -0
  52. package/dist/esm/testing/report-artifacts.js.map +1 -0
  53. package/dist/esm/testing/report-run.d.ts +22 -0
  54. package/dist/esm/testing/report-run.d.ts.map +1 -0
  55. package/dist/esm/testing/report-run.js +41 -0
  56. package/dist/esm/testing/report-run.js.map +1 -0
  57. package/dist/esm/testing/reporter-format.d.ts +83 -0
  58. package/dist/esm/testing/reporter-format.d.ts.map +1 -0
  59. package/dist/esm/testing/reporter-format.js +852 -0
  60. package/dist/esm/testing/reporter-format.js.map +1 -0
  61. package/dist/esm/testing/runner.d.ts +31 -0
  62. package/dist/esm/testing/runner.d.ts.map +1 -0
  63. package/dist/esm/testing/runner.js +238 -0
  64. package/dist/esm/testing/runner.js.map +1 -0
  65. package/dist/esm/testing/state.d.ts +138 -0
  66. package/dist/esm/testing/state.d.ts.map +1 -0
  67. package/dist/esm/testing/state.js +31 -0
  68. package/dist/esm/testing/state.js.map +1 -0
  69. package/dist/esm/testing/types.d.ts +319 -0
  70. package/dist/esm/testing/types.d.ts.map +1 -0
  71. package/dist/esm/testing/types.js +9 -0
  72. package/dist/esm/testing/types.js.map +1 -0
  73. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  74. package/dist/esm/utils/channel.d.ts +7 -7
  75. package/dist/esm/utils/channel.d.ts.map +1 -1
  76. package/dist/esm/utils/channel.js +1 -1
  77. package/dist/esm/utils/channel.js.map +1 -1
  78. package/dist/esm/utils/formatPromptMessages.d.ts.map +1 -1
  79. package/dist/esm/utils/getPromptBySelector.d.ts.map +1 -1
  80. package/dist/esm/utils/promisifyResult.d.ts +1 -1
  81. package/dist/esm/utils/promisifyResult.d.ts.map +1 -1
  82. package/dist/esm/utils/promisifyResult.js.map +1 -1
  83. package/dist/esm/utils/schemaMatches.d.ts +5 -5
  84. package/dist/esm/utils/schemaMatches.d.ts.map +1 -1
  85. package/dist/esm/utils/schemaMatches.js.map +1 -1
  86. package/dist/esm/vitest/index.d.ts +5 -0
  87. package/dist/esm/vitest/index.d.ts.map +1 -0
  88. package/dist/esm/vitest/index.js +15 -0
  89. package/dist/esm/vitest/index.js.map +1 -0
  90. package/dist/esm/vitest/reporter.d.ts +19 -0
  91. package/dist/esm/vitest/reporter.d.ts.map +1 -0
  92. package/dist/esm/vitest/reporter.js +27 -0
  93. package/dist/esm/vitest/reporter.js.map +1 -0
  94. package/dist/src/__generated__/api/v1.d.ts +202 -2
  95. package/dist/src/__generated__/api/v1.d.ts.map +1 -1
  96. package/dist/src/jest/index.d.ts +5 -0
  97. package/dist/src/jest/index.d.ts.map +1 -0
  98. package/dist/src/jest/index.js +58 -0
  99. package/dist/src/jest/index.js.map +1 -0
  100. package/dist/src/jest/reporter.d.ts +13 -0
  101. package/dist/src/jest/reporter.d.ts.map +1 -0
  102. package/dist/src/jest/reporter.js +23 -0
  103. package/dist/src/jest/reporter.js.map +1 -0
  104. package/dist/src/prompts/sdks/toAI.d.ts +2 -2
  105. package/dist/src/prompts/sdks/toAI.d.ts.map +1 -1
  106. package/dist/src/prompts/sdks/toAI.js.map +1 -1
  107. package/dist/src/prompts/sdks/toAnthropic.d.ts +2 -2
  108. package/dist/src/prompts/sdks/toAnthropic.d.ts.map +1 -1
  109. package/dist/src/prompts/sdks/toAnthropic.js.map +1 -1
  110. package/dist/src/prompts/sdks/toOpenAI.d.ts +2 -2
  111. package/dist/src/prompts/sdks/toOpenAI.d.ts.map +1 -1
  112. package/dist/src/prompts/sdks/toOpenAI.js.map +1 -1
  113. package/dist/src/prompts/sdks/toSDK.d.ts +8 -8
  114. package/dist/src/prompts/sdks/toSDK.d.ts.map +1 -1
  115. package/dist/src/prompts/sdks/toSDK.js.map +1 -1
  116. package/dist/src/prompts/sdks/types.d.ts +2 -2
  117. package/dist/src/prompts/sdks/types.d.ts.map +1 -1
  118. package/dist/src/schemas/llm/anthropic/converters.d.ts +8 -8
  119. package/dist/src/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
  120. package/dist/src/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
  121. package/dist/src/schemas/llm/constants.d.ts +3 -3
  122. package/dist/src/schemas/llm/converters.d.ts +12 -12
  123. package/dist/src/schemas/llm/openai/converters.d.ts +3 -3
  124. package/dist/src/schemas/llm/schemas.d.ts +2 -2
  125. package/dist/src/testing/acceptance.d.ts +20 -0
  126. package/dist/src/testing/acceptance.d.ts.map +1 -0
  127. package/dist/src/testing/acceptance.js +114 -0
  128. package/dist/src/testing/acceptance.js.map +1 -0
  129. package/dist/src/testing/define-api.d.ts +157 -0
  130. package/dist/src/testing/define-api.d.ts.map +1 -0
  131. package/dist/src/testing/define-api.js +81 -0
  132. package/dist/src/testing/define-api.js.map +1 -0
  133. package/dist/src/testing/helpers.d.ts +55 -0
  134. package/dist/src/testing/helpers.d.ts.map +1 -0
  135. package/dist/src/testing/helpers.js +182 -0
  136. package/dist/src/testing/helpers.js.map +1 -0
  137. package/dist/src/testing/phoenix-test-tracking.d.ts +68 -0
  138. package/dist/src/testing/phoenix-test-tracking.d.ts.map +1 -0
  139. package/dist/src/testing/phoenix-test-tracking.js +530 -0
  140. package/dist/src/testing/phoenix-test-tracking.js.map +1 -0
  141. package/dist/src/testing/report-artifacts.d.ts +45 -0
  142. package/dist/src/testing/report-artifacts.d.ts.map +1 -0
  143. package/dist/src/testing/report-artifacts.js +225 -0
  144. package/dist/src/testing/report-artifacts.js.map +1 -0
  145. package/dist/src/testing/report-run.d.ts +22 -0
  146. package/dist/src/testing/report-run.d.ts.map +1 -0
  147. package/dist/src/testing/report-run.js +47 -0
  148. package/dist/src/testing/report-run.js.map +1 -0
  149. package/dist/src/testing/reporter-format.d.ts +83 -0
  150. package/dist/src/testing/reporter-format.d.ts.map +1 -0
  151. package/dist/src/testing/reporter-format.js +870 -0
  152. package/dist/src/testing/reporter-format.js.map +1 -0
  153. package/dist/src/testing/runner.d.ts +31 -0
  154. package/dist/src/testing/runner.d.ts.map +1 -0
  155. package/dist/src/testing/runner.js +258 -0
  156. package/dist/src/testing/runner.js.map +1 -0
  157. package/dist/src/testing/state.d.ts +138 -0
  158. package/dist/src/testing/state.d.ts.map +1 -0
  159. package/dist/src/testing/state.js +38 -0
  160. package/dist/src/testing/state.js.map +1 -0
  161. package/dist/src/testing/types.d.ts +319 -0
  162. package/dist/src/testing/types.d.ts.map +1 -0
  163. package/dist/src/testing/types.js +13 -0
  164. package/dist/src/testing/types.js.map +1 -0
  165. package/dist/src/utils/channel.d.ts +7 -7
  166. package/dist/src/utils/channel.d.ts.map +1 -1
  167. package/dist/src/utils/channel.js +1 -1
  168. package/dist/src/utils/channel.js.map +1 -1
  169. package/dist/src/utils/formatPromptMessages.d.ts.map +1 -1
  170. package/dist/src/utils/getPromptBySelector.d.ts.map +1 -1
  171. package/dist/src/utils/promisifyResult.d.ts +1 -1
  172. package/dist/src/utils/promisifyResult.d.ts.map +1 -1
  173. package/dist/src/utils/promisifyResult.js.map +1 -1
  174. package/dist/src/utils/schemaMatches.d.ts +5 -5
  175. package/dist/src/utils/schemaMatches.d.ts.map +1 -1
  176. package/dist/src/utils/schemaMatches.js.map +1 -1
  177. package/dist/src/vitest/index.d.ts +5 -0
  178. package/dist/src/vitest/index.d.ts.map +1 -0
  179. package/dist/src/vitest/index.js +23 -0
  180. package/dist/src/vitest/index.js.map +1 -0
  181. package/dist/src/vitest/reporter.d.ts +19 -0
  182. package/dist/src/vitest/reporter.d.ts.map +1 -0
  183. package/dist/src/vitest/reporter.js +34 -0
  184. package/dist/src/vitest/reporter.js.map +1 -0
  185. package/dist/tsconfig.tsbuildinfo +1 -1
  186. package/docs/ci-evals-annotations.mdx +190 -0
  187. package/docs/ci-evals-jest.mdx +78 -0
  188. package/docs/ci-evals-vitest.mdx +240 -0
  189. package/docs/ci-evals.mdx +263 -0
  190. package/docs/overview.mdx +9 -1
  191. package/package.json +49 -17
  192. package/src/__generated__/api/v1.ts +202 -2
  193. package/src/jest/index.ts +124 -0
  194. package/src/jest/reporter.ts +22 -0
  195. package/src/prompts/sdks/toAI.ts +4 -3
  196. package/src/prompts/sdks/toAnthropic.ts +4 -3
  197. package/src/prompts/sdks/toOpenAI.ts +4 -3
  198. package/src/prompts/sdks/toSDK.ts +16 -11
  199. package/src/prompts/sdks/types.ts +2 -2
  200. package/src/testing/acceptance.ts +190 -0
  201. package/src/testing/define-api.ts +279 -0
  202. package/src/testing/helpers.ts +251 -0
  203. package/src/testing/phoenix-test-tracking.ts +637 -0
  204. package/src/testing/report-artifacts.ts +272 -0
  205. package/src/testing/report-run.ts +44 -0
  206. package/src/testing/reporter-format.ts +1072 -0
  207. package/src/testing/runner.ts +350 -0
  208. package/src/testing/state.ts +165 -0
  209. package/src/testing/types.ts +366 -0
  210. package/src/utils/channel.ts +17 -15
  211. package/src/utils/promisifyResult.ts +6 -4
  212. package/src/utils/schemaMatches.ts +12 -10
  213. package/src/vitest/index.ts +57 -0
  214. package/src/vitest/reporter.ts +32 -0
package/README.md CHANGED
@@ -298,6 +298,68 @@ const experiment = await runExperiment({
298
298
 
299
299
  > **Hint:** Tasks and evaluators are instrumented using [OpenTelemetry](https://opentelemetry.io/). You can view detailed traces of experiment runs and evaluations directly in the Phoenix UI for debugging and performance analysis.
300
300
 
301
+ ## Eval Tests
302
+
303
+ The package also exposes Vitest and Jest submodules for writing
304
+ dataset-backed evaluations as normal test suites.
305
+
306
+ ```bash
307
+ npm install -D @arizeai/phoenix-client vitest dotenv
308
+ ```
309
+
310
+ ```ts
311
+ import * as px from "@arizeai/phoenix-client/vitest";
312
+ import { expect } from "vitest";
313
+
314
+ px.describe(
315
+ "text-to-sql",
316
+ () => {
317
+ px.test(
318
+ "select all",
319
+ {
320
+ input: { userQuery: "Get all users" },
321
+ expected: { sql: "SELECT * FROM users;" },
322
+ },
323
+ async ({ input, expected }) => {
324
+ const sql = await generateSql(input.userQuery);
325
+ px.logOutput({ sql });
326
+ expect(sql).toEqual(expected?.sql);
327
+ }
328
+ );
329
+ },
330
+ {
331
+ acceptanceCriteria: [
332
+ // every test must pass (100% of the auto-logged `pass` boolean is true)
333
+ {
334
+ annotationName: "pass",
335
+ metric: "passRate",
336
+ passFn: (a) => a.score === true,
337
+ minPassRate: 1,
338
+ },
339
+ ],
340
+ }
341
+ );
342
+ ```
343
+
344
+ The reference output can be supplied under any one of three interchangeable
345
+ keys — `expected`, `reference`, or `output` — so you can match whichever name
346
+ your evaluators expect. They all resolve to the same slot: the dataset
347
+ example's `output`, exposed to evaluators and the test body as `expected`.
348
+ Supplying more than one at a time is a type error.
349
+
350
+ Use `@arizeai/phoenix-client/vitest/reporter` or
351
+ `@arizeai/phoenix-client/jest/reporter` to print Phoenix dataset and
352
+ experiment links, annotation aggregates, and acceptance criteria at the end
353
+ of a run. Acceptance criteria gate the suite after it finishes — `average`
354
+ checks an aggregate bar (so CI can allow a mean of 80% while still running
355
+ every case), and `passRate` requires a minimum fraction of runs to satisfy a
356
+ per-run `passFn` predicate.
357
+
358
+ See the [`docs/`](./docs) folder — `ci-evals.mdx`, `ci-evals-vitest.mdx`,
359
+ `ci-evals-jest.mdx`, and `ci-evals-annotations.mdx` — for setup, the full
360
+ `describe` / `test` / `test.each` API, acceptance criteria, repetitions,
361
+ dry-run mode, and annotation details.
362
+
301
363
  ## Traces
302
364
 
303
365
  The `@arizeai/phoenix-client` package provides a `traces` export for retrieving trace data from Phoenix projects.
@@ -387,7 +387,11 @@ export interface paths {
387
387
  delete: operations["deleteExperiment"];
388
388
  options?: never;
389
389
  head?: never;
390
- patch?: never;
390
+ /**
391
+ * Update an experiment by ID
392
+ * @description Partially update an experiment's name, description, and/or metadata. Only the fields included in the request body are changed; omitted fields are left as-is. Patching an ephemeral experiment refreshes its last-update timestamp, which extends the window before it is swept away.
393
+ */
394
+ patch: operations["updateExperiment"];
391
395
  trace?: never;
392
396
  };
393
397
  "/v1/experiments/{experiment_id}/incomplete-runs": {
@@ -1609,7 +1613,7 @@ export interface components {
1609
1613
  * ChatContext
1610
1614
  * @description Discriminated union of every UI-state context the agent understands.
1611
1615
  */
1612
- ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"];
1616
+ ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["SessionContext"] | components["schemas"]["PromptContext"] | components["schemas"]["PromptVersionContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"] | components["schemas"]["SubagentsContext"];
1613
1617
  /**
1614
1618
  * ChatRegenerateMessage
1615
1619
  * @description Regenerate message extended with Phoenix-specific fields.
@@ -1636,6 +1640,12 @@ export interface components {
1636
1640
  * @default false
1637
1641
  */
1638
1642
  exportRemoteTraces?: boolean;
1643
+ /**
1644
+ * Attachuserid
1645
+ * @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
1646
+ * @default false
1647
+ */
1648
+ attachUserId?: boolean;
1639
1649
  /** Contexts */
1640
1650
  contexts?: components["schemas"]["ChatContext"][];
1641
1651
  /**
@@ -1683,6 +1693,12 @@ export interface components {
1683
1693
  * @default false
1684
1694
  */
1685
1695
  exportRemoteTraces?: boolean;
1696
+ /**
1697
+ * Attachuserid
1698
+ * @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
1699
+ * @default false
1700
+ */
1701
+ attachUserId?: boolean;
1686
1702
  /** Contexts */
1687
1703
  contexts?: components["schemas"]["ChatContext"][];
1688
1704
  /**
@@ -2354,6 +2370,16 @@ export interface components {
2354
2370
  * @description The ID of the dataset version associated with the experiment
2355
2371
  */
2356
2372
  dataset_version_id: string;
2373
+ /**
2374
+ * Name
2375
+ * @description The name of the experiment
2376
+ */
2377
+ name: string;
2378
+ /**
2379
+ * Description
2380
+ * @description The description of the experiment
2381
+ */
2382
+ description: string | null;
2357
2383
  /**
2358
2384
  * Repetitions
2359
2385
  * @description Number of times the experiment is repeated
@@ -3174,6 +3200,7 @@ export interface components {
3174
3200
  * @default 1
3175
3201
  */
3176
3202
  repetitions?: number;
3203
+ nextExperimentScaffold?: components["schemas"]["PlaygroundExperimentScaffoldContext"] | null;
3177
3204
  /** Instances */
3178
3205
  instances?: components["schemas"]["PlaygroundInstanceContext"][];
3179
3206
  /** Evaluators */
@@ -3218,6 +3245,37 @@ export interface components {
3218
3245
  /** Isapplied */
3219
3246
  isApplied: boolean;
3220
3247
  };
3248
+ /**
3249
+ * PlaygroundExperimentScaffoldContext
3250
+ * @description Experiment name/description/metadata the user has staged for the playground's
3251
+ * *next* dataset-backed run, before that run has started.
3252
+ *
3253
+ * The playground UI lets the user pre-set how the next recorded run's experiment
3254
+ * will be named, described, and tagged (via the ``set_playground_experiment_recording``
3255
+ * tool or the recording form). That staged state is surfaced here so the agent can
3256
+ * see what is already set and avoid re-staging it.
3257
+ *
3258
+ * Field semantics:
3259
+ * - ``name`` / ``description``: the staged values, surfaced to the model verbatim,
3260
+ * or ``None`` when the user has not staged them.
3261
+ * - ``has_metadata``: a presence flag, not the value. Only *whether* metadata has
3262
+ * been staged is model-relevant (so the agent knows not to re-attach it); the
3263
+ * metadata object itself is deliberately kept out of the prompt.
3264
+ *
3265
+ * A field left unstaged (``None`` / ``False``) falls back to the server default when
3266
+ * the run starts. The scaffold is consumed once that next run begins.
3267
+ */
3268
+ PlaygroundExperimentScaffoldContext: {
3269
+ /** Name */
3270
+ name?: string | null;
3271
+ /** Description */
3272
+ description?: string | null;
3273
+ /**
3274
+ * Hasmetadata
3275
+ * @default false
3276
+ */
3277
+ hasMetadata?: boolean;
3278
+ };
3221
3279
  /**
3222
3280
  * PlaygroundInstanceContext
3223
3281
  * @description One mounted playground instance and its current model selection.
@@ -3459,6 +3517,19 @@ export interface components {
3459
3517
  /** Messages */
3460
3518
  messages: components["schemas"]["PromptMessage"][];
3461
3519
  };
3520
+ /**
3521
+ * PromptContext
3522
+ * @description Prompt the user is currently viewing.
3523
+ */
3524
+ PromptContext: {
3525
+ /**
3526
+ * @description discriminator enum property added by openapi-typescript
3527
+ * @enum {string}
3528
+ */
3529
+ type: "prompt";
3530
+ /** Promptnodeid */
3531
+ promptNodeId: string;
3532
+ };
3462
3533
  /** PromptData */
3463
3534
  PromptData: {
3464
3535
  name: components["schemas"]["Identifier"];
@@ -3959,6 +4030,21 @@ export interface components {
3959
4030
  /** Id */
3960
4031
  id: string;
3961
4032
  };
4033
+ /**
4034
+ * PromptVersionContext
4035
+ * @description Prompt version the user is currently viewing.
4036
+ */
4037
+ PromptVersionContext: {
4038
+ /**
4039
+ * @description discriminator enum property added by openapi-typescript
4040
+ * @enum {string}
4041
+ */
4042
+ type: "prompt_version";
4043
+ /** Promptnodeid */
4044
+ promptNodeId: string;
4045
+ /** Promptversionnodeid */
4046
+ promptVersionNodeId: string;
4047
+ };
3962
4048
  /** PromptVersionData */
3963
4049
  PromptVersionData: {
3964
4050
  /** Description */
@@ -4160,6 +4246,21 @@ export interface components {
4160
4246
  /** Next Cursor */
4161
4247
  next_cursor: string | null;
4162
4248
  };
4249
+ /**
4250
+ * SessionContext
4251
+ * @description Session the user is currently viewing.
4252
+ */
4253
+ SessionContext: {
4254
+ /**
4255
+ * @description discriminator enum property added by openapi-typescript
4256
+ * @enum {string}
4257
+ */
4258
+ type: "session";
4259
+ /** Projectnodeid */
4260
+ projectNodeId: string;
4261
+ /** Sessionnodeid */
4262
+ sessionNodeId: string;
4263
+ };
4163
4264
  /** SessionData */
4164
4265
  SessionData: {
4165
4266
  /** Id */
@@ -4586,6 +4687,19 @@ export interface components {
4586
4687
  */
4587
4688
  type?: "step-start";
4588
4689
  };
4690
+ /**
4691
+ * SubagentsContext
4692
+ * @description User's per-turn request to expose the subagent-spawning tool.
4693
+ */
4694
+ SubagentsContext: {
4695
+ /**
4696
+ * @description discriminator enum property added by openapi-typescript
4697
+ * @enum {string}
4698
+ */
4699
+ type: "subagents";
4700
+ /** Enabled */
4701
+ enabled: boolean;
4702
+ };
4589
4703
  /** TextContentPart */
4590
4704
  TextContentPart: {
4591
4705
  /**
@@ -5105,6 +5219,33 @@ export interface components {
5105
5219
  /** Data */
5106
5220
  data: components["schemas"]["CategoricalAnnotationConfig"] | components["schemas"]["ContinuousAnnotationConfig"] | components["schemas"]["FreeformAnnotationConfig"];
5107
5221
  };
5222
+ /**
5223
+ * UpdateExperimentRequestBody
5224
+ * @description Fields to update on an experiment. Omit a field to leave it unchanged.
5225
+ */
5226
+ UpdateExperimentRequestBody: {
5227
+ /**
5228
+ * Name
5229
+ * @description New name for the experiment (null is rejected; name is required)
5230
+ */
5231
+ name?: string | null;
5232
+ /**
5233
+ * Description
5234
+ * @description New description for the experiment (null clears the description)
5235
+ */
5236
+ description?: string | null;
5237
+ /**
5238
+ * Metadata
5239
+ * @description New metadata object for the experiment (replaces the existing metadata as a whole; null is rejected)
5240
+ */
5241
+ metadata?: {
5242
+ [key: string]: unknown;
5243
+ } | null;
5244
+ };
5245
+ /** UpdateExperimentResponseBody */
5246
+ UpdateExperimentResponseBody: {
5247
+ data: components["schemas"]["Experiment"];
5248
+ };
5108
5249
  /** UpdateProjectRequestBody */
5109
5250
  UpdateProjectRequestBody: {
5110
5251
  /** Description */
@@ -5255,6 +5396,12 @@ export interface components {
5255
5396
  * @default false
5256
5397
  */
5257
5398
  exportRemoteTraces?: boolean;
5399
+ /**
5400
+ * Attachuserid
5401
+ * @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
5402
+ * @default false
5403
+ */
5404
+ attachUserId?: boolean;
5258
5405
  /** Messages */
5259
5406
  messages: components["schemas"]["UIMessage"][];
5260
5407
  /** Model */
@@ -6577,6 +6724,59 @@ export interface operations {
6577
6724
  };
6578
6725
  };
6579
6726
  };
6727
+ updateExperiment: {
6728
+ parameters: {
6729
+ query?: never;
6730
+ header?: never;
6731
+ path: {
6732
+ experiment_id: string;
6733
+ };
6734
+ cookie?: never;
6735
+ };
6736
+ requestBody: {
6737
+ content: {
6738
+ "application/json": components["schemas"]["UpdateExperimentRequestBody"];
6739
+ };
6740
+ };
6741
+ responses: {
6742
+ /** @description Experiment updated successfully */
6743
+ 200: {
6744
+ headers: {
6745
+ [name: string]: unknown;
6746
+ };
6747
+ content: {
6748
+ "application/json": components["schemas"]["UpdateExperimentResponseBody"];
6749
+ };
6750
+ };
6751
+ /** @description Forbidden */
6752
+ 403: {
6753
+ headers: {
6754
+ [name: string]: unknown;
6755
+ };
6756
+ content: {
6757
+ "text/plain": string;
6758
+ };
6759
+ };
6760
+ /** @description Experiment not found */
6761
+ 404: {
6762
+ headers: {
6763
+ [name: string]: unknown;
6764
+ };
6765
+ content: {
6766
+ "text/plain": string;
6767
+ };
6768
+ };
6769
+ /** @description Invalid experiment ID or request body */
6770
+ 422: {
6771
+ headers: {
6772
+ [name: string]: unknown;
6773
+ };
6774
+ content: {
6775
+ "text/plain": string;
6776
+ };
6777
+ };
6778
+ };
6779
+ };
6580
6780
  getIncompleteExperimentRuns: {
6581
6781
  parameters: {
6582
6782
  query?: {