@ai-sdk/cohere 3.0.71 → 3.0.73
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/CHANGELOG.md +16 -0
- package/dist/index.d.mts +15 -27
- package/dist/index.d.ts +15 -27
- package/dist/index.js +278 -243
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +265 -216
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cohere-chat-language-model.ts +166 -154
- package/src/cohere-chat-options.ts +39 -26
- package/src/cohere-embedding-model.ts +15 -9
- package/src/cohere-embedding-options.ts +54 -40
- package/src/cohere-error.ts +14 -5
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
|
|
12
12
|
// src/cohere-chat-language-model.ts
|
|
13
13
|
import {
|
|
14
|
+
lazySchema as lazySchema3,
|
|
15
|
+
zodSchema as zodSchema3,
|
|
14
16
|
combineHeaders,
|
|
15
17
|
createEventSourceResponseHandler,
|
|
16
18
|
createJsonResponseHandler,
|
|
@@ -21,36 +23,56 @@ import {
|
|
|
21
23
|
import { z as z3 } from "zod/v4";
|
|
22
24
|
|
|
23
25
|
// src/cohere-chat-options.ts
|
|
26
|
+
import {
|
|
27
|
+
lazySchema,
|
|
28
|
+
zodSchema
|
|
29
|
+
} from "@ai-sdk/provider-utils";
|
|
24
30
|
import { z } from "zod/v4";
|
|
25
|
-
var cohereLanguageModelOptions =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
var cohereLanguageModelOptions = lazySchema(
|
|
32
|
+
() => zodSchema(
|
|
33
|
+
z.object({
|
|
34
|
+
/**
|
|
35
|
+
* Configuration for reasoning features (optional)
|
|
36
|
+
*
|
|
37
|
+
* Can be set to an object with the two properties `type` and `tokenBudget`. `type` can be set to `'enabled'` or `'disabled'` (defaults to `'enabled'`).
|
|
38
|
+
* `tokenBudget` is the maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response
|
|
39
|
+
*
|
|
40
|
+
* @see https://docs.cohere.com/reference/chat#request.body.thinking
|
|
41
|
+
*/
|
|
42
|
+
thinking: z.object({
|
|
43
|
+
type: z.enum(["enabled", "disabled"]).optional(),
|
|
44
|
+
tokenBudget: z.number().optional()
|
|
45
|
+
}).optional()
|
|
46
|
+
})
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
var cohereImagePartProviderOptions = lazySchema(
|
|
50
|
+
() => zodSchema(
|
|
51
|
+
z.object({
|
|
52
|
+
/**
|
|
53
|
+
* Image fidelity level passed through as `image_url.detail` on the Cohere chat API.
|
|
54
|
+
*
|
|
55
|
+
* @see https://docs.cohere.com/docs/image-inputs
|
|
56
|
+
*/
|
|
57
|
+
detail: z.enum(["auto", "low", "high"]).optional()
|
|
58
|
+
})
|
|
59
|
+
)
|
|
60
|
+
);
|
|
47
61
|
|
|
48
62
|
// src/cohere-error.ts
|
|
49
|
-
import {
|
|
63
|
+
import {
|
|
64
|
+
lazySchema as lazySchema2,
|
|
65
|
+
zodSchema as zodSchema2,
|
|
66
|
+
createJsonErrorResponseHandler
|
|
67
|
+
} from "@ai-sdk/provider-utils";
|
|
50
68
|
import { z as z2 } from "zod/v4";
|
|
51
|
-
var cohereErrorDataSchema =
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
var cohereErrorDataSchema = lazySchema2(
|
|
70
|
+
() => zodSchema2(
|
|
71
|
+
z2.object({
|
|
72
|
+
message: z2.string()
|
|
73
|
+
})
|
|
74
|
+
)
|
|
75
|
+
);
|
|
54
76
|
var cohereFailedResponseHandler = createJsonErrorResponseHandler({
|
|
55
77
|
errorSchema: cohereErrorDataSchema,
|
|
56
78
|
errorToMessage: (data) => data.message
|
|
@@ -655,7 +677,7 @@ var CohereChatLanguageModel = class {
|
|
|
655
677
|
};
|
|
656
678
|
}
|
|
657
679
|
};
|
|
658
|
-
var cohereUsageSchema = z3.looseObject({
|
|
680
|
+
var cohereUsageSchema = () => z3.looseObject({
|
|
659
681
|
billed_units: z3.looseObject({
|
|
660
682
|
input_tokens: z3.number(),
|
|
661
683
|
output_tokens: z3.number()
|
|
@@ -666,161 +688,171 @@ var cohereUsageSchema = z3.looseObject({
|
|
|
666
688
|
}),
|
|
667
689
|
cached_tokens: z3.number().nullish()
|
|
668
690
|
});
|
|
669
|
-
var cohereChatResponseSchema =
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
content: z3.array(
|
|
674
|
-
z3.union([
|
|
675
|
-
z3.object({
|
|
676
|
-
type: z3.literal("text"),
|
|
677
|
-
text: z3.string()
|
|
678
|
-
}),
|
|
679
|
-
z3.object({
|
|
680
|
-
type: z3.literal("thinking"),
|
|
681
|
-
thinking: z3.string()
|
|
682
|
-
})
|
|
683
|
-
])
|
|
684
|
-
).nullish(),
|
|
685
|
-
tool_plan: z3.string().nullish(),
|
|
686
|
-
tool_calls: z3.array(
|
|
687
|
-
z3.object({
|
|
688
|
-
id: z3.string(),
|
|
689
|
-
type: z3.literal("function"),
|
|
690
|
-
function: z3.object({
|
|
691
|
-
name: z3.string(),
|
|
692
|
-
arguments: z3.string()
|
|
693
|
-
})
|
|
694
|
-
})
|
|
695
|
-
).nullish(),
|
|
696
|
-
citations: z3.array(
|
|
697
|
-
z3.object({
|
|
698
|
-
start: z3.number(),
|
|
699
|
-
end: z3.number(),
|
|
700
|
-
text: z3.string(),
|
|
701
|
-
sources: z3.array(
|
|
702
|
-
z3.object({
|
|
703
|
-
type: z3.string().optional(),
|
|
704
|
-
id: z3.string().optional(),
|
|
705
|
-
document: z3.object({
|
|
706
|
-
id: z3.string().optional(),
|
|
707
|
-
text: z3.string(),
|
|
708
|
-
title: z3.string()
|
|
709
|
-
})
|
|
710
|
-
})
|
|
711
|
-
),
|
|
712
|
-
type: z3.string().optional()
|
|
713
|
-
})
|
|
714
|
-
).nullish()
|
|
715
|
-
}),
|
|
716
|
-
finish_reason: z3.string(),
|
|
717
|
-
usage: cohereUsageSchema
|
|
718
|
-
});
|
|
719
|
-
var cohereChatChunkSchema = z3.discriminatedUnion("type", [
|
|
720
|
-
z3.object({
|
|
721
|
-
type: z3.literal("citation-start")
|
|
722
|
-
}),
|
|
723
|
-
z3.object({
|
|
724
|
-
type: z3.literal("citation-end")
|
|
725
|
-
}),
|
|
726
|
-
z3.object({
|
|
727
|
-
type: z3.literal("content-start"),
|
|
728
|
-
index: z3.number(),
|
|
729
|
-
delta: z3.object({
|
|
691
|
+
var cohereChatResponseSchema = lazySchema3(
|
|
692
|
+
() => zodSchema3(
|
|
693
|
+
z3.object({
|
|
694
|
+
generation_id: z3.string().nullish(),
|
|
730
695
|
message: z3.object({
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
696
|
+
role: z3.string(),
|
|
697
|
+
content: z3.array(
|
|
698
|
+
z3.union([
|
|
699
|
+
z3.object({
|
|
700
|
+
type: z3.literal("text"),
|
|
701
|
+
text: z3.string()
|
|
702
|
+
}),
|
|
703
|
+
z3.object({
|
|
704
|
+
type: z3.literal("thinking"),
|
|
705
|
+
thinking: z3.string()
|
|
706
|
+
})
|
|
707
|
+
])
|
|
708
|
+
).nullish(),
|
|
709
|
+
tool_plan: z3.string().nullish(),
|
|
710
|
+
tool_calls: z3.array(
|
|
736
711
|
z3.object({
|
|
737
|
-
|
|
738
|
-
|
|
712
|
+
id: z3.string(),
|
|
713
|
+
type: z3.literal("function"),
|
|
714
|
+
function: z3.object({
|
|
715
|
+
name: z3.string(),
|
|
716
|
+
arguments: z3.string()
|
|
717
|
+
})
|
|
739
718
|
})
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
})
|
|
743
|
-
}),
|
|
744
|
-
z3.object({
|
|
745
|
-
type: z3.literal("content-delta"),
|
|
746
|
-
index: z3.number(),
|
|
747
|
-
delta: z3.object({
|
|
748
|
-
message: z3.object({
|
|
749
|
-
content: z3.union([
|
|
750
|
-
z3.object({
|
|
751
|
-
text: z3.string()
|
|
752
|
-
}),
|
|
719
|
+
).nullish(),
|
|
720
|
+
citations: z3.array(
|
|
753
721
|
z3.object({
|
|
754
|
-
|
|
722
|
+
start: z3.number(),
|
|
723
|
+
end: z3.number(),
|
|
724
|
+
text: z3.string(),
|
|
725
|
+
sources: z3.array(
|
|
726
|
+
z3.object({
|
|
727
|
+
type: z3.string().optional(),
|
|
728
|
+
id: z3.string().optional(),
|
|
729
|
+
document: z3.object({
|
|
730
|
+
id: z3.string().optional(),
|
|
731
|
+
text: z3.string(),
|
|
732
|
+
title: z3.string()
|
|
733
|
+
})
|
|
734
|
+
})
|
|
735
|
+
),
|
|
736
|
+
type: z3.string().optional()
|
|
755
737
|
})
|
|
756
|
-
|
|
757
|
-
})
|
|
758
|
-
})
|
|
759
|
-
}),
|
|
760
|
-
z3.object({
|
|
761
|
-
type: z3.literal("content-end"),
|
|
762
|
-
index: z3.number()
|
|
763
|
-
}),
|
|
764
|
-
z3.object({
|
|
765
|
-
type: z3.literal("message-start"),
|
|
766
|
-
id: z3.string().nullish()
|
|
767
|
-
}),
|
|
768
|
-
z3.object({
|
|
769
|
-
type: z3.literal("message-end"),
|
|
770
|
-
delta: z3.object({
|
|
738
|
+
).nullish()
|
|
739
|
+
}),
|
|
771
740
|
finish_reason: z3.string(),
|
|
772
|
-
usage: cohereUsageSchema
|
|
773
|
-
})
|
|
774
|
-
}),
|
|
775
|
-
// https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling
|
|
776
|
-
z3.object({
|
|
777
|
-
type: z3.literal("tool-plan-delta"),
|
|
778
|
-
delta: z3.object({
|
|
779
|
-
message: z3.object({
|
|
780
|
-
tool_plan: z3.string()
|
|
781
|
-
})
|
|
741
|
+
usage: cohereUsageSchema()
|
|
782
742
|
})
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
743
|
+
)
|
|
744
|
+
);
|
|
745
|
+
var cohereChatChunkSchema = lazySchema3(
|
|
746
|
+
() => zodSchema3(
|
|
747
|
+
z3.discriminatedUnion("type", [
|
|
748
|
+
z3.object({
|
|
749
|
+
type: z3.literal("citation-start")
|
|
750
|
+
}),
|
|
751
|
+
z3.object({
|
|
752
|
+
type: z3.literal("citation-end")
|
|
753
|
+
}),
|
|
754
|
+
z3.object({
|
|
755
|
+
type: z3.literal("content-start"),
|
|
756
|
+
index: z3.number(),
|
|
757
|
+
delta: z3.object({
|
|
758
|
+
message: z3.object({
|
|
759
|
+
content: z3.union([
|
|
760
|
+
z3.object({
|
|
761
|
+
type: z3.literal("text"),
|
|
762
|
+
text: z3.string()
|
|
763
|
+
}),
|
|
764
|
+
z3.object({
|
|
765
|
+
type: z3.literal("thinking"),
|
|
766
|
+
thinking: z3.string()
|
|
767
|
+
})
|
|
768
|
+
])
|
|
794
769
|
})
|
|
795
770
|
})
|
|
796
|
-
})
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
771
|
+
}),
|
|
772
|
+
z3.object({
|
|
773
|
+
type: z3.literal("content-delta"),
|
|
774
|
+
index: z3.number(),
|
|
775
|
+
delta: z3.object({
|
|
776
|
+
message: z3.object({
|
|
777
|
+
content: z3.union([
|
|
778
|
+
z3.object({
|
|
779
|
+
text: z3.string()
|
|
780
|
+
}),
|
|
781
|
+
z3.object({
|
|
782
|
+
thinking: z3.string()
|
|
783
|
+
})
|
|
784
|
+
])
|
|
785
|
+
})
|
|
786
|
+
})
|
|
787
|
+
}),
|
|
788
|
+
z3.object({
|
|
789
|
+
type: z3.literal("content-end"),
|
|
790
|
+
index: z3.number()
|
|
791
|
+
}),
|
|
792
|
+
z3.object({
|
|
793
|
+
type: z3.literal("message-start"),
|
|
794
|
+
id: z3.string().nullish()
|
|
795
|
+
}),
|
|
796
|
+
z3.object({
|
|
797
|
+
type: z3.literal("message-end"),
|
|
798
|
+
delta: z3.object({
|
|
799
|
+
finish_reason: z3.string(),
|
|
800
|
+
usage: cohereUsageSchema()
|
|
801
|
+
})
|
|
802
|
+
}),
|
|
803
|
+
// https://docs.cohere.com/v2/docs/streaming#tool-use-stream-events-for-tool-calling
|
|
804
|
+
z3.object({
|
|
805
|
+
type: z3.literal("tool-plan-delta"),
|
|
806
|
+
delta: z3.object({
|
|
807
|
+
message: z3.object({
|
|
808
|
+
tool_plan: z3.string()
|
|
809
|
+
})
|
|
810
|
+
})
|
|
811
|
+
}),
|
|
812
|
+
z3.object({
|
|
813
|
+
type: z3.literal("tool-call-start"),
|
|
814
|
+
delta: z3.object({
|
|
815
|
+
message: z3.object({
|
|
816
|
+
tool_calls: z3.object({
|
|
817
|
+
id: z3.string(),
|
|
818
|
+
type: z3.literal("function"),
|
|
819
|
+
function: z3.object({
|
|
820
|
+
name: z3.string(),
|
|
821
|
+
arguments: z3.string()
|
|
822
|
+
})
|
|
823
|
+
})
|
|
809
824
|
})
|
|
810
825
|
})
|
|
826
|
+
}),
|
|
827
|
+
// A single tool call's `arguments` stream in chunks and must be accumulated
|
|
828
|
+
// in a string and so the full tool object info can only be parsed once we see
|
|
829
|
+
// `tool-call-end`.
|
|
830
|
+
z3.object({
|
|
831
|
+
type: z3.literal("tool-call-delta"),
|
|
832
|
+
delta: z3.object({
|
|
833
|
+
message: z3.object({
|
|
834
|
+
tool_calls: z3.object({
|
|
835
|
+
function: z3.object({
|
|
836
|
+
arguments: z3.string()
|
|
837
|
+
})
|
|
838
|
+
})
|
|
839
|
+
})
|
|
840
|
+
})
|
|
841
|
+
}),
|
|
842
|
+
z3.object({
|
|
843
|
+
type: z3.literal("tool-call-end")
|
|
811
844
|
})
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
type: z3.literal("tool-call-end")
|
|
816
|
-
})
|
|
817
|
-
]);
|
|
845
|
+
])
|
|
846
|
+
)
|
|
847
|
+
);
|
|
818
848
|
|
|
819
849
|
// src/cohere-embedding-model.ts
|
|
820
850
|
import {
|
|
821
851
|
TooManyEmbeddingValuesForCallError
|
|
822
852
|
} from "@ai-sdk/provider";
|
|
823
853
|
import {
|
|
854
|
+
lazySchema as lazySchema5,
|
|
855
|
+
zodSchema as zodSchema5,
|
|
824
856
|
combineHeaders as combineHeaders2,
|
|
825
857
|
createJsonResponseHandler as createJsonResponseHandler2,
|
|
826
858
|
parseProviderOptions as parseProviderOptions3,
|
|
@@ -829,42 +861,55 @@ import {
|
|
|
829
861
|
import { z as z5 } from "zod/v4";
|
|
830
862
|
|
|
831
863
|
// src/cohere-embedding-options.ts
|
|
864
|
+
import {
|
|
865
|
+
lazySchema as lazySchema4,
|
|
866
|
+
zodSchema as zodSchema4
|
|
867
|
+
} from "@ai-sdk/provider-utils";
|
|
832
868
|
import { z as z4 } from "zod/v4";
|
|
833
|
-
var cohereEmbeddingModelOptions =
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
869
|
+
var cohereEmbeddingModelOptions = lazySchema4(
|
|
870
|
+
() => zodSchema4(
|
|
871
|
+
z4.object({
|
|
872
|
+
/**
|
|
873
|
+
* Specifies the type of input passed to the model. Default is `search_query`.
|
|
874
|
+
*
|
|
875
|
+
* - "search_document": Used for embeddings stored in a vector database for search use-cases.
|
|
876
|
+
* - "search_query": Used for embeddings of search queries run against a vector DB to find relevant documents.
|
|
877
|
+
* - "classification": Used for embeddings passed through a text classifier.
|
|
878
|
+
* - "clustering": Used for embeddings run through a clustering algorithm.
|
|
879
|
+
*/
|
|
880
|
+
inputType: z4.enum([
|
|
881
|
+
"search_document",
|
|
882
|
+
"search_query",
|
|
883
|
+
"classification",
|
|
884
|
+
"clustering"
|
|
885
|
+
]).optional(),
|
|
886
|
+
/**
|
|
887
|
+
* Specifies how the API will handle inputs longer than the maximum token length.
|
|
888
|
+
* Default is `END`.
|
|
889
|
+
*
|
|
890
|
+
* - "NONE": If selected, when the input exceeds the maximum input token length will return an error.
|
|
891
|
+
* - "START": Will discard the start of the input until the remaining input is exactly the maximum input token length for the model.
|
|
892
|
+
* - "END": Will discard the end of the input until the remaining input is exactly the maximum input token length for the model.
|
|
893
|
+
*/
|
|
894
|
+
truncate: z4.enum(["NONE", "START", "END"]).optional(),
|
|
895
|
+
/**
|
|
896
|
+
* The number of dimensions of the output embedding.
|
|
897
|
+
* Only available for `embed-v4.0` and newer models.
|
|
898
|
+
*
|
|
899
|
+
* Embed v4.0 supports `256`, `512`, `1024`, and `1536` (default).
|
|
900
|
+
* Embed v5.0 Pro and Fast also support `768` and `2048` (default).
|
|
901
|
+
*/
|
|
902
|
+
outputDimension: z4.union([
|
|
903
|
+
z4.literal(256),
|
|
904
|
+
z4.literal(512),
|
|
905
|
+
z4.literal(768),
|
|
906
|
+
z4.literal(1024),
|
|
907
|
+
z4.literal(1536),
|
|
908
|
+
z4.literal(2048)
|
|
909
|
+
]).optional()
|
|
910
|
+
})
|
|
911
|
+
)
|
|
912
|
+
);
|
|
868
913
|
|
|
869
914
|
// src/cohere-embedding-model.ts
|
|
870
915
|
var CohereEmbeddingModel = class {
|
|
@@ -931,16 +976,20 @@ var CohereEmbeddingModel = class {
|
|
|
931
976
|
};
|
|
932
977
|
}
|
|
933
978
|
};
|
|
934
|
-
var cohereTextEmbeddingResponseSchema =
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
979
|
+
var cohereTextEmbeddingResponseSchema = lazySchema5(
|
|
980
|
+
() => zodSchema5(
|
|
981
|
+
z5.object({
|
|
982
|
+
embeddings: z5.object({
|
|
983
|
+
float: z5.array(z5.array(z5.number()))
|
|
984
|
+
}),
|
|
985
|
+
meta: z5.object({
|
|
986
|
+
billed_units: z5.object({
|
|
987
|
+
input_tokens: z5.number()
|
|
988
|
+
})
|
|
989
|
+
})
|
|
941
990
|
})
|
|
942
|
-
|
|
943
|
-
|
|
991
|
+
)
|
|
992
|
+
);
|
|
944
993
|
|
|
945
994
|
// src/reranking/cohere-reranking-model.ts
|
|
946
995
|
import {
|
|
@@ -951,10 +1000,10 @@ import {
|
|
|
951
1000
|
} from "@ai-sdk/provider-utils";
|
|
952
1001
|
|
|
953
1002
|
// src/reranking/cohere-reranking-api.ts
|
|
954
|
-
import { lazySchema, zodSchema } from "@ai-sdk/provider-utils";
|
|
1003
|
+
import { lazySchema as lazySchema6, zodSchema as zodSchema6 } from "@ai-sdk/provider-utils";
|
|
955
1004
|
import { z as z6 } from "zod/v4";
|
|
956
|
-
var cohereRerankingResponseSchema =
|
|
957
|
-
() =>
|
|
1005
|
+
var cohereRerankingResponseSchema = lazySchema6(
|
|
1006
|
+
() => zodSchema6(
|
|
958
1007
|
z6.object({
|
|
959
1008
|
id: z6.string().nullish(),
|
|
960
1009
|
results: z6.array(
|
|
@@ -970,12 +1019,12 @@ var cohereRerankingResponseSchema = lazySchema(
|
|
|
970
1019
|
|
|
971
1020
|
// src/reranking/cohere-reranking-options.ts
|
|
972
1021
|
import {
|
|
973
|
-
lazySchema as
|
|
974
|
-
zodSchema as
|
|
1022
|
+
lazySchema as lazySchema7,
|
|
1023
|
+
zodSchema as zodSchema7
|
|
975
1024
|
} from "@ai-sdk/provider-utils";
|
|
976
1025
|
import { z as z7 } from "zod/v4";
|
|
977
|
-
var cohereRerankingModelOptionsSchema =
|
|
978
|
-
() =>
|
|
1026
|
+
var cohereRerankingModelOptionsSchema = lazySchema7(
|
|
1027
|
+
() => zodSchema7(
|
|
979
1028
|
z7.object({
|
|
980
1029
|
maxTokensPerDoc: z7.number().optional(),
|
|
981
1030
|
priority: z7.number().optional()
|
|
@@ -1054,7 +1103,7 @@ var CohereRerankingModel = class {
|
|
|
1054
1103
|
};
|
|
1055
1104
|
|
|
1056
1105
|
// src/version.ts
|
|
1057
|
-
var VERSION = true ? "3.0.
|
|
1106
|
+
var VERSION = true ? "3.0.73" : "0.0.0-test";
|
|
1058
1107
|
|
|
1059
1108
|
// src/cohere-provider.ts
|
|
1060
1109
|
function createCohere(options = {}) {
|