@arizeai/phoenix-client 7.7.1 → 7.9.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 (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/esm/__generated__/api/v1.d.ts +170 -6
  3. package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
  4. package/dist/esm/prompts/constants.d.ts.map +1 -1
  5. package/dist/esm/prompts/constants.js +3 -0
  6. package/dist/esm/prompts/constants.js.map +1 -1
  7. package/dist/esm/prompts/sdks/toOpenAI.d.ts.map +1 -1
  8. package/dist/esm/prompts/sdks/toOpenAI.js +4 -0
  9. package/dist/esm/prompts/sdks/toOpenAI.js.map +1 -1
  10. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  11. package/dist/esm/types/prompts.d.ts +1 -1
  12. package/dist/esm/types/prompts.d.ts.map +1 -1
  13. package/dist/esm/types/prompts.js.map +1 -1
  14. package/dist/esm/utils/getPromptBySelector.d.ts +1 -1
  15. package/dist/src/__generated__/api/v1.d.ts +170 -6
  16. package/dist/src/__generated__/api/v1.d.ts.map +1 -1
  17. package/dist/src/prompts/constants.d.ts.map +1 -1
  18. package/dist/src/prompts/constants.js +3 -0
  19. package/dist/src/prompts/constants.js.map +1 -1
  20. package/dist/src/prompts/sdks/toOpenAI.d.ts.map +1 -1
  21. package/dist/src/prompts/sdks/toOpenAI.js +4 -0
  22. package/dist/src/prompts/sdks/toOpenAI.js.map +1 -1
  23. package/dist/src/types/prompts.d.ts +1 -1
  24. package/dist/src/types/prompts.d.ts.map +1 -1
  25. package/dist/src/types/prompts.js.map +1 -1
  26. package/dist/src/utils/getPromptBySelector.d.ts +1 -1
  27. package/dist/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +2 -2
  29. package/src/__generated__/api/v1.ts +170 -6
  30. package/src/prompts/constants.ts +3 -0
  31. package/src/prompts/sdks/toOpenAI.ts +4 -0
  32. package/src/types/prompts.ts +4 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @arizeai/phoenix-client
2
2
 
3
+ ## 7.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bf047af: Add Meta (Muse Spark models) as a built-in OpenAI-compatible model provider (`META`).
8
+
9
+ ## 7.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 58b7017: Add Z.ai (GLM models) as a built-in OpenAI-compatible model provider (`ZAI`).
14
+
3
15
  ## 7.7.1
4
16
 
5
17
  ### Patch Changes
@@ -760,7 +760,11 @@ export interface paths {
760
760
  get: operations["listProjectTraces"];
761
761
  put?: never;
762
762
  post?: never;
763
- delete?: never;
763
+ /**
764
+ * Delete traces from a project
765
+ * @description Delete traces from a project without deleting the project or its configuration. Only traces whose start time is within the required `[start_time, end_time)` interval are deleted. Associated spans are cascade deleted, and project sessions left with no remaining traces are also deleted. Naive datetimes are interpreted as UTC.
766
+ */
767
+ delete: operations["deleteProjectTraces"];
764
768
  options?: never;
765
769
  head?: never;
766
770
  patch?: never;
@@ -1567,7 +1571,7 @@ export interface paths {
1567
1571
  put?: never;
1568
1572
  /**
1569
1573
  * OpenAI-compatible chat completions
1570
- * @description Creates a chat completion using the OpenAI wire format, proxying to the selected provider with credentials resolved on the server (secret store first, environment second) — callers never handle provider API keys. Model must be '{provider}:{model_name}' for a built-in provider (one of anthropic, aws, azure_openai, cerebras, deepseek, fireworks, google, groq, moonshot, ollama, openai, perplexity, together, xai) or 'custom:{provider_id}:{model_name}' for a stored custom provider, e.g. 'openai:gpt-4o' or 'anthropic:claude-sonnet-4-5'. Set `stream: true` for server-sent events of `chat.completion.chunk` payloads terminated by `data: [DONE]`. Tool calling is not supported.
1574
+ * @description Creates a chat completion using the OpenAI wire format, proxying to the selected provider with credentials resolved on the server (secret store first, environment second) — callers never handle provider API keys. Model must be '{provider}:{model_name}' for a built-in provider (one of anthropic, aws, azure_openai, cerebras, deepseek, fireworks, google, groq, meta, minimax, moonshot, ollama, openai, perplexity, together, xai, zai) or 'custom:{provider_id}:{model_name}' for a stored custom provider, e.g. 'openai:gpt-4o' or 'anthropic:claude-sonnet-4-5'. Set `stream: true` for server-sent events of `chat.completion.chunk` payloads terminated by `data: [DONE]`. Tool calling is not supported.
1571
1575
  *
1572
1576
  * **Phoenix is not an AI gateway.** The same server also takes on trace ingestion traffic, so routing production LLM calls through it competes with ingestion. Use this endpoint only to quickly try out different models in non-production environments.
1573
1577
  */
@@ -2423,6 +2427,11 @@ export interface components {
2423
2427
  * @description The id of the last transcript message the client has rendered, used for optimistic concurrency. Omit when the session has no messages; required (and validated against the persisted transcript) once it does. On mismatch the server rejects the send with HTTP 409 and code ``agent_session_messages_stale`` — the client should refetch the session before retrying.
2424
2428
  */
2425
2429
  lastMessageId?: string | null;
2430
+ /**
2431
+ * Credentials
2432
+ * @description Client-held credentials for optional integrations (e.g. the user's own GitHub personal access token under the key ``GITHUB_PERSONAL_ACCESS_TOKEN``), used only for the duration of the turn and never persisted. Unknown keys are rejected.
2433
+ */
2434
+ credentials?: components["schemas"]["ChatRequestCredential"][];
2426
2435
  /**
2427
2436
  * Recordlocaltraces
2428
2437
  * @default false
@@ -2440,6 +2449,28 @@ export interface components {
2440
2449
  */
2441
2450
  instrumentUserId?: boolean;
2442
2451
  };
2452
+ /**
2453
+ * ChatRequestCredential
2454
+ * @description One client-held credential riding the request for the duration of a turn.
2455
+ *
2456
+ * The value is ephemeral: it is injected server-side as transport auth for
2457
+ * the matching integration and is never persisted, traced, or echoed. It is
2458
+ * top-level on the request body — never part of the message — so it cannot
2459
+ * reach the session transcript.
2460
+ */
2461
+ ChatRequestCredential: {
2462
+ /**
2463
+ * Key
2464
+ * @description The credential's secret-key name.
2465
+ * @constant
2466
+ */
2467
+ key: "GITHUB_PERSONAL_ACCESS_TOKEN";
2468
+ /**
2469
+ * Value
2470
+ * Format: password
2471
+ */
2472
+ value: string;
2473
+ };
2443
2474
  /** CodeEvaluatorUIContext */
2444
2475
  CodeEvaluatorUIContext: {
2445
2476
  /**
@@ -2560,7 +2591,7 @@ export interface components {
2560
2591
  CreateChatCompletionRequestBody: {
2561
2592
  /**
2562
2593
  * Model
2563
- * @description Model must be '{provider}:{model_name}' for a built-in provider (one of anthropic, aws, azure_openai, cerebras, deepseek, fireworks, google, groq, moonshot, ollama, openai, perplexity, together, xai) or 'custom:{provider_id}:{model_name}' for a stored custom provider, e.g. 'openai:gpt-4o' or 'anthropic:claude-sonnet-4-5'.
2594
+ * @description Model must be '{provider}:{model_name}' for a built-in provider (one of anthropic, aws, azure_openai, cerebras, deepseek, fireworks, google, groq, meta, minimax, moonshot, ollama, openai, perplexity, together, xai, zai) or 'custom:{provider_id}:{model_name}' for a stored custom provider, e.g. 'openai:gpt-4o' or 'anthropic:claude-sonnet-4-5'.
2564
2595
  */
2565
2596
  model: string;
2566
2597
  /** Messages */
@@ -4056,7 +4087,7 @@ export interface components {
4056
4087
  * ModelProvider
4057
4088
  * @enum {string}
4058
4089
  */
4059
- ModelProvider: "OPENAI" | "AZURE_OPENAI" | "ANTHROPIC" | "GOOGLE" | "DEEPSEEK" | "XAI" | "OLLAMA" | "AWS" | "CEREBRAS" | "FIREWORKS" | "GROQ" | "MOONSHOT" | "PERPLEXITY" | "TOGETHER";
4090
+ ModelProvider: "OPENAI" | "AZURE_OPENAI" | "ANTHROPIC" | "GOOGLE" | "DEEPSEEK" | "XAI" | "OLLAMA" | "AWS" | "CEREBRAS" | "FIREWORKS" | "GROQ" | "MOONSHOT" | "MINIMAX" | "PERPLEXITY" | "TOGETHER" | "ZAI" | "META";
4060
4091
  /** OAuth2User */
4061
4092
  OAuth2User: {
4062
4093
  /** Id */
@@ -4904,6 +4935,43 @@ export interface components {
4904
4935
  /** Content */
4905
4936
  content: string | (components["schemas"]["TextContentPart"] | components["schemas"]["ToolCallContentPart"] | components["schemas"]["ToolResultContentPart"])[];
4906
4937
  };
4938
+ /** PromptMetaInvocationParameters */
4939
+ PromptMetaInvocationParameters: {
4940
+ /**
4941
+ * @description discriminator enum property added by openapi-typescript
4942
+ * @enum {string}
4943
+ */
4944
+ type: "meta";
4945
+ meta: components["schemas"]["PromptMetaInvocationParametersContent"];
4946
+ };
4947
+ /** PromptMetaInvocationParametersContent */
4948
+ PromptMetaInvocationParametersContent: {
4949
+ /** Temperature */
4950
+ temperature?: number;
4951
+ /** Max Tokens */
4952
+ max_tokens?: number;
4953
+ /** Max Completion Tokens */
4954
+ max_completion_tokens?: number;
4955
+ /** Frequency Penalty */
4956
+ frequency_penalty?: number;
4957
+ /** Presence Penalty */
4958
+ presence_penalty?: number;
4959
+ /** Top P */
4960
+ top_p?: number;
4961
+ /** Seed */
4962
+ seed?: number;
4963
+ /** Stop */
4964
+ stop?: string[];
4965
+ /**
4966
+ * Reasoning Effort
4967
+ * @enum {string}
4968
+ */
4969
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
4970
+ /** Extra Body */
4971
+ extra_body?: {
4972
+ [key: string]: unknown;
4973
+ };
4974
+ };
4907
4975
  /** PromptMoonshotInvocationParameters */
4908
4976
  PromptMoonshotInvocationParameters: {
4909
4977
  /**
@@ -5235,7 +5303,7 @@ export interface components {
5235
5303
  template_type: components["schemas"]["PromptTemplateType"];
5236
5304
  template_format: components["schemas"]["PromptTemplateFormat"];
5237
5305
  /** Invocation Parameters */
5238
- invocation_parameters: components["schemas"]["PromptOpenAIInvocationParameters"] | components["schemas"]["PromptAzureOpenAIInvocationParameters"] | components["schemas"]["PromptAnthropicInvocationParameters"] | components["schemas"]["PromptGoogleInvocationParameters"] | components["schemas"]["PromptDeepSeekInvocationParameters"] | components["schemas"]["PromptXAIInvocationParameters"] | components["schemas"]["PromptOllamaInvocationParameters"] | components["schemas"]["PromptAwsInvocationParameters"] | components["schemas"]["PromptCerebrasInvocationParameters"] | components["schemas"]["PromptFireworksInvocationParameters"] | components["schemas"]["PromptGroqInvocationParameters"] | components["schemas"]["PromptMoonshotInvocationParameters"] | components["schemas"]["PromptPerplexityInvocationParameters"] | components["schemas"]["PromptTogetherInvocationParameters"];
5306
+ invocation_parameters: components["schemas"]["PromptOpenAIInvocationParameters"] | components["schemas"]["PromptAzureOpenAIInvocationParameters"] | components["schemas"]["PromptAnthropicInvocationParameters"] | components["schemas"]["PromptGoogleInvocationParameters"] | components["schemas"]["PromptDeepSeekInvocationParameters"] | components["schemas"]["PromptXAIInvocationParameters"] | components["schemas"]["PromptOllamaInvocationParameters"] | components["schemas"]["PromptAwsInvocationParameters"] | components["schemas"]["PromptCerebrasInvocationParameters"] | components["schemas"]["PromptFireworksInvocationParameters"] | components["schemas"]["PromptGroqInvocationParameters"] | components["schemas"]["PromptMoonshotInvocationParameters"] | components["schemas"]["PromptPerplexityInvocationParameters"] | components["schemas"]["PromptTogetherInvocationParameters"] | components["schemas"]["PromptZAIInvocationParameters"] | components["schemas"]["PromptMetaInvocationParameters"];
5239
5307
  tools?: components["schemas"]["PromptTools"] | null;
5240
5308
  /** Response Format */
5241
5309
  response_format?: components["schemas"]["PromptResponseFormatJSONSchema"] | null;
@@ -5254,7 +5322,7 @@ export interface components {
5254
5322
  template_type: components["schemas"]["PromptTemplateType"];
5255
5323
  template_format: components["schemas"]["PromptTemplateFormat"];
5256
5324
  /** Invocation Parameters */
5257
- invocation_parameters: components["schemas"]["PromptOpenAIInvocationParameters"] | components["schemas"]["PromptAzureOpenAIInvocationParameters"] | components["schemas"]["PromptAnthropicInvocationParameters"] | components["schemas"]["PromptGoogleInvocationParameters"] | components["schemas"]["PromptDeepSeekInvocationParameters"] | components["schemas"]["PromptXAIInvocationParameters"] | components["schemas"]["PromptOllamaInvocationParameters"] | components["schemas"]["PromptAwsInvocationParameters"] | components["schemas"]["PromptCerebrasInvocationParameters"] | components["schemas"]["PromptFireworksInvocationParameters"] | components["schemas"]["PromptGroqInvocationParameters"] | components["schemas"]["PromptMoonshotInvocationParameters"] | components["schemas"]["PromptPerplexityInvocationParameters"] | components["schemas"]["PromptTogetherInvocationParameters"];
5325
+ invocation_parameters: components["schemas"]["PromptOpenAIInvocationParameters"] | components["schemas"]["PromptAzureOpenAIInvocationParameters"] | components["schemas"]["PromptAnthropicInvocationParameters"] | components["schemas"]["PromptGoogleInvocationParameters"] | components["schemas"]["PromptDeepSeekInvocationParameters"] | components["schemas"]["PromptXAIInvocationParameters"] | components["schemas"]["PromptOllamaInvocationParameters"] | components["schemas"]["PromptAwsInvocationParameters"] | components["schemas"]["PromptCerebrasInvocationParameters"] | components["schemas"]["PromptFireworksInvocationParameters"] | components["schemas"]["PromptGroqInvocationParameters"] | components["schemas"]["PromptMoonshotInvocationParameters"] | components["schemas"]["PromptPerplexityInvocationParameters"] | components["schemas"]["PromptTogetherInvocationParameters"] | components["schemas"]["PromptZAIInvocationParameters"] | components["schemas"]["PromptMetaInvocationParameters"];
5258
5326
  tools?: components["schemas"]["PromptTools"] | null;
5259
5327
  /** Response Format */
5260
5328
  response_format?: components["schemas"]["PromptResponseFormatJSONSchema"] | null;
@@ -5322,6 +5390,43 @@ export interface components {
5322
5390
  [key: string]: unknown;
5323
5391
  };
5324
5392
  };
5393
+ /** PromptZAIInvocationParameters */
5394
+ PromptZAIInvocationParameters: {
5395
+ /**
5396
+ * @description discriminator enum property added by openapi-typescript
5397
+ * @enum {string}
5398
+ */
5399
+ type: "zai";
5400
+ zai: components["schemas"]["PromptZAIInvocationParametersContent"];
5401
+ };
5402
+ /** PromptZAIInvocationParametersContent */
5403
+ PromptZAIInvocationParametersContent: {
5404
+ /** Temperature */
5405
+ temperature?: number;
5406
+ /** Max Tokens */
5407
+ max_tokens?: number;
5408
+ /** Max Completion Tokens */
5409
+ max_completion_tokens?: number;
5410
+ /** Frequency Penalty */
5411
+ frequency_penalty?: number;
5412
+ /** Presence Penalty */
5413
+ presence_penalty?: number;
5414
+ /** Top P */
5415
+ top_p?: number;
5416
+ /** Seed */
5417
+ seed?: number;
5418
+ /** Stop */
5419
+ stop?: string[];
5420
+ /**
5421
+ * Reasoning Effort
5422
+ * @enum {string}
5423
+ */
5424
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
5425
+ /** Extra Body */
5426
+ extra_body?: {
5427
+ [key: string]: unknown;
5428
+ };
5429
+ };
5325
5430
  /**
5326
5431
  * PydanticAIMessageMetadata
5327
5432
  * @description Local pin of pydantic-ai's message-level ``pydantic_ai`` metadata
@@ -9992,6 +10097,12 @@ export interface operations {
9992
10097
  include_spans?: boolean;
9993
10098
  /** @description List of session identifiers to filter traces by. Each value can be either a session_id string or a session GlobalID. Only traces belonging to the specified sessions will be returned. */
9994
10099
  session_identifier?: string[] | null;
10100
+ /** @description Filter by trace error status. If true, only return traces that contain at least one span with `status_code == ERROR`. If false, only return traces with no errored spans. If omitted, traces are not filtered by error status. Matches the error indicator shown in the UI. */
10101
+ error?: boolean | null;
10102
+ /** @description Inclusive lower bound on trace latency in milliseconds. */
10103
+ min_latency_ms?: number | null;
10104
+ /** @description Inclusive upper bound on trace latency in milliseconds. */
10105
+ max_latency_ms?: number | null;
9995
10106
  };
9996
10107
  header?: never;
9997
10108
  path: {
@@ -10040,6 +10151,59 @@ export interface operations {
10040
10151
  };
10041
10152
  };
10042
10153
  };
10154
+ deleteProjectTraces: {
10155
+ parameters: {
10156
+ query: {
10157
+ /** @description Required inclusive lower bound on trace start time (ISO 8601). */
10158
+ start_time: string;
10159
+ /** @description Required exclusive upper bound on trace start time (ISO 8601). */
10160
+ end_time: string;
10161
+ };
10162
+ header?: never;
10163
+ path: {
10164
+ /** @description The project identifier: either project ID or project name. */
10165
+ project_identifier: string;
10166
+ };
10167
+ cookie?: never;
10168
+ };
10169
+ requestBody?: never;
10170
+ responses: {
10171
+ /** @description No content returned after the matching traces are deleted */
10172
+ 204: {
10173
+ headers: {
10174
+ [name: string]: unknown;
10175
+ };
10176
+ content?: never;
10177
+ };
10178
+ /** @description Forbidden */
10179
+ 403: {
10180
+ headers: {
10181
+ [name: string]: unknown;
10182
+ };
10183
+ content: {
10184
+ "text/plain": string;
10185
+ };
10186
+ };
10187
+ /** @description Not Found */
10188
+ 404: {
10189
+ headers: {
10190
+ [name: string]: unknown;
10191
+ };
10192
+ content: {
10193
+ "text/plain": string;
10194
+ };
10195
+ };
10196
+ /** @description Unprocessable Entity */
10197
+ 422: {
10198
+ headers: {
10199
+ [name: string]: unknown;
10200
+ };
10201
+ content: {
10202
+ "text/plain": string;
10203
+ };
10204
+ };
10205
+ };
10206
+ };
10043
10207
  annotateTraces: {
10044
10208
  parameters: {
10045
10209
  query?: {