opik 1.9.44 → 1.9.46

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
@@ -771,7 +771,7 @@ interface FindFeedbackDefinitionsRequest {
771
771
  /**
772
772
  * This file was auto-generated by Fern from our API Definition.
773
773
  */
774
- type ProviderApiKeyWriteProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm";
774
+ type ProviderApiKeyWriteProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm" | "opik-builtin";
775
775
  declare const ProviderApiKeyWriteProvider: {
776
776
  readonly Openai: "openai";
777
777
  readonly Anthropic: "anthropic";
@@ -779,6 +779,7 @@ declare const ProviderApiKeyWriteProvider: {
779
779
  readonly Openrouter: "openrouter";
780
780
  readonly VertexAi: "vertex-ai";
781
781
  readonly CustomLlm: "custom-llm";
782
+ readonly OpikBuiltin: "opik-builtin";
782
783
  };
783
784
 
784
785
  /**
@@ -2328,6 +2329,13 @@ interface WorkspaceNameHolder {
2328
2329
  workspaceName?: string;
2329
2330
  }
2330
2331
 
2332
+ /**
2333
+ * This file was auto-generated by Fern from our API Definition.
2334
+ */
2335
+ interface AudioUrl {
2336
+ url: string;
2337
+ }
2338
+
2331
2339
  /**
2332
2340
  * This file was auto-generated by Fern from our API Definition.
2333
2341
  */
@@ -2385,6 +2393,7 @@ interface LlmAsJudgeMessageContent {
2385
2393
  text?: string;
2386
2394
  imageUrl?: ImageUrl;
2387
2395
  videoUrl?: VideoUrl;
2396
+ audioUrl?: AudioUrl;
2388
2397
  }
2389
2398
 
2390
2399
  /**
@@ -2459,6 +2468,14 @@ interface SpanLlmAsJudgeCode {
2459
2468
  schema: LlmAsJudgeOutputSchema[];
2460
2469
  }
2461
2470
 
2471
+ /**
2472
+ * This file was auto-generated by Fern from our API Definition.
2473
+ */
2474
+ interface SpanUserDefinedMetricPythonCode {
2475
+ metric: string;
2476
+ arguments: Record<string, string>;
2477
+ }
2478
+
2462
2479
  /**
2463
2480
  * This file was auto-generated by Fern from our API Definition.
2464
2481
  */
@@ -2551,6 +2568,13 @@ interface VideoUrl {
2551
2568
  url: string;
2552
2569
  }
2553
2570
 
2571
+ /**
2572
+ * This file was auto-generated by Fern from our API Definition.
2573
+ */
2574
+ interface AudioUrlWrite {
2575
+ url: string;
2576
+ }
2577
+
2554
2578
  /**
2555
2579
  * This file was auto-generated by Fern from our API Definition.
2556
2580
  */
@@ -2569,6 +2593,15 @@ interface AutomationRuleEvaluatorSpanLlmAsJudgeWrite {
2569
2593
  code?: SpanLlmAsJudgeCodeWrite;
2570
2594
  }
2571
2595
 
2596
+ /**
2597
+ * This file was auto-generated by Fern from our API Definition.
2598
+ */
2599
+
2600
+ interface AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite {
2601
+ filters?: SpanFilterWrite[];
2602
+ code?: SpanUserDefinedMetricPythonCodeWrite;
2603
+ }
2604
+
2572
2605
  /**
2573
2606
  * This file was auto-generated by Fern from our API Definition.
2574
2607
  */
@@ -2600,7 +2633,7 @@ interface AutomationRuleEvaluatorUserDefinedMetricPythonWrite {
2600
2633
  * This file was auto-generated by Fern from our API Definition.
2601
2634
  */
2602
2635
 
2603
- type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorWrite.SpanLlmAsJudge;
2636
+ type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorWrite.SpanLlmAsJudge | AutomationRuleEvaluatorWrite.SpanUserDefinedMetricPython;
2604
2637
  declare namespace AutomationRuleEvaluatorWrite {
2605
2638
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgeWrite, _Base {
2606
2639
  type: "llm_as_judge";
@@ -2617,6 +2650,9 @@ declare namespace AutomationRuleEvaluatorWrite {
2617
2650
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgeWrite, _Base {
2618
2651
  type: "span_llm_as_judge";
2619
2652
  }
2653
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite, _Base {
2654
+ type: "span_user_defined_metric_python";
2655
+ }
2620
2656
  interface _Base {
2621
2657
  projectId: string;
2622
2658
  name: string;
@@ -2659,6 +2695,7 @@ interface LlmAsJudgeMessageContentWrite {
2659
2695
  text?: string;
2660
2696
  imageUrl?: ImageUrlWrite;
2661
2697
  videoUrl?: VideoUrlWrite;
2698
+ audioUrl?: AudioUrlWrite;
2662
2699
  }
2663
2700
 
2664
2701
  /**
@@ -2757,6 +2794,14 @@ interface SpanLlmAsJudgeCodeWrite {
2757
2794
  schema: LlmAsJudgeOutputSchemaWrite[];
2758
2795
  }
2759
2796
 
2797
+ /**
2798
+ * This file was auto-generated by Fern from our API Definition.
2799
+ */
2800
+ interface SpanUserDefinedMetricPythonCodeWrite {
2801
+ metric: string;
2802
+ arguments: Record<string, string>;
2803
+ }
2804
+
2760
2805
  /**
2761
2806
  * This file was auto-generated by Fern from our API Definition.
2762
2807
  */
@@ -2849,6 +2894,13 @@ interface VideoUrlWrite {
2849
2894
  url: string;
2850
2895
  }
2851
2896
 
2897
+ /**
2898
+ * This file was auto-generated by Fern from our API Definition.
2899
+ */
2900
+ interface AudioUrlPublic {
2901
+ url: string;
2902
+ }
2903
+
2852
2904
  /**
2853
2905
  * This file was auto-generated by Fern from our API Definition.
2854
2906
  */
@@ -2862,7 +2914,7 @@ interface AutomationRuleEvaluatorLlmAsJudgePublic {
2862
2914
  * This file was auto-generated by Fern from our API Definition.
2863
2915
  */
2864
2916
 
2865
- type AutomationRuleEvaluatorObjectObjectPublic = AutomationRuleEvaluatorObjectObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.SpanLlmAsJudge;
2917
+ type AutomationRuleEvaluatorObjectObjectPublic = AutomationRuleEvaluatorObjectObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.SpanUserDefinedMetricPython;
2866
2918
  declare namespace AutomationRuleEvaluatorObjectObjectPublic {
2867
2919
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
2868
2920
  type: "llm_as_judge";
@@ -2879,6 +2931,9 @@ declare namespace AutomationRuleEvaluatorObjectObjectPublic {
2879
2931
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
2880
2932
  type: "span_llm_as_judge";
2881
2933
  }
2934
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic, _Base {
2935
+ type: "span_user_defined_metric_python";
2936
+ }
2882
2937
  interface _Base {
2883
2938
  id?: string;
2884
2939
  projectId: string;
@@ -2915,6 +2970,15 @@ interface AutomationRuleEvaluatorSpanLlmAsJudgePublic {
2915
2970
  code?: SpanLlmAsJudgeCodePublic;
2916
2971
  }
2917
2972
 
2973
+ /**
2974
+ * This file was auto-generated by Fern from our API Definition.
2975
+ */
2976
+
2977
+ interface AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic {
2978
+ filters?: SpanFilterPublic[];
2979
+ code?: SpanUserDefinedMetricPythonCodePublic;
2980
+ }
2981
+
2918
2982
  /**
2919
2983
  * This file was auto-generated by Fern from our API Definition.
2920
2984
  */
@@ -2975,6 +3039,7 @@ interface LlmAsJudgeMessageContentPublic {
2975
3039
  text?: string;
2976
3040
  imageUrl?: ImageUrlPublic;
2977
3041
  videoUrl?: VideoUrlPublic;
3042
+ audioUrl?: AudioUrlPublic;
2978
3043
  }
2979
3044
 
2980
3045
  /**
@@ -3073,6 +3138,14 @@ interface SpanLlmAsJudgeCodePublic {
3073
3138
  schema: LlmAsJudgeOutputSchemaPublic[];
3074
3139
  }
3075
3140
 
3141
+ /**
3142
+ * This file was auto-generated by Fern from our API Definition.
3143
+ */
3144
+ interface SpanUserDefinedMetricPythonCodePublic {
3145
+ metric: string;
3146
+ arguments: Record<string, string>;
3147
+ }
3148
+
3076
3149
  /**
3077
3150
  * This file was auto-generated by Fern from our API Definition.
3078
3151
  */
@@ -3169,7 +3242,7 @@ interface VideoUrlPublic {
3169
3242
  * This file was auto-generated by Fern from our API Definition.
3170
3243
  */
3171
3244
 
3172
- type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorPublic.SpanLlmAsJudge;
3245
+ type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorPublic.SpanLlmAsJudge | AutomationRuleEvaluatorPublic.SpanUserDefinedMetricPython;
3173
3246
  declare namespace AutomationRuleEvaluatorPublic {
3174
3247
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
3175
3248
  type: "llm_as_judge";
@@ -3186,6 +3259,9 @@ declare namespace AutomationRuleEvaluatorPublic {
3186
3259
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
3187
3260
  type: "span_llm_as_judge";
3188
3261
  }
3262
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic, _Base {
3263
+ type: "span_user_defined_metric_python";
3264
+ }
3189
3265
  interface _Base {
3190
3266
  id?: string;
3191
3267
  projectId: string;
@@ -3240,7 +3316,7 @@ interface LogPage {
3240
3316
  * This file was auto-generated by Fern from our API Definition.
3241
3317
  */
3242
3318
 
3243
- type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorUpdate.SpanLlmAsJudge;
3319
+ type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorUpdate.SpanLlmAsJudge | AutomationRuleEvaluatorUpdate.SpanUserDefinedMetricPython;
3244
3320
  declare namespace AutomationRuleEvaluatorUpdate {
3245
3321
  interface LlmAsJudge extends AutomationRuleEvaluatorUpdateLlmAsJudge, _Base {
3246
3322
  type: "llm_as_judge";
@@ -3257,6 +3333,9 @@ declare namespace AutomationRuleEvaluatorUpdate {
3257
3333
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorUpdateSpanLlmAsJudge, _Base {
3258
3334
  type: "span_llm_as_judge";
3259
3335
  }
3336
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython, _Base {
3337
+ type: "span_user_defined_metric_python";
3338
+ }
3260
3339
  interface _Base {
3261
3340
  name: string;
3262
3341
  samplingRate?: number;
@@ -3284,6 +3363,15 @@ interface AutomationRuleEvaluatorUpdateSpanLlmAsJudge {
3284
3363
  code?: SpanLlmAsJudgeCode;
3285
3364
  }
3286
3365
 
3366
+ /**
3367
+ * This file was auto-generated by Fern from our API Definition.
3368
+ */
3369
+
3370
+ interface AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython {
3371
+ filters?: SpanFilter[];
3372
+ code?: SpanUserDefinedMetricPythonCode;
3373
+ }
3374
+
3287
3375
  /**
3288
3376
  * This file was auto-generated by Fern from our API Definition.
3289
3377
  */
@@ -5046,7 +5134,7 @@ interface ProviderApiKeyPagePublic {
5046
5134
  /**
5047
5135
  * This file was auto-generated by Fern from our API Definition.
5048
5136
  */
5049
- type ProviderApiKeyPublicProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm";
5137
+ type ProviderApiKeyPublicProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm" | "opik-builtin";
5050
5138
  declare const ProviderApiKeyPublicProvider: {
5051
5139
  readonly Openai: "openai";
5052
5140
  readonly Anthropic: "anthropic";
@@ -5054,6 +5142,7 @@ declare const ProviderApiKeyPublicProvider: {
5054
5142
  readonly Openrouter: "openrouter";
5055
5143
  readonly VertexAi: "vertex-ai";
5056
5144
  readonly CustomLlm: "custom-llm";
5145
+ readonly OpikBuiltin: "opik-builtin";
5057
5146
  };
5058
5147
 
5059
5148
  /**
@@ -5074,6 +5163,8 @@ interface ProviderApiKeyPublic {
5074
5163
  createdBy?: string;
5075
5164
  lastUpdatedAt?: Date;
5076
5165
  lastUpdatedBy?: string;
5166
+ /** If true, this provider is system-managed and cannot be edited or deleted */
5167
+ readOnly?: boolean;
5077
5168
  }
5078
5169
 
5079
5170
  /**
@@ -5092,10 +5183,11 @@ interface ManualEvaluationResponse {
5092
5183
  /**
5093
5184
  * Type of entity to evaluate (trace or thread)
5094
5185
  */
5095
- type ManualEvaluationRequestEntityType = "trace" | "thread";
5186
+ type ManualEvaluationRequestEntityType = "trace" | "thread" | "span";
5096
5187
  declare const ManualEvaluationRequestEntityType: {
5097
5188
  readonly Trace: "trace";
5098
5189
  readonly Thread: "thread";
5190
+ readonly Span: "span";
5099
5191
  };
5100
5192
 
5101
5193
  /**
@@ -5690,6 +5782,7 @@ interface ServiceTogglesConfig {
5690
5782
  pythonEvaluatorEnabled: boolean;
5691
5783
  traceThreadPythonEvaluatorEnabled: boolean;
5692
5784
  spanLlmAsJudgeEnabled: boolean;
5785
+ spanUserDefinedMetricPythonEnabled: boolean;
5693
5786
  guardrailsEnabled: boolean;
5694
5787
  opikAiEnabled: boolean;
5695
5788
  alertsEnabled: boolean;
@@ -8225,11 +8318,30 @@ declare namespace ManualEvaluation {
8225
8318
  }
8226
8319
  }
8227
8320
  /**
8228
- * Manual evaluation resources for traces and threads
8321
+ * Manual evaluation resources for traces, threads, and spans
8229
8322
  */
8230
8323
  declare class ManualEvaluation {
8231
8324
  protected readonly _options: ManualEvaluation.Options;
8232
8325
  constructor(_options?: ManualEvaluation.Options);
8326
+ /**
8327
+ * Manually trigger evaluation rules on selected spans. Bypasses sampling and enqueues all specified spans for evaluation.
8328
+ *
8329
+ * @param {OpikApi.ManualEvaluationRequest} request
8330
+ * @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
8331
+ *
8332
+ * @throws {@link OpikApi.BadRequestError}
8333
+ * @throws {@link OpikApi.NotFoundError}
8334
+ *
8335
+ * @example
8336
+ * await client.manualEvaluation.evaluateSpans({
8337
+ * projectId: "550e8400-e29b-41d4-a716-446655440000",
8338
+ * entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
8339
+ * ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
8340
+ * entityType: "trace"
8341
+ * })
8342
+ */
8343
+ evaluateSpans(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
8344
+ private __evaluateSpans;
8233
8345
  /**
8234
8346
  * Manually trigger evaluation rules on selected threads. Bypasses sampling and enqueues all specified threads for evaluation.
8235
8347
  *
package/dist/index.d.ts CHANGED
@@ -771,7 +771,7 @@ interface FindFeedbackDefinitionsRequest {
771
771
  /**
772
772
  * This file was auto-generated by Fern from our API Definition.
773
773
  */
774
- type ProviderApiKeyWriteProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm";
774
+ type ProviderApiKeyWriteProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm" | "opik-builtin";
775
775
  declare const ProviderApiKeyWriteProvider: {
776
776
  readonly Openai: "openai";
777
777
  readonly Anthropic: "anthropic";
@@ -779,6 +779,7 @@ declare const ProviderApiKeyWriteProvider: {
779
779
  readonly Openrouter: "openrouter";
780
780
  readonly VertexAi: "vertex-ai";
781
781
  readonly CustomLlm: "custom-llm";
782
+ readonly OpikBuiltin: "opik-builtin";
782
783
  };
783
784
 
784
785
  /**
@@ -2328,6 +2329,13 @@ interface WorkspaceNameHolder {
2328
2329
  workspaceName?: string;
2329
2330
  }
2330
2331
 
2332
+ /**
2333
+ * This file was auto-generated by Fern from our API Definition.
2334
+ */
2335
+ interface AudioUrl {
2336
+ url: string;
2337
+ }
2338
+
2331
2339
  /**
2332
2340
  * This file was auto-generated by Fern from our API Definition.
2333
2341
  */
@@ -2385,6 +2393,7 @@ interface LlmAsJudgeMessageContent {
2385
2393
  text?: string;
2386
2394
  imageUrl?: ImageUrl;
2387
2395
  videoUrl?: VideoUrl;
2396
+ audioUrl?: AudioUrl;
2388
2397
  }
2389
2398
 
2390
2399
  /**
@@ -2459,6 +2468,14 @@ interface SpanLlmAsJudgeCode {
2459
2468
  schema: LlmAsJudgeOutputSchema[];
2460
2469
  }
2461
2470
 
2471
+ /**
2472
+ * This file was auto-generated by Fern from our API Definition.
2473
+ */
2474
+ interface SpanUserDefinedMetricPythonCode {
2475
+ metric: string;
2476
+ arguments: Record<string, string>;
2477
+ }
2478
+
2462
2479
  /**
2463
2480
  * This file was auto-generated by Fern from our API Definition.
2464
2481
  */
@@ -2551,6 +2568,13 @@ interface VideoUrl {
2551
2568
  url: string;
2552
2569
  }
2553
2570
 
2571
+ /**
2572
+ * This file was auto-generated by Fern from our API Definition.
2573
+ */
2574
+ interface AudioUrlWrite {
2575
+ url: string;
2576
+ }
2577
+
2554
2578
  /**
2555
2579
  * This file was auto-generated by Fern from our API Definition.
2556
2580
  */
@@ -2569,6 +2593,15 @@ interface AutomationRuleEvaluatorSpanLlmAsJudgeWrite {
2569
2593
  code?: SpanLlmAsJudgeCodeWrite;
2570
2594
  }
2571
2595
 
2596
+ /**
2597
+ * This file was auto-generated by Fern from our API Definition.
2598
+ */
2599
+
2600
+ interface AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite {
2601
+ filters?: SpanFilterWrite[];
2602
+ code?: SpanUserDefinedMetricPythonCodeWrite;
2603
+ }
2604
+
2572
2605
  /**
2573
2606
  * This file was auto-generated by Fern from our API Definition.
2574
2607
  */
@@ -2600,7 +2633,7 @@ interface AutomationRuleEvaluatorUserDefinedMetricPythonWrite {
2600
2633
  * This file was auto-generated by Fern from our API Definition.
2601
2634
  */
2602
2635
 
2603
- type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorWrite.SpanLlmAsJudge;
2636
+ type AutomationRuleEvaluatorWrite = AutomationRuleEvaluatorWrite.LlmAsJudge | AutomationRuleEvaluatorWrite.UserDefinedMetricPython | AutomationRuleEvaluatorWrite.TraceThreadLlmAsJudge | AutomationRuleEvaluatorWrite.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorWrite.SpanLlmAsJudge | AutomationRuleEvaluatorWrite.SpanUserDefinedMetricPython;
2604
2637
  declare namespace AutomationRuleEvaluatorWrite {
2605
2638
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgeWrite, _Base {
2606
2639
  type: "llm_as_judge";
@@ -2617,6 +2650,9 @@ declare namespace AutomationRuleEvaluatorWrite {
2617
2650
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgeWrite, _Base {
2618
2651
  type: "span_llm_as_judge";
2619
2652
  }
2653
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonWrite, _Base {
2654
+ type: "span_user_defined_metric_python";
2655
+ }
2620
2656
  interface _Base {
2621
2657
  projectId: string;
2622
2658
  name: string;
@@ -2659,6 +2695,7 @@ interface LlmAsJudgeMessageContentWrite {
2659
2695
  text?: string;
2660
2696
  imageUrl?: ImageUrlWrite;
2661
2697
  videoUrl?: VideoUrlWrite;
2698
+ audioUrl?: AudioUrlWrite;
2662
2699
  }
2663
2700
 
2664
2701
  /**
@@ -2757,6 +2794,14 @@ interface SpanLlmAsJudgeCodeWrite {
2757
2794
  schema: LlmAsJudgeOutputSchemaWrite[];
2758
2795
  }
2759
2796
 
2797
+ /**
2798
+ * This file was auto-generated by Fern from our API Definition.
2799
+ */
2800
+ interface SpanUserDefinedMetricPythonCodeWrite {
2801
+ metric: string;
2802
+ arguments: Record<string, string>;
2803
+ }
2804
+
2760
2805
  /**
2761
2806
  * This file was auto-generated by Fern from our API Definition.
2762
2807
  */
@@ -2849,6 +2894,13 @@ interface VideoUrlWrite {
2849
2894
  url: string;
2850
2895
  }
2851
2896
 
2897
+ /**
2898
+ * This file was auto-generated by Fern from our API Definition.
2899
+ */
2900
+ interface AudioUrlPublic {
2901
+ url: string;
2902
+ }
2903
+
2852
2904
  /**
2853
2905
  * This file was auto-generated by Fern from our API Definition.
2854
2906
  */
@@ -2862,7 +2914,7 @@ interface AutomationRuleEvaluatorLlmAsJudgePublic {
2862
2914
  * This file was auto-generated by Fern from our API Definition.
2863
2915
  */
2864
2916
 
2865
- type AutomationRuleEvaluatorObjectObjectPublic = AutomationRuleEvaluatorObjectObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.SpanLlmAsJudge;
2917
+ type AutomationRuleEvaluatorObjectObjectPublic = AutomationRuleEvaluatorObjectObjectPublic.LlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.UserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorObjectObjectPublic.SpanLlmAsJudge | AutomationRuleEvaluatorObjectObjectPublic.SpanUserDefinedMetricPython;
2866
2918
  declare namespace AutomationRuleEvaluatorObjectObjectPublic {
2867
2919
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
2868
2920
  type: "llm_as_judge";
@@ -2879,6 +2931,9 @@ declare namespace AutomationRuleEvaluatorObjectObjectPublic {
2879
2931
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
2880
2932
  type: "span_llm_as_judge";
2881
2933
  }
2934
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic, _Base {
2935
+ type: "span_user_defined_metric_python";
2936
+ }
2882
2937
  interface _Base {
2883
2938
  id?: string;
2884
2939
  projectId: string;
@@ -2915,6 +2970,15 @@ interface AutomationRuleEvaluatorSpanLlmAsJudgePublic {
2915
2970
  code?: SpanLlmAsJudgeCodePublic;
2916
2971
  }
2917
2972
 
2973
+ /**
2974
+ * This file was auto-generated by Fern from our API Definition.
2975
+ */
2976
+
2977
+ interface AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic {
2978
+ filters?: SpanFilterPublic[];
2979
+ code?: SpanUserDefinedMetricPythonCodePublic;
2980
+ }
2981
+
2918
2982
  /**
2919
2983
  * This file was auto-generated by Fern from our API Definition.
2920
2984
  */
@@ -2975,6 +3039,7 @@ interface LlmAsJudgeMessageContentPublic {
2975
3039
  text?: string;
2976
3040
  imageUrl?: ImageUrlPublic;
2977
3041
  videoUrl?: VideoUrlPublic;
3042
+ audioUrl?: AudioUrlPublic;
2978
3043
  }
2979
3044
 
2980
3045
  /**
@@ -3073,6 +3138,14 @@ interface SpanLlmAsJudgeCodePublic {
3073
3138
  schema: LlmAsJudgeOutputSchemaPublic[];
3074
3139
  }
3075
3140
 
3141
+ /**
3142
+ * This file was auto-generated by Fern from our API Definition.
3143
+ */
3144
+ interface SpanUserDefinedMetricPythonCodePublic {
3145
+ metric: string;
3146
+ arguments: Record<string, string>;
3147
+ }
3148
+
3076
3149
  /**
3077
3150
  * This file was auto-generated by Fern from our API Definition.
3078
3151
  */
@@ -3169,7 +3242,7 @@ interface VideoUrlPublic {
3169
3242
  * This file was auto-generated by Fern from our API Definition.
3170
3243
  */
3171
3244
 
3172
- type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorPublic.SpanLlmAsJudge;
3245
+ type AutomationRuleEvaluatorPublic = AutomationRuleEvaluatorPublic.LlmAsJudge | AutomationRuleEvaluatorPublic.UserDefinedMetricPython | AutomationRuleEvaluatorPublic.TraceThreadLlmAsJudge | AutomationRuleEvaluatorPublic.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorPublic.SpanLlmAsJudge | AutomationRuleEvaluatorPublic.SpanUserDefinedMetricPython;
3173
3246
  declare namespace AutomationRuleEvaluatorPublic {
3174
3247
  interface LlmAsJudge extends AutomationRuleEvaluatorLlmAsJudgePublic, _Base {
3175
3248
  type: "llm_as_judge";
@@ -3186,6 +3259,9 @@ declare namespace AutomationRuleEvaluatorPublic {
3186
3259
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorSpanLlmAsJudgePublic, _Base {
3187
3260
  type: "span_llm_as_judge";
3188
3261
  }
3262
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorSpanUserDefinedMetricPythonPublic, _Base {
3263
+ type: "span_user_defined_metric_python";
3264
+ }
3189
3265
  interface _Base {
3190
3266
  id?: string;
3191
3267
  projectId: string;
@@ -3240,7 +3316,7 @@ interface LogPage {
3240
3316
  * This file was auto-generated by Fern from our API Definition.
3241
3317
  */
3242
3318
 
3243
- type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorUpdate.SpanLlmAsJudge;
3319
+ type AutomationRuleEvaluatorUpdate = AutomationRuleEvaluatorUpdate.LlmAsJudge | AutomationRuleEvaluatorUpdate.UserDefinedMetricPython | AutomationRuleEvaluatorUpdate.TraceThreadLlmAsJudge | AutomationRuleEvaluatorUpdate.TraceThreadUserDefinedMetricPython | AutomationRuleEvaluatorUpdate.SpanLlmAsJudge | AutomationRuleEvaluatorUpdate.SpanUserDefinedMetricPython;
3244
3320
  declare namespace AutomationRuleEvaluatorUpdate {
3245
3321
  interface LlmAsJudge extends AutomationRuleEvaluatorUpdateLlmAsJudge, _Base {
3246
3322
  type: "llm_as_judge";
@@ -3257,6 +3333,9 @@ declare namespace AutomationRuleEvaluatorUpdate {
3257
3333
  interface SpanLlmAsJudge extends AutomationRuleEvaluatorUpdateSpanLlmAsJudge, _Base {
3258
3334
  type: "span_llm_as_judge";
3259
3335
  }
3336
+ interface SpanUserDefinedMetricPython extends AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython, _Base {
3337
+ type: "span_user_defined_metric_python";
3338
+ }
3260
3339
  interface _Base {
3261
3340
  name: string;
3262
3341
  samplingRate?: number;
@@ -3284,6 +3363,15 @@ interface AutomationRuleEvaluatorUpdateSpanLlmAsJudge {
3284
3363
  code?: SpanLlmAsJudgeCode;
3285
3364
  }
3286
3365
 
3366
+ /**
3367
+ * This file was auto-generated by Fern from our API Definition.
3368
+ */
3369
+
3370
+ interface AutomationRuleEvaluatorUpdateSpanUserDefinedMetricPython {
3371
+ filters?: SpanFilter[];
3372
+ code?: SpanUserDefinedMetricPythonCode;
3373
+ }
3374
+
3287
3375
  /**
3288
3376
  * This file was auto-generated by Fern from our API Definition.
3289
3377
  */
@@ -5046,7 +5134,7 @@ interface ProviderApiKeyPagePublic {
5046
5134
  /**
5047
5135
  * This file was auto-generated by Fern from our API Definition.
5048
5136
  */
5049
- type ProviderApiKeyPublicProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm";
5137
+ type ProviderApiKeyPublicProvider = "openai" | "anthropic" | "gemini" | "openrouter" | "vertex-ai" | "custom-llm" | "opik-builtin";
5050
5138
  declare const ProviderApiKeyPublicProvider: {
5051
5139
  readonly Openai: "openai";
5052
5140
  readonly Anthropic: "anthropic";
@@ -5054,6 +5142,7 @@ declare const ProviderApiKeyPublicProvider: {
5054
5142
  readonly Openrouter: "openrouter";
5055
5143
  readonly VertexAi: "vertex-ai";
5056
5144
  readonly CustomLlm: "custom-llm";
5145
+ readonly OpikBuiltin: "opik-builtin";
5057
5146
  };
5058
5147
 
5059
5148
  /**
@@ -5074,6 +5163,8 @@ interface ProviderApiKeyPublic {
5074
5163
  createdBy?: string;
5075
5164
  lastUpdatedAt?: Date;
5076
5165
  lastUpdatedBy?: string;
5166
+ /** If true, this provider is system-managed and cannot be edited or deleted */
5167
+ readOnly?: boolean;
5077
5168
  }
5078
5169
 
5079
5170
  /**
@@ -5092,10 +5183,11 @@ interface ManualEvaluationResponse {
5092
5183
  /**
5093
5184
  * Type of entity to evaluate (trace or thread)
5094
5185
  */
5095
- type ManualEvaluationRequestEntityType = "trace" | "thread";
5186
+ type ManualEvaluationRequestEntityType = "trace" | "thread" | "span";
5096
5187
  declare const ManualEvaluationRequestEntityType: {
5097
5188
  readonly Trace: "trace";
5098
5189
  readonly Thread: "thread";
5190
+ readonly Span: "span";
5099
5191
  };
5100
5192
 
5101
5193
  /**
@@ -5690,6 +5782,7 @@ interface ServiceTogglesConfig {
5690
5782
  pythonEvaluatorEnabled: boolean;
5691
5783
  traceThreadPythonEvaluatorEnabled: boolean;
5692
5784
  spanLlmAsJudgeEnabled: boolean;
5785
+ spanUserDefinedMetricPythonEnabled: boolean;
5693
5786
  guardrailsEnabled: boolean;
5694
5787
  opikAiEnabled: boolean;
5695
5788
  alertsEnabled: boolean;
@@ -8225,11 +8318,30 @@ declare namespace ManualEvaluation {
8225
8318
  }
8226
8319
  }
8227
8320
  /**
8228
- * Manual evaluation resources for traces and threads
8321
+ * Manual evaluation resources for traces, threads, and spans
8229
8322
  */
8230
8323
  declare class ManualEvaluation {
8231
8324
  protected readonly _options: ManualEvaluation.Options;
8232
8325
  constructor(_options?: ManualEvaluation.Options);
8326
+ /**
8327
+ * Manually trigger evaluation rules on selected spans. Bypasses sampling and enqueues all specified spans for evaluation.
8328
+ *
8329
+ * @param {OpikApi.ManualEvaluationRequest} request
8330
+ * @param {ManualEvaluation.RequestOptions} requestOptions - Request-specific configuration.
8331
+ *
8332
+ * @throws {@link OpikApi.BadRequestError}
8333
+ * @throws {@link OpikApi.NotFoundError}
8334
+ *
8335
+ * @example
8336
+ * await client.manualEvaluation.evaluateSpans({
8337
+ * projectId: "550e8400-e29b-41d4-a716-446655440000",
8338
+ * entityIds: ["550e8400-e29b-41d4-a716-446655440000", "550e8400-e29b-41d4-a716-446655440001"],
8339
+ * ruleIds: ["660e8400-e29b-41d4-a716-446655440000"],
8340
+ * entityType: "trace"
8341
+ * })
8342
+ */
8343
+ evaluateSpans(request: ManualEvaluationRequest, requestOptions?: ManualEvaluation.RequestOptions): HttpResponsePromise<ManualEvaluationResponse>;
8344
+ private __evaluateSpans;
8233
8345
  /**
8234
8346
  * Manually trigger evaluation rules on selected threads. Bypasses sampling and enqueues all specified threads for evaluation.
8235
8347
  *