@arizeai/phoenix-client 7.7.1 → 7.8.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 +6 -0
  2. package/dist/esm/__generated__/api/v1.d.ts +127 -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 +1 -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 +2 -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 +127 -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 +1 -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 +2 -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 +1 -1
  29. package/src/__generated__/api/v1.ts +127 -6
  30. package/src/prompts/constants.ts +1 -0
  31. package/src/prompts/sdks/toOpenAI.ts +2 -0
  32. package/src/types/prompts.ts +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-client",
3
- "version": "7.7.1",
3
+ "version": "7.8.0",
4
4
  "description": "A client for the Phoenix API",
5
5
  "keywords": [
6
6
  "arize",
@@ -761,7 +761,11 @@ export interface paths {
761
761
  get: operations["listProjectTraces"];
762
762
  put?: never;
763
763
  post?: never;
764
- delete?: never;
764
+ /**
765
+ * Delete traces from a project
766
+ * @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.
767
+ */
768
+ delete: operations["deleteProjectTraces"];
765
769
  options?: never;
766
770
  head?: never;
767
771
  patch?: never;
@@ -1568,7 +1572,7 @@ export interface paths {
1568
1572
  put?: never;
1569
1573
  /**
1570
1574
  * OpenAI-compatible chat completions
1571
- * @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.
1575
+ * @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, 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.
1572
1576
  *
1573
1577
  * **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.
1574
1578
  */
@@ -2424,6 +2428,11 @@ export interface components {
2424
2428
  * @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.
2425
2429
  */
2426
2430
  lastMessageId?: string | null;
2431
+ /**
2432
+ * Credentials
2433
+ * @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.
2434
+ */
2435
+ credentials?: components["schemas"]["ChatRequestCredential"][];
2427
2436
  /**
2428
2437
  * Recordlocaltraces
2429
2438
  * @default false
@@ -2441,6 +2450,28 @@ export interface components {
2441
2450
  */
2442
2451
  instrumentUserId?: boolean;
2443
2452
  };
2453
+ /**
2454
+ * ChatRequestCredential
2455
+ * @description One client-held credential riding the request for the duration of a turn.
2456
+ *
2457
+ * The value is ephemeral: it is injected server-side as transport auth for
2458
+ * the matching integration and is never persisted, traced, or echoed. It is
2459
+ * top-level on the request body — never part of the message — so it cannot
2460
+ * reach the session transcript.
2461
+ */
2462
+ ChatRequestCredential: {
2463
+ /**
2464
+ * Key
2465
+ * @description The credential's secret-key name.
2466
+ * @constant
2467
+ */
2468
+ key: "GITHUB_PERSONAL_ACCESS_TOKEN";
2469
+ /**
2470
+ * Value
2471
+ * Format: password
2472
+ */
2473
+ value: string;
2474
+ };
2444
2475
  /** CodeEvaluatorUIContext */
2445
2476
  CodeEvaluatorUIContext: {
2446
2477
  /**
@@ -2561,7 +2592,7 @@ export interface components {
2561
2592
  CreateChatCompletionRequestBody: {
2562
2593
  /**
2563
2594
  * Model
2564
- * @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'.
2595
+ * @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, zai) or 'custom:{provider_id}:{model_name}' for a stored custom provider, e.g. 'openai:gpt-4o' or 'anthropic:claude-sonnet-4-5'.
2565
2596
  */
2566
2597
  model: string;
2567
2598
  /** Messages */
@@ -4057,7 +4088,7 @@ export interface components {
4057
4088
  * ModelProvider
4058
4089
  * @enum {string}
4059
4090
  */
4060
- ModelProvider: "OPENAI" | "AZURE_OPENAI" | "ANTHROPIC" | "GOOGLE" | "DEEPSEEK" | "XAI" | "OLLAMA" | "AWS" | "CEREBRAS" | "FIREWORKS" | "GROQ" | "MOONSHOT" | "PERPLEXITY" | "TOGETHER";
4091
+ ModelProvider: "OPENAI" | "AZURE_OPENAI" | "ANTHROPIC" | "GOOGLE" | "DEEPSEEK" | "XAI" | "OLLAMA" | "AWS" | "CEREBRAS" | "FIREWORKS" | "GROQ" | "MOONSHOT" | "PERPLEXITY" | "TOGETHER" | "ZAI";
4061
4092
  /** OAuth2User */
4062
4093
  OAuth2User: {
4063
4094
  /** Id */
@@ -5236,7 +5267,7 @@ export interface components {
5236
5267
  template_type: components["schemas"]["PromptTemplateType"];
5237
5268
  template_format: components["schemas"]["PromptTemplateFormat"];
5238
5269
  /** Invocation Parameters */
5239
- 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"];
5270
+ 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"];
5240
5271
  tools?: components["schemas"]["PromptTools"] | null;
5241
5272
  /** Response Format */
5242
5273
  response_format?: components["schemas"]["PromptResponseFormatJSONSchema"] | null;
@@ -5255,7 +5286,7 @@ export interface components {
5255
5286
  template_type: components["schemas"]["PromptTemplateType"];
5256
5287
  template_format: components["schemas"]["PromptTemplateFormat"];
5257
5288
  /** Invocation Parameters */
5258
- 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"];
5289
+ 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"];
5259
5290
  tools?: components["schemas"]["PromptTools"] | null;
5260
5291
  /** Response Format */
5261
5292
  response_format?: components["schemas"]["PromptResponseFormatJSONSchema"] | null;
@@ -5323,6 +5354,43 @@ export interface components {
5323
5354
  [key: string]: unknown;
5324
5355
  };
5325
5356
  };
5357
+ /** PromptZAIInvocationParameters */
5358
+ PromptZAIInvocationParameters: {
5359
+ /**
5360
+ * @description discriminator enum property added by openapi-typescript
5361
+ * @enum {string}
5362
+ */
5363
+ type: "zai";
5364
+ zai: components["schemas"]["PromptZAIInvocationParametersContent"];
5365
+ };
5366
+ /** PromptZAIInvocationParametersContent */
5367
+ PromptZAIInvocationParametersContent: {
5368
+ /** Temperature */
5369
+ temperature?: number;
5370
+ /** Max Tokens */
5371
+ max_tokens?: number;
5372
+ /** Max Completion Tokens */
5373
+ max_completion_tokens?: number;
5374
+ /** Frequency Penalty */
5375
+ frequency_penalty?: number;
5376
+ /** Presence Penalty */
5377
+ presence_penalty?: number;
5378
+ /** Top P */
5379
+ top_p?: number;
5380
+ /** Seed */
5381
+ seed?: number;
5382
+ /** Stop */
5383
+ stop?: string[];
5384
+ /**
5385
+ * Reasoning Effort
5386
+ * @enum {string}
5387
+ */
5388
+ reasoning_effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
5389
+ /** Extra Body */
5390
+ extra_body?: {
5391
+ [key: string]: unknown;
5392
+ };
5393
+ };
5326
5394
  /**
5327
5395
  * PydanticAIMessageMetadata
5328
5396
  * @description Local pin of pydantic-ai's message-level ``pydantic_ai`` metadata
@@ -10041,6 +10109,59 @@ export interface operations {
10041
10109
  };
10042
10110
  };
10043
10111
  };
10112
+ deleteProjectTraces: {
10113
+ parameters: {
10114
+ query: {
10115
+ /** @description Required inclusive lower bound on trace start time (ISO 8601). */
10116
+ start_time: string;
10117
+ /** @description Required exclusive upper bound on trace start time (ISO 8601). */
10118
+ end_time: string;
10119
+ };
10120
+ header?: never;
10121
+ path: {
10122
+ /** @description The project identifier: either project ID or project name. */
10123
+ project_identifier: string;
10124
+ };
10125
+ cookie?: never;
10126
+ };
10127
+ requestBody?: never;
10128
+ responses: {
10129
+ /** @description No content returned after the matching traces are deleted */
10130
+ 204: {
10131
+ headers: {
10132
+ [name: string]: unknown;
10133
+ };
10134
+ content?: never;
10135
+ };
10136
+ /** @description Forbidden */
10137
+ 403: {
10138
+ headers: {
10139
+ [name: string]: unknown;
10140
+ };
10141
+ content: {
10142
+ "text/plain": string;
10143
+ };
10144
+ };
10145
+ /** @description Not Found */
10146
+ 404: {
10147
+ headers: {
10148
+ [name: string]: unknown;
10149
+ };
10150
+ content: {
10151
+ "text/plain": string;
10152
+ };
10153
+ };
10154
+ /** @description Unprocessable Entity */
10155
+ 422: {
10156
+ headers: {
10157
+ [name: string]: unknown;
10158
+ };
10159
+ content: {
10160
+ "text/plain": string;
10161
+ };
10162
+ };
10163
+ };
10164
+ };
10044
10165
  annotateTraces: {
10045
10166
  parameters: {
10046
10167
  query?: {
@@ -17,4 +17,5 @@ export const PromptModelProviders: Record<PromptModelProvider, string> = {
17
17
  GROQ: "Groq",
18
18
  MOONSHOT: "Moonshot",
19
19
  PERPLEXITY: "Perplexity",
20
+ ZAI: "Z.ai",
20
21
  };
@@ -55,6 +55,8 @@ function getInvocationParameters(
55
55
  return parameters.perplexity;
56
56
  case "together":
57
57
  return parameters.together;
58
+ case "zai":
59
+ return parameters.zai;
58
60
  default:
59
61
  // eslint-disable-next-line no-console
60
62
  console.warn(
@@ -16,7 +16,8 @@ export type PromptModelProvider =
16
16
  | "FIREWORKS"
17
17
  | "GROQ"
18
18
  | "MOONSHOT"
19
- | "PERPLEXITY";
19
+ | "PERPLEXITY"
20
+ | "ZAI";
20
21
 
21
22
  /**
22
23
  * Supported prompt provider SDKs