Skip to content

Commit c229c16

Browse files
authored
test(e2e): Test latest cohere provider version with ai sdk (#2331)
1 parent 406d614 commit c229c16

17 files changed

Lines changed: 771 additions & 9 deletions

‎e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7-latest.cassette.json‎

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json‎

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json‎

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,71 @@ span_tree:
866866
│ metrics: {
867867
│ "tokens": 16
868868
│ }
869+
├── ai-sdk-rerank-operation
870+
│ metadata: {
871+
│ "operation": "rerank",
872+
│ "testRunId": "<run:1>"
873+
│ }
874+
│ └── rerank [function]
875+
│ input: {
876+
│ "documents": [
877+
│ "Athens is in Greece.",
878+
│ "Paris is in France.",
879+
│ "Lima is in Peru."
880+
│ ],
881+
│ "model": {
882+
│ "modelId": "rerank-v3.5",
883+
│ "provider": "cohere.reranking"
884+
│ },
885+
│ "query": "Which document is about France?",
886+
│ "topN": 2
887+
│ }
888+
│ output: [
889+
│ {
890+
│ "index": 1,
891+
│ "relevance_score": 0.06657539
892+
│ },
893+
│ {
894+
│ "index": 0,
895+
│ "relevance_score": 0.015062517
896+
│ }
897+
│ ]
898+
│ metadata: {
899+
│ "braintrust": {
900+
│ "integration_name": "ai-sdk",
901+
│ "sdk_language": "typescript"
902+
│ },
903+
│ "model": "rerank-v3.5",
904+
│ "provider": "cohere.reranking"
905+
│ }
906+
│ └── doRerank [llm]
907+
│ input: {
908+
│ "documents": [
909+
│ "Athens is in Greece.",
910+
│ "Paris is in France.",
911+
│ "Lima is in Peru."
912+
│ ],
913+
│ "query": "Which document is about France?",
914+
│ "topN": 2
915+
│ }
916+
│ output: [
917+
│ {
918+
│ "index": 1,
919+
│ "relevance_score": 0.06657539
920+
│ },
921+
│ {
922+
│ "index": 0,
923+
│ "relevance_score": 0.015062517
924+
│ }
925+
│ ]
926+
│ metadata: {
927+
│ "braintrust": {
928+
│ "integration_name": "ai-sdk",
929+
│ "sdk_language": "typescript"
930+
│ },
931+
│ "model": "rerank-v3.5",
932+
│ "provider": "cohere.reranking"
933+
│ }
869934
├── ai-sdk-tool-operation
870935
│ metadata: {
871936
│ "operation": "tool",

‎e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json‎

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)