@adaline/gateway 0.26.0 → 0.28.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.
package/dist/index.d.mts CHANGED
@@ -62,12 +62,14 @@ interface IsomorphicHttpClientConfig {
62
62
  timeoutInMilliseconds?: number;
63
63
  axiosInstance?: AxiosInstance;
64
64
  telemetryTracer?: Tracer;
65
+ enableProxyAgent?: boolean;
65
66
  }
66
67
  declare class IsomorphicHttpClient implements HttpClient {
67
68
  private defaultTimeout?;
68
69
  private client;
69
70
  private httpProxyAgent?;
70
71
  private httpsProxyAgent?;
72
+ private enableProxyAgent;
71
73
  constructor(config: IsomorphicHttpClientConfig);
72
74
  isNodeEnvironment: () => boolean;
73
75
  private makeRequest;
@@ -2867,6 +2869,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2867
2869
  }>>;
2868
2870
  data: z.ZodAny;
2869
2871
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2872
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2870
2873
  }, "strip", z.ZodTypeAny, {
2871
2874
  headers: Record<string, string>;
2872
2875
  model: ChatModelV1<{
@@ -2916,6 +2919,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2916
2919
  };
2917
2920
  }>;
2918
2921
  data?: any;
2922
+ query?: Record<string, string> | undefined;
2919
2923
  }, {
2920
2924
  headers: Record<string, string>;
2921
2925
  model: ChatModelV1<{
@@ -2965,6 +2969,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2965
2969
  };
2966
2970
  }>;
2967
2971
  data?: any;
2972
+ query?: Record<string, string> | undefined;
2968
2973
  }>;
2969
2974
  type ProxyCompleteChatHandlerRequestType = z.infer<typeof ProxyCompleteChatHandlerRequest>;
2970
2975
  declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
@@ -2983,7 +2988,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
2983
2988
  data?: any;
2984
2989
  }>;
2985
2990
  providerResponse: z.ZodAny;
2986
- transformedResponse: z.ZodObject<{
2991
+ transformedResponse: z.ZodOptional<z.ZodObject<{
2987
2992
  messages: z.ZodArray<z.ZodObject<{
2988
2993
  role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
2989
2994
  content: z.ZodArray<z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -3313,14 +3318,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3313
3318
  bytes: number[] | null;
3314
3319
  }[];
3315
3320
  }[] | undefined;
3316
- }>;
3321
+ }>>;
3317
3322
  }, "strip", z.ZodTypeAny, {
3318
3323
  providerRequest: {
3319
3324
  headers: Record<string, string>;
3320
3325
  url: string;
3321
3326
  data?: any;
3322
3327
  };
3323
- transformedResponse: {
3328
+ request?: any;
3329
+ providerResponse?: any;
3330
+ transformedResponse?: {
3324
3331
  messages: {
3325
3332
  role: "system" | "user" | "assistant" | "tool";
3326
3333
  content: ({
@@ -3371,16 +3378,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3371
3378
  bytes: number[] | null;
3372
3379
  }[];
3373
3380
  }[] | undefined;
3374
- };
3375
- request?: any;
3376
- providerResponse?: any;
3381
+ } | undefined;
3377
3382
  }, {
3378
3383
  providerRequest: {
3379
3384
  headers: Record<string, string>;
3380
3385
  url: string;
3381
3386
  data?: any;
3382
3387
  };
3383
- transformedResponse: {
3388
+ request?: any;
3389
+ providerResponse?: any;
3390
+ transformedResponse?: {
3384
3391
  messages: {
3385
3392
  role: "system" | "user" | "assistant" | "tool";
3386
3393
  content: ({
@@ -3431,9 +3438,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3431
3438
  bytes: number[] | null;
3432
3439
  }[];
3433
3440
  }[] | undefined;
3434
- };
3435
- request?: any;
3436
- providerResponse?: any;
3441
+ } | undefined;
3437
3442
  }>;
3438
3443
  type ProxyCompleteChatHandlerResponseType = z.infer<typeof ProxyCompleteChatHandlerResponse>;
3439
3444
 
@@ -3531,6 +3536,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3531
3536
  }>>;
3532
3537
  data: z.ZodAny;
3533
3538
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3539
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3534
3540
  }, "strip", z.ZodTypeAny, {
3535
3541
  headers: Record<string, string>;
3536
3542
  model: EmbeddingModelV1<{
@@ -3579,6 +3585,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3579
3585
  };
3580
3586
  }>;
