@adaline/gateway 0.27.0 → 0.29.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
@@ -2869,6 +2869,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2869
2869
  }>>;
2870
2870
  data: z.ZodAny;
2871
2871
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2872
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2872
2873
  }, "strip", z.ZodTypeAny, {
2873
2874
  headers: Record<string, string>;
2874
2875
  model: ChatModelV1<{
@@ -2918,6 +2919,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2918
2919
  };
2919
2920
  }>;
2920
2921
  data?: any;
2922
+ query?: Record<string, string> | undefined;
2921
2923
  }, {
2922
2924
  headers: Record<string, string>;
2923
2925
  model: ChatModelV1<{
@@ -2967,6 +2969,7 @@ declare const ProxyCompleteChatHandlerRequest: z.ZodObject<{
2967
2969
  };
2968
2970
  }>;
2969
2971
  data?: any;
2972
+ query?: Record<string, string> | undefined;
2970
2973
  }>;
2971
2974
  type ProxyCompleteChatHandlerRequestType = z.infer<typeof ProxyCompleteChatHandlerRequest>;
2972
2975
  declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
@@ -2985,7 +2988,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
2985
2988
  data?: any;
2986
2989
  }>;
2987
2990
  providerResponse: z.ZodAny;
2988
- transformedResponse: z.ZodObject<{
2991
+ transformedResponse: z.ZodOptional<z.ZodObject<{
2989
2992
  messages: z.ZodArray<z.ZodObject<{
2990
2993
  role: z.ZodEnum<["system", "user", "assistant", "tool"]>;
2991
2994
  content: z.ZodArray<z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -3315,14 +3318,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3315
3318
  bytes: number[] | null;
3316
3319
  }[];
3317
3320
  }[] | undefined;
3318
- }>;
3321
+ }>>;
3319
3322
  }, "strip", z.ZodTypeAny, {
3320
3323
  providerRequest: {
3321
3324
  headers: Record<string, string>;
3322
3325
  url: string;
3323
3326
  data?: any;
3324
3327
  };
3325
- transformedResponse: {
3328
+ request?: any;
3329
+ providerResponse?: any;
3330
+ transformedResponse?: {
3326
3331
  messages: {
3327
3332
  role: "system" | "user" | "assistant" | "tool";
3328
3333
  content: ({
@@ -3373,16 +3378,16 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3373
3378
  bytes: number[] | null;
3374
3379
  }[];
3375
3380
  }[] | undefined;
3376
- };
3377
- request?: any;
3378
- providerResponse?: any;
3381
+ } | undefined;
3379
3382
  }, {
3380
3383
  providerRequest: {
3381
3384
  headers: Record<string, string>;
3382
3385
  url: string;
3383
3386
  data?: any;
3384
3387
  };
3385
- transformedResponse: {
3388
+ request?: any;
3389
+ providerResponse?: any;
3390
+ transformedResponse?: {
3386
3391
  messages: {
3387
3392
  role: "system" | "user" | "assistant" | "tool";
3388
3393
  content: ({
@@ -3433,9 +3438,7 @@ declare const ProxyCompleteChatHandlerResponse: z.ZodObject<{
3433
3438
  bytes: number[] | null;
3434
3439
  }[];
3435
3440
  }[] | undefined;
3436
- };
3437
- request?: any;
3438
- providerResponse?: any;
3441
+ } | undefined;
3439
3442
  }>;
3440
3443
  type ProxyCompleteChatHandlerResponseType = z.infer<typeof ProxyCompleteChatHandlerResponse>;
3441
3444
 
@@ -3533,6 +3536,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3533
3536
  }>>;
3534
3537
  data: z.ZodAny;
3535
3538
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3539
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3536
3540
  }, "strip", z.ZodTypeAny, {
3537
3541
  headers: Record<string, string>;
3538
3542
  model: EmbeddingModelV1<{
@@ -3581,6 +3585,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3581
3585
  };
3582
3586
  }>;
3583
3587
  data?: any;
3588
+ query?: Record<string, string> | undefined;
3584
3589
  }, {
3585
3590
  headers: Record<string, string>;
3586
3591
  model: EmbeddingModelV1<{
@@ -3629,6 +3634,7 @@ declare const ProxyGetEmbeddingsHandlerRequest: z.ZodObject<{
3629
3634
  };
3630
3635
  }>;
3631
3636
  data?: any;
3637
+ query?: Record<string, string> | undefined;
3632
3638
  }>;
