opik 1.8.102 → 1.9.1

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.
package/dist/index.d.cts CHANGED
@@ -668,6 +668,8 @@ interface ProviderApiKeyWrite {
668
668
  provider: ProviderApiKeyWriteProvider;
669
669
  apiKey?: string;
670
670
  name?: string;
671
+ /** Provider name - to uniquely identify custom providers (e.g., 'ollama', 'vllm'). Should not be set for standard providers (OpenAI, Anthropic, etc.). */
672
+ providerName?: string;
671
673
  headers?: Record<string, string>;
672
674
  configuration?: Record<string, string>;
673
675
  baseUrl?: string;
@@ -683,6 +685,8 @@ interface ProviderApiKeyWrite {
683
685
  interface ProviderApiKeyUpdate {
684
686
  apiKey?: string;
685
687
  name?: string;
688
+ /** Provider name - can be set to migrate legacy custom LLM providers to the new multi-provider format. Once set, it cannot be changed. Should only be set for custom LLM providers. */
689
+ providerName?: string;
686
690
  headers?: Record<string, string>;
687
691
  configuration?: Record<string, string>;
688
692
  baseUrl?: string;
@@ -1048,6 +1052,8 @@ interface GetSpansByProjectRequest {
1048
1052
  stripAttachments?: boolean;
1049
1053
  sorting?: string;
1050
1054
  exclude?: string;
1055
+ fromTime?: Date;
1056
+ toTime?: Date;
1051
1057
  }
1052
1058
 
1053
1059
  /**
@@ -1135,6 +1141,8 @@ interface GetSpanStatsRequest {
1135
1141
  traceId?: string;
1136
1142
  type?: GetSpanStatsRequestType;
1137
1143
  filters?: string;
1144
+ fromTime?: Date;
1145
+ toTime?: Date;
1138
1146
  }
1139
1147
 
1140
1148
  /**
@@ -1152,6 +1160,10 @@ interface SpanSearchStreamRequestPublic {
1152
1160
  lastRetrievedId?: string;
1153
1161
  /** Truncate image included in either input, output or metadata */
1154
1162
  truncate?: boolean;
1163
+ /** Filter spans created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1164
+ fromTime?: Date;
1165
+ /** Filter spans created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1166
+ toTime?: Date;
1155
1167
  }
1156
1168
 
1157
1169
  /**
@@ -1495,6 +1507,8 @@ interface GetTraceThreadsRequest {
1495
1507
  stripAttachments?: boolean;
1496
1508
  filters?: string;
1497
1509
  sorting?: string;
1510
+ fromTime?: Date;
1511
+ toTime?: Date;
1498
1512
  }
1499
1513
 
1500
1514
  /**
@@ -1531,6 +1545,10 @@ interface TraceThreadSearchStreamRequest {
1531
1545
  truncate?: boolean;
1532
1546
  /** If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments */
1533
1547
  stripAttachments?: boolean;
1548
+ /** Filter trace threads created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1549
+ fromTime?: Date;
1550
+ /** Filter trace threads created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1551
+ toTime?: Date;
1534
1552
  }
1535
1553
 
1536
1554
  /**
@@ -1548,6 +1566,10 @@ interface TraceSearchStreamRequestPublic {
1548
1566
  truncate?: boolean;
1549
1567
  /** If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments */
1550
1568
  stripAttachments?: boolean;
1569
+ /** Filter traces created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1570
+ fromTime?: Date;
1571
+ /** Filter traces created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1572
+ toTime?: Date;
1551
1573
  }
1552
1574
 
1553
1575
  /**
@@ -1718,7 +1740,7 @@ interface AlertTriggerConfigWrite {
1718
1740
  /**
1719
1741
  * This file was auto-generated by Fern from our API Definition.
1720
1742
  */
1721
- type AlertTriggerWriteEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished";
1743
+ type AlertTriggerWriteEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished" | "trace:cost" | "trace:latency";
1722
1744
  declare const AlertTriggerWriteEventType: {
1723
1745
  readonly TraceErrors: "trace:errors";
1724
1746
  readonly TraceFeedbackScore: "trace:feedback_score";
@@ -1728,6 +1750,8 @@ declare const AlertTriggerWriteEventType: {
1728
1750
  readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1729
1751
  readonly PromptDeleted: "prompt:deleted";
1730
1752
  readonly ExperimentFinished: "experiment:finished";
1753
+ readonly TraceCost: "trace:cost";
1754
+ readonly TraceLatency: "trace:latency";
1731
1755
  };
1732
1756
 
1733
1757
  /**
@@ -1821,7 +1845,7 @@ interface AlertTriggerConfigPublic {
1821
1845
  /**
1822
1846
  * This file was auto-generated by Fern from our API Definition.
1823
1847
  */
1824
- type AlertTriggerPublicEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished";
1848
+ type AlertTriggerPublicEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished" | "trace:cost" | "trace:latency";
1825
1849
  declare const AlertTriggerPublicEventType: {
1826
1850
  readonly TraceErrors: "trace:errors";
1827
1851
  readonly TraceFeedbackScore: "trace:feedback_score";
@@ -1831,6 +1855,8 @@ declare const AlertTriggerPublicEventType: {
1831
1855
  readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1832
1856
  readonly PromptDeleted: "prompt:deleted";
1833
1857
  readonly ExperimentFinished: "experiment:finished";
1858
+ readonly TraceCost: "trace:cost";
1859
+ readonly TraceLatency: "trace:latency";
1834
1860
  };
1835
1861
 
1836
1862
  /**
@@ -3619,6 +3645,8 @@ interface Trace$1 {
3619
3645
  threadId?: string;
3620
3646
  visibilityMode?: TraceVisibilityMode;
3621
3647
  llmSpanCount?: number;
3648
+ /** List of unique provider names from all spans in this trace, sorted alphabetically */
3649
+ providers?: string[];
3622
3650
  }
3623
3651
 
3624
3652
  /**
@@ -4177,6 +4205,8 @@ interface ProviderApiKeyPublic {
4177
4205
  provider: ProviderApiKeyPublicProvider;
4178
4206
  apiKey?: string;
4179
4207
  name?: string;
4208
+ /** Provider name - to uniquely identify custom providers (e.g., 'ollama', 'vllm'). Should not be set for standard providers (OpenAI, Anthropic, etc.). */
4209
+ providerName?: string;
4180
4210
  headers?: Record<string, string>;
4181
4211
  configuration?: Record<string, string>;
4182
4212
  baseUrl?: string;
@@ -4980,6 +5010,8 @@ interface TracePublic {
4980
5010
  threadId?: string;
4981
5011
  visibilityMode?: TracePublicVisibilityMode;
4982
5012
  llmSpanCount?: number;
5013
+ /** List of unique provider names from all spans in this trace, sorted alphabetically */
5014
+ providers?: string[];
4983
5015
  }
4984
5016
 
4985
5017
  /**
package/dist/index.d.ts CHANGED
@@ -668,6 +668,8 @@ interface ProviderApiKeyWrite {
668
668
  provider: ProviderApiKeyWriteProvider;
669
669
  apiKey?: string;
670
670
  name?: string;
671
+ /** Provider name - to uniquely identify custom providers (e.g., 'ollama', 'vllm'). Should not be set for standard providers (OpenAI, Anthropic, etc.). */
672
+ providerName?: string;
671
673
  headers?: Record<string, string>;
672
674
  configuration?: Record<string, string>;
673
675
  baseUrl?: string;
@@ -683,6 +685,8 @@ interface ProviderApiKeyWrite {
683
685
  interface ProviderApiKeyUpdate {
684
686
  apiKey?: string;
685
687
  name?: string;
688
+ /** Provider name - can be set to migrate legacy custom LLM providers to the new multi-provider format. Once set, it cannot be changed. Should only be set for custom LLM providers. */
689
+ providerName?: string;
686
690
  headers?: Record<string, string>;
687
691
  configuration?: Record<string, string>;
688
692
  baseUrl?: string;
@@ -1048,6 +1052,8 @@ interface GetSpansByProjectRequest {
1048
1052
  stripAttachments?: boolean;
1049
1053
  sorting?: string;
1050
1054
  exclude?: string;
1055
+ fromTime?: Date;
1056
+ toTime?: Date;
1051
1057
  }
1052
1058
 
1053
1059
  /**
@@ -1135,6 +1141,8 @@ interface GetSpanStatsRequest {
1135
1141
  traceId?: string;
1136
1142
  type?: GetSpanStatsRequestType;
1137
1143
  filters?: string;
1144
+ fromTime?: Date;
1145
+ toTime?: Date;
1138
1146
  }
1139
1147
 
1140
1148
  /**
@@ -1152,6 +1160,10 @@ interface SpanSearchStreamRequestPublic {
1152
1160
  lastRetrievedId?: string;
1153
1161
  /** Truncate image included in either input, output or metadata */
1154
1162
  truncate?: boolean;
1163
+ /** Filter spans created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1164
+ fromTime?: Date;
1165
+ /** Filter spans created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1166
+ toTime?: Date;
1155
1167
  }
1156
1168
 
1157
1169
  /**
@@ -1495,6 +1507,8 @@ interface GetTraceThreadsRequest {
1495
1507
  stripAttachments?: boolean;
1496
1508
  filters?: string;
1497
1509
  sorting?: string;
1510
+ fromTime?: Date;
1511
+ toTime?: Date;
1498
1512
  }
1499
1513
 
1500
1514
  /**
@@ -1531,6 +1545,10 @@ interface TraceThreadSearchStreamRequest {
1531
1545
  truncate?: boolean;
1532
1546
  /** If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments */
1533
1547
  stripAttachments?: boolean;
1548
+ /** Filter trace threads created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1549
+ fromTime?: Date;
1550
+ /** Filter trace threads created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1551
+ toTime?: Date;
1534
1552
  }
1535
1553
 
1536
1554
  /**
@@ -1548,6 +1566,10 @@ interface TraceSearchStreamRequestPublic {
1548
1566
  truncate?: boolean;
1549
1567
  /** If true, returns attachment references like [file.png]; if false, downloads and reinjects stripped attachments */
1550
1568
  stripAttachments?: boolean;
1569
+ /** Filter traces created from this time (ISO-8601 format). Must be provided together with 'to_time'. */
1570
+ fromTime?: Date;
1571
+ /** Filter traces created up to this time (ISO-8601 format). Must be provided together with 'from_time' and must be after 'from_time'. */
1572
+ toTime?: Date;
1551
1573
  }
1552
1574
 
1553
1575
  /**
@@ -1718,7 +1740,7 @@ interface AlertTriggerConfigWrite {
1718
1740
  /**
1719
1741
  * This file was auto-generated by Fern from our API Definition.
1720
1742
  */
1721
- type AlertTriggerWriteEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished";
1743
+ type AlertTriggerWriteEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished" | "trace:cost" | "trace:latency";
1722
1744
  declare const AlertTriggerWriteEventType: {
1723
1745
  readonly TraceErrors: "trace:errors";
1724
1746
  readonly TraceFeedbackScore: "trace:feedback_score";
@@ -1728,6 +1750,8 @@ declare const AlertTriggerWriteEventType: {
1728
1750
  readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1729
1751
  readonly PromptDeleted: "prompt:deleted";
1730
1752
  readonly ExperimentFinished: "experiment:finished";
1753
+ readonly TraceCost: "trace:cost";
1754
+ readonly TraceLatency: "trace:latency";
1731
1755
  };
1732
1756
 
1733
1757
  /**
@@ -1821,7 +1845,7 @@ interface AlertTriggerConfigPublic {
1821
1845
  /**
1822
1846
  * This file was auto-generated by Fern from our API Definition.
1823
1847
  */
1824
- type AlertTriggerPublicEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished";
1848
+ type AlertTriggerPublicEventType = "trace:errors" | "trace:feedback_score" | "trace_thread:feedback_score" | "prompt:created" | "prompt:committed" | "trace:guardrails_triggered" | "prompt:deleted" | "experiment:finished" | "trace:cost" | "trace:latency";
1825
1849
  declare const AlertTriggerPublicEventType: {
1826
1850
  readonly TraceErrors: "trace:errors";
1827
1851
  readonly TraceFeedbackScore: "trace:feedback_score";
@@ -1831,6 +1855,8 @@ declare const AlertTriggerPublicEventType: {
1831
1855
  readonly TraceGuardrailsTriggered: "trace:guardrails_triggered";
1832
1856
  readonly PromptDeleted: "prompt:deleted";
1833
1857
  readonly ExperimentFinished: "experiment:finished";
1858
+ readonly TraceCost: "trace:cost";
1859
+ readonly TraceLatency: "trace:latency";
1834
1860
  };
1835
1861
 
1836
1862
  /**
@@ -3619,6 +3645,8 @@ interface Trace$1 {
3619
3645
  threadId?: string;
3620
3646
  visibilityMode?: TraceVisibilityMode;
3621
3647
  llmSpanCount?: number;
3648
+ /** List of unique provider names from all spans in this trace, sorted alphabetically */
3649
+ providers?: string[];
3622
3650
  }
3623
3651
 
3624
3652
  /**
@@ -4177,6 +4205,8 @@ interface ProviderApiKeyPublic {
4177
4205
  provider: ProviderApiKeyPublicProvider;
4178
4206
  apiKey?: string;
4179
4207
  name?: string;
4208
+ /** Provider name - to uniquely identify custom providers (e.g., 'ollama', 'vllm'). Should not be set for standard providers (OpenAI, Anthropic, etc.). */
4209
+ providerName?: string;
4180
4210
  headers?: Record<string, string>;
4181
4211
  configuration?: Record<string, string>;
4182
4212
  baseUrl?: string;
@@ -4980,6 +5010,8 @@ interface TracePublic {
4980
5010
  threadId?: string;
4981
5011
  visibilityMode?: TracePublicVisibilityMode;
4982
5012
  llmSpanCount?: number;
5013
+ /** List of unique provider names from all spans in this trace, sorted alphabetically */
5014
+ providers?: string[];
4983
5015
  }
4984
5016
 
4985
5017
  /**