3581
3587
  data?: any;
3588
+ query?: Record<string, string> | undefined;
3582
3589
  }, {
3583
3590
  headers: Record<string, string>;
3584
3591
  model: EmbeddingModelV1<{
@@ -3627,6 +3634,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3627
3634
  };
3628
3635
  }>;
3629
3636
  data?: any;
3637
+ query?: Record<string, string> | undefined;
3630
3638
  }>;
3631
3639
  type ProxyGetEmbeddingsHandlerRequestType = z.infer<typeof ProxyGetEmbeddingsHandlerRequest>;
3632
3640
  declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
@@ -3645,7 +3653,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3645
3653
  data?: any;
3646
3654
  }>;
3647
3655
  providerResponse: z.ZodAny;
3648
- transformedResponse: z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3656
+ transformedResponse: z.ZodOptional<z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3649
3657
  encodingFormat: z.ZodLiteral<"float">;
3650
3658
  embeddings: z.ZodArray<z.ZodObject<{
3651
3659
  index: z.ZodNumber;
@@ -3719,14 +3727,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3719
3727
  usage?: {
3720
3728
  totalTokens: number;
3721
3729
  } | undefined;
3722
- }>]>;
3730
+ }>]>>;
3723
3731
  }, "strip", z.ZodTypeAny, {
3724
3732
  providerRequest: {
3725
3733
  headers: Record<string, string>;
3726
3734
  url: string;
3727
3735
  data?: any;
3728
3736
  };
3729
- transformedResponse: {
3737
+ request?: any;
3738
+ providerResponse?: any;
3739
+ transformedResponse?: {
3730
3740
  encodingFormat: "float";
3731
3741
  embeddings: {
3732
3742
  index: number;
@@ -3744,16 +3754,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3744
3754
  usage?: {
3745
3755
  totalTokens: number;
3746
3756
  } | undefined;
3747
- };
3748
- request?: any;
3749
- providerResponse?: any;
3757
+ } | undefined;
3750
3758
  }, {
3751
3759
  providerRequest: {
3752
3760
  headers: Record<string, string>;
3753
3761
  url: string;
3754
3762
  data?: any;
3755
3763
  };
3756
- transformedResponse: {
3764
+ request?: any;
3765
+ providerResponse?: any;
3766
+ transformedResponse?: {
3757
3767
  encodingFormat: "float";
3758
3768
  embeddings: {
3759
3769
  index: number;
@@ -3771,9 +3781,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3771
3781
  usage?: {
3772
3782
  totalTokens: number;
3773
3783
  } | undefined;
3774
- };
3775
- request?: any;
3776
- providerResponse?: any;
3784
+ } | undefined;
3777
3785
  }>;
3778
3786
  type ProxyGetEmbeddingsHandlerResponseType = z.infer<typeof ProxyGetEmbeddingsHandlerResponse>;
3779
3787
 
@@ -3873,6 +3881,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3873
3881
  }>>;
3874
3882
  data: z.ZodAny;
3875
3883
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3884
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3876
3885
  }, "strip", z.ZodTypeAny, {
3877
3886
  headers: Record<string, string>;
3878
3887
  model: ChatModelV1<{
@@ -3922,6 +3931,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3922
3931
  };
3923
3932
  }>;
3924
3933
  data?: any;
3934
+ query?: Record<string, string> | undefined;
3925
3935
  }, {
3926
3936
  headers: Record<string, string>;
3927
3937
  model: ChatModelV1<{
@@ -3971,6 +3981,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3971
3981
  };
3972
3982
  }>;
3973
3983
  data?: any;
3984
+ query?: Record<string, string> | undefined;
3974
3985
  }>;
3975
3986
  type ProxyStreamChatHandlerRequestType = z.infer<typeof ProxyStreamChatHandlerRequest>;
3976
3987
  declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
@@ -3989,7 +4000,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
3989
4000
  data?: any;