3633
3639
  type ProxyGetEmbeddingsHandlerRequestType = z.infer<typeof ProxyGetEmbeddingsHandlerRequest>;
3634
3640
  declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
@@ -3647,7 +3653,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3647
3653
  data?: any;
3648
3654
  }>;
3649
3655
  providerResponse: z.ZodAny;
3650
- transformedResponse: z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3656
+ transformedResponse: z.ZodOptional<z.ZodDiscriminatedUnion<"encodingFormat", [z.ZodObject<{
3651
3657
  encodingFormat: z.ZodLiteral<"float">;
3652
3658
  embeddings: z.ZodArray<z.ZodObject<{
3653
3659
  index: z.ZodNumber;
@@ -3721,14 +3727,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3721
3727
  usage?: {
3722
3728
  totalTokens: number;
3723
3729
  } | undefined;
3724
- }>]>;
3730
+ }>]>>;
3725
3731
  }, "strip", z.ZodTypeAny, {
3726
3732
  providerRequest: {
3727
3733
  headers: Record<string, string>;
3728
3734
  url: string;
3729
3735
  data?: any;
3730
3736
  };
3731
- transformedResponse: {
3737
+ request?: any;
3738
+ providerResponse?: any;
3739
+ transformedResponse?: {
3732
3740
  encodingFormat: "float";
3733
3741
  embeddings: {
3734
3742
  index: number;
@@ -3746,16 +3754,16 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3746
3754
  usage?: {
3747
3755
  totalTokens: number;
3748
3756
  } | undefined;
3749
- };
3750
- request?: any;
3751
- providerResponse?: any;
3757
+ } | undefined;
3752
3758
  }, {
3753
3759
  providerRequest: {
3754
3760
  headers: Record<string, string>;
3755
3761
  url: string;
3756
3762
  data?: any;
3757
3763
  };
3758
- transformedResponse: {
3764
+ request?: any;
3765
+ providerResponse?: any;
3766
+ transformedResponse?: {
3759
3767
  encodingFormat: "float";
3760
3768
  embeddings: {
3761
3769
  index: number;
@@ -3773,9 +3781,7 @@ declare const ProxyGetEmbeddingsHandlerResponse: z.ZodObject<{
3773
3781
  usage?: {
3774
3782
  totalTokens: number;
3775
3783
  } | undefined;
3776
- };
3777
- request?: any;
3778
- providerResponse?: any;
3784
+ } | undefined;
3779
3785
  }>;
3780
3786
  type ProxyGetEmbeddingsHandlerResponseType = z.infer<typeof ProxyGetEmbeddingsHandlerResponse>;
3781
3787
 
@@ -3875,6 +3881,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3875
3881
  }>>;
3876
3882
  data: z.ZodAny;
3877
3883
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
3884
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3878
3885
  }, "strip", z.ZodTypeAny, {
3879
3886
  headers: Record<string, string>;
3880
3887
  model: ChatModelV1<{
@@ -3924,6 +3931,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3924
3931
  };
3925
3932
  }>;
3926
3933
  data?: any;
3934
+ query?: Record<string, string> | undefined;
3927
3935
  }, {
3928
3936
  headers: Record<string, string>;
3929
3937
  model: ChatModelV1<{
@@ -3973,6 +3981,7 @@ declare const ProxyStreamChatHandlerRequest: z.ZodObject<{
3973
3981
  };
3974
3982
  }>;
3975
3983
  data?: any;
3984
+ query?: Record<string, string> | undefined;
3976
3985
  }>;
3977
3986
  type ProxyStreamChatHandlerRequestType = z.infer<typeof ProxyStreamChatHandlerRequest>;
3978
3987
  declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
@@ -3991,7 +4000,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
3991
4000
  data?: any;
3992
4001
  }>;
3993
4002
  providerResponse: z.ZodAny;