3990
4001
  }>;
3991
4002
  providerResponse: z.ZodAny;
3992
- transformedResponse: z.ZodArray<z.ZodObject<{
4003
+ transformedResponse: z.ZodOptional<z.ZodArray<z.ZodObject<{
3993
4004
  partialMessages: z.ZodArray<z.ZodObject<{
3994
4005
  role: z.ZodEnum<["assistant"]>;
3995
4006
  partialContent: z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -4172,14 +4183,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4172
4183
  bytes: number[] | null;
4173
4184
  }[];
4174
4185
  }[] | undefined;
4175
- }>, "many">;
4186
+ }>, "many">>;
4176
4187
  }, "strip", z.ZodTypeAny, {
4177
4188
  providerRequest: {
4178
4189
  headers: Record<string, string>;
4179
4190
  url: string;
4180
4191
  data?: any;
4181
4192
  };
4182
- transformedResponse: {
4193
+ request?: any;
4194
+ providerResponse?: any;
4195
+ transformedResponse?: {
4183
4196
  partialMessages: {
4184
4197
  role: "assistant";
4185
4198
  partialContent: {
@@ -4211,16 +4224,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4211
4224
  bytes: number[] | null;
4212
4225
  }[];
4213
4226
  }[] | undefined;
4214
- }[];
4215
- request?: any;
4216
- providerResponse?: any;
4227
+ }[] | undefined;
4217
4228
  }, {
4218
4229
  providerRequest: {
4219
4230
  headers: Record<string, string>;
4220
4231
  url: string;
4221
4232
  data?: any;
4222
4233
  };
4223
- transformedResponse: {
4234
+ request?: any;
4235
+ providerResponse?: any;
4236
+ transformedResponse?: {
4224
4237
  partialMessages: {
4225
4238
  role: "assistant";
4226
4239
  partialContent: {
@@ -4252,9 +4265,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4252
4265
  bytes: number[] | null;
4253
4266
  }[];
4254
4267
  }[] | undefined;
4255
- }[];
4256
- request?: any;
4257
- providerResponse?: any;
4268
+ }[] | undefined;
4258
4269
  }>;
4259
4270
  type ProxyStreamChatHandlerResponseType = z.infer<typeof ProxyStreamChatHandlerResponse>;
4260
4271
 
@@ -5862,7 +5873,9 @@ declare const GatewayOptions: z.ZodObject<{
5862
5873
  meter?: Meter | undefined;
5863
5874
  }>>;
5864
5875
  analyticsEnabled: z.ZodOptional<z.ZodBoolean>;
5876
+ enableProxyAgent: z.ZodOptional<z.ZodBoolean>;
5865
5877
  }, "strip", z.ZodTypeAny, {
5878
+ enableProxyAgent?: boolean | undefined;
5866
5879
  queueOptions?: {
5867
5880
  timeout?: number | undefined;
5868
5881
  maxConcurrentTasks?: number | undefined;
@@ -6035,6 +6048,7 @@ declare const GatewayOptions: z.ZodObject<{
6035
6048
  } | undefined;
6036
6049
  analyticsEnabled?: boolean | undefined;
6037
6050
  }, {
6051
+ enableProxyAgent?: boolean | undefined;
6038
6052
  queueOptions?: {
6039
6053
  timeout?: number | undefined;
6040
6054
  maxConcurrentTasks?: number | undefined;
@@ -7638,6 +7652,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7638
7652
  }>>;
7639
7653
  data: z.ZodAny;
7640
7654
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7655
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7641
7656
  }, "strip", z.ZodTypeAny, {
7642
7657
  headers: Record<string, string>;
7643
7658
  model: ChatModelV1<{
@@ -7687,6 +7702,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7687
7702
  };
7688
7703
  }>;
7689
7704
  data?: any;
7705
+ query?: Record<string, string> | undefined;
7690
7706
  }, {
7691
7707
  headers: Record<string, string>;
7692
7708
  model: ChatModelV1<{
@@ -7736,6 +7752,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7736
7752
  };
7737
7753
  }>;
7738
7754
  data?: any;
7755
+ query?: Record<string, string> | undefined;
7739
7756
  }>;
7740
7757
  type GatewayProxyCompleteChatRequestType = z.infer<typeof GatewayProxyCompleteChatRequest>;
7741
7758
  declare const GatewayProxyStreamChatRequest: z.ZodObject<{
@@ -7832,6 +7849,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7832
7849
  }>>;
7833
7850
  data: z.ZodAny;
7834
7851
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7852
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7835
7853
  }, "strip", z.ZodTypeAny, {
7836
7854
  headers: Record<string, string>;
7837
7855
  model: ChatModelV1<{
@@ -7881,6 +7899,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7881
7899
  };
7882
7900
  }>;
7883
7901
  data?: any;
7902
+ query?: Record<string, string> | undefined;
7884
7903
  }, {
7885
7904
  headers: Record<string, string>;
7886
7905
  model: ChatModelV1<{
@@ -7930,6 +7949,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7930
7949
  };
7931
7950
  }>;
7932
7951
  data?: any;
7952
+ query?: Record<string, string> | undefined;
7933
7953
  }>;
7934
7954
  type GatewayProxyStreamChatRequestType = z.infer<typeof GatewayProxyStreamChatRequest>;
7935
7955
  declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
@@ -8024,6 +8044,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8024
8044
  }>>;
8025
8045
  data: z.ZodAny;
8026
8046
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
8047
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8027
8048
  }, "strip", z.ZodTypeAny, {
8028
8049
  headers: Record<string, string>;
8029
8050
  model: EmbeddingModelV1<{
@@ -8072,6 +8093,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8072
8093
  };
8073
8094
  }>;
8074
8095
  data?: any;
8096
+ query?: Record<string, string> | undefined;
8075
8097
  }, {
8076
8098
  headers: Record<string, string>;
8077
8099
  model: EmbeddingModelV1<{
@@ -8120,6 +8142,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8120
8142
  };
8121
8143
  }>;
8122
8144
  data?: any;
8145
+ query?: Record<string, string> | undefined;
8123
8146
  }>;
8124
8147
  type GatewayProxyGetEmbeddingsRequestType = z.infer<typeof GatewayProxyGetEmbeddingsRequest>;
8125
8148
 
package/dist/index.d.ts CHANGED
@@ -62,12 +62,14 @@ interface IsomorphicHttpClientConfig {
62
62
  timeoutInMilliseconds?: number;
63
63
  axiosInstance?: AxiosInstance;
64
64
  telemetryTracer?: Tracer;
65
+ enableProxyAgent?: boolean;
65
66
  }
66
67
  declare class IsomorphicHttpClient implements HttpClient {
67
68
  private defaultTimeout?;
68
69
  private client;
69
70
  private httpProxyAgent?;
70
71
  private httpsProxyAgent?;
72
+ private enableProxyAgent;
71
73
  constructor(config: IsomorphicHttpClientConfig);
72
74
  isNodeEnvironment: () => boolean;
73
75
  private makeRequest;
@@ -2867,6 +2869,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2867
2869
  }>>;
2868
2870
  data: z.ZodAny;
2869
2871
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2872
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2870
2873
  }, "strip", z.ZodTypeAny, {
2871
2874
  headers: Record<string, string>;
2872
2875
  model: ChatModelV1<{
@@ -2916,6 +2919,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2916
2919
  };
2917
2920
  }>;
2918
2921
  data?: any;
2922
+ query?: Record<string, string> | undefined;
2919
2923
  }, {
2920
2924
  headers: Record<string, string>;
2921
2925
  model: ChatModelV1<{
@@ -2965,6 +2969,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2965
2969
  };
2966
2970
  }>;
2967
2971
  data?: any;
2972
+ query?: Record<string, string> | undefined;
2968
2973
  }>;
2969
2974
  type ProxyCompleteChatHandlerRequestType = z.infer<typeof ProxyCompleteChatHandlerRequest>;
2970
2975
  declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
@@ -2983,7 +2988,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
2983
2988
  data?: any;
2984
2989
  }>;
2985
2990
  providerResponse: z.ZodAny;