3994
- transformedResponse: z.ZodArray<z.ZodObject<{
4003
+ transformedResponse: z.ZodOptional<z.ZodArray<z.ZodObject<{
3995
4004
  partialMessages: z.ZodArray<z.ZodObject<{
3996
4005
  role: z.ZodEnum<["assistant"]>;
3997
4006
  partialContent: z.ZodDiscriminatedUnion<"modality", [z.ZodObject<{
@@ -4174,14 +4183,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4174
4183
  bytes: number[] | null;
4175
4184
  }[];
4176
4185
  }[] | undefined;
4177
- }>, "many">;
4186
+ }>, "many">>;
4178
4187
  }, "strip", z.ZodTypeAny, {
4179
4188
  providerRequest: {
4180
4189
  headers: Record<string, string>;
4181
4190
  url: string;
4182
4191
  data?: any;
4183
4192
  };
4184
- transformedResponse: {
4193
+ request?: any;
4194
+ providerResponse?: any;
4195
+ transformedResponse?: {
4185
4196
  partialMessages: {
4186
4197
  role: "assistant";
4187
4198
  partialContent: {
@@ -4213,16 +4224,16 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4213
4224
  bytes: number[] | null;
4214
4225
  }[];
4215
4226
  }[] | undefined;
4216
- }[];
4217
- request?: any;
4218
- providerResponse?: any;
4227
+ }[] | undefined;
4219
4228
  }, {
4220
4229
  providerRequest: {
4221
4230
  headers: Record<string, string>;
4222
4231
  url: string;
4223
4232
  data?: any;
4224
4233
  };
4225
- transformedResponse: {
4234
+ request?: any;
4235
+ providerResponse?: any;
4236
+ transformedResponse?: {
4226
4237
  partialMessages: {
4227
4238
  role: "assistant";
4228
4239
  partialContent: {
@@ -4254,9 +4265,7 @@ declare const ProxyStreamChatHandlerResponse: z.ZodObject<{
4254
4265
  bytes: number[] | null;
4255
4266
  }[];
4256
4267
  }[] | undefined;
4257
- }[];
4258
- request?: any;
4259
- providerResponse?: any;
4268
+ }[] | undefined;
4260
4269
  }>;
4261
4270
  type ProxyStreamChatHandlerResponseType = z.infer<typeof ProxyStreamChatHandlerResponse>;
4262
4271
 
@@ -4594,6 +4603,7 @@ declare const StreamChatHandlerRequest: z.ZodObject<{
4594
4603
  customHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4595
4604
  callbacks: z.ZodOptional<z.ZodArray<z.ZodType<StreamChatCallbackType<any>, z.ZodTypeDef, StreamChatCallbackType<any>>, "atleastone">>;
4596
4605
  metadataForCallbacks: z.ZodOptional<z.ZodAny>;
4606
+ abortSignal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
4597
4607
  }, "strip", z.ZodTypeAny, {
4598
4608
  config: Record<string, any>;
4599
4609
  model: ChatModelV1<{
@@ -4692,6 +4702,7 @@ declare const StreamChatHandlerRequest: z.ZodObject<{
4692
4702
  customHeaders?: Record<string, string> | undefined;
4693
4703
  metadataForCallbacks?: any;
4694
4704
  callbacks?: [StreamChatCallbackType<any>, ...StreamChatCallbackType<any>[]] | undefined;
4705
+ abortSignal?: AbortSignal | undefined;
4695
4706
  }, {
4696
4707
  config: Record<string, any>;
4697
4708
  model: ChatModelV1<{
@@ -4790,6 +4801,7 @@ declare const StreamChatHandlerRequest: z.ZodObject<{
4790
4801
  customHeaders?: Record<string, string> | undefined;
4791
4802
  metadataForCallbacks?: any;
4792
4803
  callbacks?: [StreamChatCallbackType<any>, ...StreamChatCallbackType<any>[]] | undefined;
4804
+ abortSignal?: AbortSignal | undefined;
4793
4805
  }>;
4794
4806
  type StreamChatHandlerRequestType = z.infer<typeof StreamChatHandlerRequest>;
4795
4807
  declare const StreamChatHandlerResponse: z.ZodObject<{
@@ -7096,6 +7108,7 @@ declare const GatewayStreamChatRequest: z.ZodObject<{
7096
7108
  customHeaders?: Record<string, string> | undefined;
7097
7109
  metadataForCallbacks?: any;
7098
7110
  }>>;
7111
+ abortSignal: z.ZodOptional<z.ZodType<AbortSignal, z.ZodTypeDef, AbortSignal>>;
7099
7112
  }, "strip", z.ZodTypeAny, {
7100
7113
  config: Record<string, any>;
7101
7114
  model: ChatModelV1<{
@@ -7195,6 +7208,7 @@ declare const GatewayStreamChatRequest: z.ZodObject<{
7195
7208
  };
7196
7209
  metadata?: any;
7197
7210
  }[] | undefined;
7211
+ abortSignal?: AbortSignal | undefined;
7198
7212
  }, {
7199
7213
  config: Record<string, any>;
7200
7214
  model: ChatModelV1<{
@@ -7294,6 +7308,7 @@ declare const GatewayStreamChatRequest: z.ZodObject<{
7294
7308
  };
7295
7309
  metadata?: any;
7296
7310
  }[] | undefined;
7311
+ abortSignal?: AbortSignal | undefined;
7297
7312
  }>;
7298
7313
  type GatewayStreamChatRequestType = z.infer<typeof GatewayStreamChatRequest>;
7299
7314
  declare const GatewayGetEmbeddingsRequest: z.ZodObject<{
@@ -7643,6 +7658,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7643
7658
  }>>;
7644
7659
  data: z.ZodAny;
7645
7660
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7661
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7646
7662
  }, "strip", z.ZodTypeAny, {
7647
7663
  headers: Record<string, string>;
7648
7664
  model: ChatModelV1<{
@@ -7692,6 +7708,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7692
7708
  };
7693
7709
  }>;
7694
7710
  data?: any;
7711
+ query?: Record<string, string> | undefined;
7695
7712
  }, {
7696
7713
  headers: Record<string, string>;
7697
7714
  model: ChatModelV1<{
@@ -7741,6 +7758,7 @@ declare const GatewayProxyCompleteChatRequest: z.ZodObject<{
7741
7758
  };
7742
7759
  }>;
7743
7760
  data?: any;
7761
+ query?: Record<string, string> | undefined;
7744
7762
  }>;
7745
7763
  type GatewayProxyCompleteChatRequestType = z.infer<typeof GatewayProxyCompleteChatRequest>;
7746
7764
  declare const GatewayProxyStreamChatRequest: z.ZodObject<{
@@ -7837,6 +7855,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7837
7855
  }>>;
7838
7856
  data: z.ZodAny;
7839
7857
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
7858
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
7840
7859
  }, "strip", z.ZodTypeAny, {
7841
7860
  headers: Record<string, string>;
7842
7861
  model: ChatModelV1<{
@@ -7886,6 +7905,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7886
7905
  };
7887
7906
  }>;
7888
7907
  data?: any;
7908
+ query?: Record<string, string> | undefined;
7889
7909
  }, {
7890
7910
  headers: Record<string, string>;
7891
7911
  model: ChatModelV1<{
@@ -7935,6 +7955,7 @@ declare const GatewayProxyStreamChatRequest: z.ZodObject<{
7935
7955
  };
7936
7956
  }>;
7937
7957
  data?: any;
7958
+ query?: Record<string, string> | undefined;
7938
7959
  }>;
7939
7960
  type GatewayProxyStreamChatRequestType = z.infer<typeof GatewayProxyStreamChatRequest>;
7940
7961
  declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
@@ -8029,6 +8050,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8029
8050
  }>>;
8030
8051
  data: z.ZodAny;
8031
8052
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
8053
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
8032
8054
  }, "strip", z.ZodTypeAny, {
8033
8055
  headers: Record<string, string>;
8034
8056
  model: EmbeddingModelV1<{
@@ -8077,6 +8099,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8077
8099
  };
8078
8100
  }>;
8079
8101
  data?: any;
8102
+ query?: Record<string, string> | undefined;
8080
8103
  }, {
8081
8104
  headers: Record<string, string>;
8082
8105
  model: EmbeddingModelV1<{
@@ -8125,6 +8148,7 @@ declare const GatewayProxyGetEmbeddingsRequest: z.ZodObject<{
8125
8148
  };
8126
8149
  }>;
8127
8150
  data?: any;
8151
+ query?: Record<string, string> | undefined;
8128
8152
  }>;
8129
8153
  type GatewayProxyGetEmbeddingsRequestType = z.infer<typeof GatewayProxyGetEmbeddingsRequest>;
8130
8154