2986
- transformedResponse: z.ZodObject<{
2991
+ transformedResponse: z.ZodOptional<z.ZodObject<{
2987
2992
  messages: z.ZodArray<z.ZodObject<{
2988
2993
  role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
2989
2994
  content: z.ZodArray<z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -3313,14 +3318,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3313
3318
  bytes: number[] | null;
3314
3319
  }[];
3315
3320
  }[] | undefined;
3316
- }>;
3321
+ }>>;
3317
3322
  }, "strip", z.ZodTypeAny, {
3318
3323
  providerRequest: {
3319
3324
  headers: Record<string, string>;
3320
3325
  url: string;
3321
3326
  data?: any;
3322
3327
  };
3323
- transformedResponse: {
3328
+ request?: any;
3329
+ providerResponse?: any;
3330
+ transformedResponse?: {
3324
3331
  messages: {
3325
3332
  role: "system" | "user" | "assistant" | "tool";
3326
3333
  content: ({
@@ -3371,16 +3378,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3371
3378
  bytes: number[] | null;
3372
3379
  }[];
3373
3380
  }[] | undefined;
3374
- };
3375
- request?: any;
3376
- providerResponse?: any;
3381
+ } | undefined;
3377
3382
  }, {
3378
3383
  providerRequest: {
3379
3384
  headers: Record<string, string>;
3380
3385
  url: string;
3381
3386
  data?: any;
3382
3387
  };
3383
- transformedResponse: {
3388
+ request?: any;
3389
+ providerResponse?: any;
3390
+ transformedResponse?: {
3384
3391
  messages: {
3385
3392
  role: "system" | "user" | "assistant" | "tool";
3386
3393
  content: ({
@@ -3431,9 +3438,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3431
3438
  bytes: number[] | null;
3432
3439
  }[];
3433
3440
  }[] | undefined;
3434
- };
3435
- request?: any;
3436
- providerResponse?: any;
3441
+ } | undefined;
3437
3442
  }>;
3438
3443
  type ProxyCompleteChatHandlerResponseType = z.infer<typeof ProxyCompleteChatHandlerResponse>;
3439
3444
 
@@ -3531,6 +3536,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3531
3536
  }>>;
3532
3537
  data: z.ZodAny;
3533
3538
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3539
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3534
3540
  }, "strip", z.ZodTypeAny, {
3535
3541
  headers: Record<string, string>;
3536
3542
  model: EmbeddingModelV1<{
@@ -3579,6 +3585,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3579
3585
  };
3580
3586
  }>;
3581
3587
  data?: any;
3588
+ query?: Record<string, string> | undefined;
3582
3589
  }, {
3583
3590
  headers: Record<string, string>;
3584
3591
  model: EmbeddingModelV1<{
@@ -3627,6 +3634,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3627
3634
  };
3628
3635
  }>;
3629
3636
  data?: any;
3637
+ query?: Record<string, string> | undefined;
3630
3638
  }>;
3631
3639
  type ProxyGetEmbeddingsHandlerRequestType = z.infer<typeof ProxyGetEmbeddingsHandlerRequest>;
3632
3640
  declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
@@ -3645,7 +3653,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3645
3653
  data?: any;
3646
3654
  }>;
3647
3655
  providerResponse: z.ZodAny;
3648
- transformedResponse: z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3656
+ transformedResponse: z.ZodOptional<z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3649
3657
  encodingFormat: z.ZodLiteral<"float">;
3650
3658
  embeddings: z.ZodArray<z.ZodObject<{
3651
3659
  index: z.ZodNumber;
@@ -3719,14 +3727,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3719
3727
  usage?: {
3720
3728
  totalTokens: number;
3721
3729
  } | undefined;
3722
- }>]>;
3730
+ }>]>>;
3723
3731
  }, "strip", z.ZodTypeAny, {
3724
3732
  providerRequest: {
3725
3733
  headers: Record<string, string>;
3726
3734
  url: string;
3727
3735
  data?: any;
3728
3736
  };
3729
- transformedResponse: {
3737
+ request?: any;
3738
+ providerResponse?: any;
3739
+ transformedResponse?: {
3730
3740
  encodingFormat: "float";
3731
3741
  embeddings: {
3732
3742
  index: number;
@@ -3744,16 +3754,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3744
3754
  usage?: {
3745
3755
  totalTokens: number;
3746
3756
  } | undefined;
3747
- };
3748
- request?: any;
3749
- providerResponse?: any;
3757
+ } | undefined;
3750
3758
  }, {
3751
3759
  providerRequest: {
3752
3760
  headers: Record<string, string>;
3753
3761
  url: string;
3754
3762
  data?: any;
3755
3763
  };
3756
- transformedResponse: {
3764
+ request?: any;
3765
+ providerResponse?: any;
3766
+ transformedResponse?: {
3757
3767
  encodingFormat: "float";
3758
3768
  embeddings: {
3759
3769
  index: number;
@@ -3771,9 +3781,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3771
3781
  usage?: {
3772
3782
  totalTokens: number;
3773
3783
  } | undefined;
3774
- };
3775
- request?: any;
3776
- providerResponse?: any;
3784
+ } | undefined;
3777
3785
  }>;
3778
3786
  type ProxyGetEmbeddingsHandlerResponseType = z.infer<typeof ProxyGetEmbeddingsHandlerResponse>;
3779
3787
 
@@ -3873,6 +3881,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3873
3881
  }>>;
3874
3882
  data: z.ZodAny;
3875
3883
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3884
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3876
3885
  }, "strip", z.ZodTypeAny, {
3877
3886
  headers: Record<string, string>;
3878
3887
  model: ChatModelV1<{
@@ -3922,6 +3931,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3922
3931
  };
3923
3932
  }>;
3924
3933
  data?: any;
3934
+ query?: Record<string, string> | undefined;
3925
3935
  }, {
3926
3936
  headers: Record<string, string>;
3927
3937
  model: ChatModelV1<{
@@ -3971,6 +3981,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3971
3981
  };
3972
3982
  }>;
3973
3983
  data?: any;
3984
+ query?: Record<string, string> | undefined;
3974
3985
  }>;
3975
3986
  type ProxyStreamChatHandlerRequestType = z.infer<typeof ProxyStreamChatHandlerRequest>;
3976
3987
  declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
@@ -3989,7 +4000,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
3989
4000
  data?: any;
3990
4001
  }>;
3991
4002
  providerResponse: z.ZodAny;
3992
- transformedResponse: z.ZodArray<z.ZodObject<{
4003
+ transformedResponse: z.ZodOptional<z.ZodArray<z.ZodObject<{
3993
4004
  partialMessages: z.ZodArray<z.ZodObject<{
3994
4005
  role: z.ZodEnum<["assistant"]>;
3995
4006
  partialContent: z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -4172,14 +4183,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4172
4183
  bytes: number[] | null;
4173
4184
  }[];
4174
4185
  }[] | undefined;
4175
- }>, "many">;
4186
+ }>, "many">>;
4176
4187
  }, "strip", z.ZodTypeAny, {
4177
4188
  providerRequest: {
4178
4189
  headers: Record<string, string>;
4179
4190
  url: string;
4180
4191
  data?: any;
4181
4192
  };
4182
- transformedResponse: {
4193
+ request?: any;
4194
+ providerResponse?: any;
4195
+ transformedResponse?: {
4183
4196
  partialMessages: {
4184
4197
  role: "assistant";
4185
4198
  partialContent: {
@@ -4211,16 +4224,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4211
4224
  bytes: number[] | null;
4212
4225
  }[];
4213
4226
  }[] | undefined;
4214
- }[];
4215
- request?: any;
4216
- providerResponse?: any;
4227
+ }[] | undefined;
4217
4228
  }, {
4218
4229
  providerRequest: {
4219
4230
  headers: Record<string, string>;
4220
4231
  url: string;
4221
4232
  data?: any;
4222
4233
  };
4223
- transformedResponse: {
4234
+ request?: any;
4235
+ providerResponse?: any;
4236
+ transformedResponse?: {
4224
4237
  partialMessages: {
4225
4238
  role: "assistant";
4226
4239
  partialContent: {
@@ -4252,9 +4265,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4252
4265
  bytes: number[] | null;
4253
4266
  }[];
4254
4267
  }[] | undefined;
4255
- }[];
4256
- request?: any;
4257
- providerResponse?: any;
4268
+ }[] | undefined;
4258
4269
  }>;
4259
4270
  type ProxyStreamChatHandlerResponseType = z.infer<typeof ProxyStreamChatHandlerResponse>;
4260
4271
 
@@ -5862,7 +5873,9 @@ declare const GatewayOptions: z.ZodObject<{
5862
5873
  meter?: Meter | undefined;
5863
5874
  }>>;
5864
5875
  analyticsEnabled: z.ZodOptional<z.ZodBoolean>;
5876
+ enableProxyAgent: z.ZodOptional<z.ZodBoolean>;
5865
5877
  }, "strip", z.ZodTypeAny, {
5878
+ enableProxyAgent?: boolean | undefined;
5866
5879
  queueOptions?: {
5867
5880
  timeout?: number | undefined;
5868
5881
  maxConcurrentTasks?: number | undefined;
@@ -6035,6 +6048,7 @@ declare const GatewayOptions: z.ZodObject<{
6035
6048
  } | undefined;
6036
6049
  analyticsEnabled?: boolean | undefined;
6037
6050
  }, {
6051
+ enableProxyAgent?: boolean | undefined;
6038
6052
  queueOptions?: {
6039
6053
  timeout?: number | undefined;
6040
6054
  maxConcurrentTasks?: number | undefined;
@@ -7638,6 +7652,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7638
7652
  }>>;
7639
7653
  data: z.ZodAny;
7640
7654
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7655
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7641
7656
  }, "strip", z.ZodTypeAny, {
7642
7657
  headers: Record<string, string>;
7643
7658
  model: ChatModelV1<{
@@ -7687,6 +7702,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7687
7702
  };
7688
7703
  }>;
7689
7704
  data?: any;
7705
+ query?: Record<string, string> | undefined;
7690
7706
  }, {
7691
7707
  headers: Record<string, string>;
7692
7708
  model: ChatModelV1<{
@@ -7736,6 +7752,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7736
7752
  };
7737
7753
  }>;
7738
7754
  data?: any;
7755
+ query?: Record<string, string> | undefined;
7739
7756
  }>;
7740
7757
  type GatewayProxyCompleteChatRequestType = z.infer<typeof GatewayProxyCompleteChatRequest>;
7741
7758
  declare const GatewayProxyStreamChatRequest: z.ZodObject<{
@@ -7832,6 +7849,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7832
7849
  }>>;
7833
7850
  data: z.ZodAny;
7834
7851
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7852
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7835
7853
  }, "strip", z.ZodTypeAny, {
7836
7854
  headers: Record<string, string>;
7837
7855
  model: ChatModelV1<{
@@ -7881,6 +7899,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7881
7899
  };
7882
7900
  }>;
7883
7901
  data?: any;
7902
+ query?: Record<string, string> | undefined;
7884
7903
  }, {
7885
7904
  headers: Record<string, string>;
7886
7905
  model: ChatModelV1<{
@@ -7930,6 +7949,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7930
7949
  };
7931
7950
  }>;
7932
7951
  data?: any;
7952
+ query?: Record<string, string> | undefined;
7933
7953
  }>;
7934
7954
  type GatewayProxyStreamChatRequestType = z.infer<typeof GatewayProxyStreamChatRequest>;
7935
7955
  declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
@@ -8024,6 +8044,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8024
8044
  }>>;
8025
8045
  data: z.ZodAny;
8026
8046
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
8047
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8027
8048
  }, "strip", z.ZodTypeAny, {
8028
8049
  headers: Record<string, string>;
8029
8050
  model: EmbeddingModelV1<{
@@ -8072,6 +8093,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8072
8093
  };
8073
8094
  }>;
8074
8095
  data?: any;
8096
+ query?: Record<string, string> | undefined;
8075
8097
  }, {
8076
8098
  headers: Record<string, string>;
8077
8099
  model: EmbeddingModelV1<{
@@ -8120,6 +8142,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8120
8142
  };
8121
8143
  }>;
8122
8144
  data?: any;
8145
+ query?: Record<string, string> | undefined;
8123
8146
  }>;
8124
8147
  type GatewayProxyGetEmbeddingsRequestType = z.infer<typeof GatewayProxyGetEmbeddingsRequest>;
8125
8148