@workglow/eval 0.4.6 → 0.4.8
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/models.d.ts.map +1 -1
- package/dist/workglow-eval.js +14 -137
- package/package.json +14 -14
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAWhD,MAAM,MAAM,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAI7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,WAAW,CAkE1E;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBzF;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9E;AAQD,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CASvD"}
|
package/dist/workglow-eval.js
CHANGED
|
@@ -711,6 +711,11 @@ import { estimateCost } from "@workglow/ai";
|
|
|
711
711
|
|
|
712
712
|
// src/models.ts
|
|
713
713
|
import { downloadModel } from "@workglow/ai";
|
|
714
|
+
import { getAnthropicModelPricing } from "@workglow/anthropic/ai";
|
|
715
|
+
import { getDeepSeekModelPricing } from "@workglow/deepseek/ai";
|
|
716
|
+
import { getGeminiModelPricing } from "@workglow/google-gemini/ai";
|
|
717
|
+
import { getOpenAiModelPricing } from "@workglow/openai/ai";
|
|
718
|
+
import { getXaiModelPricing } from "@workglow/xai/ai";
|
|
714
719
|
|
|
715
720
|
// src/config.ts
|
|
716
721
|
import { mkdirSync } from "fs";
|
|
@@ -735,138 +740,6 @@ function loadConfig() {
|
|
|
735
740
|
|
|
736
741
|
// src/models.ts
|
|
737
742
|
var GGUF_PREFIX = "gguf:";
|
|
738
|
-
var ANTHROPIC_PRICING = {
|
|
739
|
-
"claude-haiku-4-5": {
|
|
740
|
-
currency: "USD",
|
|
741
|
-
input: 1,
|
|
742
|
-
output: 5,
|
|
743
|
-
cached: 0.1,
|
|
744
|
-
cacheWrite: 1.25,
|
|
745
|
-
cacheStoragePerHour: undefined
|
|
746
|
-
},
|
|
747
|
-
"claude-sonnet-5": {
|
|
748
|
-
currency: "USD",
|
|
749
|
-
input: 2,
|
|
750
|
-
output: 10,
|
|
751
|
-
cached: 0.2,
|
|
752
|
-
cacheWrite: 2.5,
|
|
753
|
-
cacheStoragePerHour: undefined
|
|
754
|
-
},
|
|
755
|
-
"claude-opus-5": {
|
|
756
|
-
currency: "USD",
|
|
757
|
-
input: 15,
|
|
758
|
-
output: 75,
|
|
759
|
-
cached: 1.5,
|
|
760
|
-
cacheWrite: 18.75,
|
|
761
|
-
cacheStoragePerHour: undefined
|
|
762
|
-
}
|
|
763
|
-
};
|
|
764
|
-
var OPENAI_PRICING = {
|
|
765
|
-
"gpt-5.6-sol": {
|
|
766
|
-
currency: "USD",
|
|
767
|
-
input: 5,
|
|
768
|
-
output: 30,
|
|
769
|
-
cached: 0.5,
|
|
770
|
-
cacheWrite: undefined,
|
|
771
|
-
cacheStoragePerHour: undefined
|
|
772
|
-
},
|
|
773
|
-
"gpt-5.6-terra": {
|
|
774
|
-
currency: "USD",
|
|
775
|
-
input: 2,
|
|
776
|
-
output: 12,
|
|
777
|
-
cached: 0.2,
|
|
778
|
-
cacheWrite: undefined,
|
|
779
|
-
cacheStoragePerHour: undefined
|
|
780
|
-
},
|
|
781
|
-
"gpt-5.6-luna": {
|
|
782
|
-
currency: "USD",
|
|
783
|
-
input: 0.2,
|
|
784
|
-
output: 1.2,
|
|
785
|
-
cached: 0.02,
|
|
786
|
-
cacheWrite: undefined,
|
|
787
|
-
cacheStoragePerHour: undefined
|
|
788
|
-
},
|
|
789
|
-
"gpt-5.5": {
|
|
790
|
-
currency: "USD",
|
|
791
|
-
input: 5,
|
|
792
|
-
output: 15,
|
|
793
|
-
cached: 2.5,
|
|
794
|
-
cacheWrite: undefined,
|
|
795
|
-
cacheStoragePerHour: undefined
|
|
796
|
-
},
|
|
797
|
-
"gpt-5.4-mini": {
|
|
798
|
-
currency: "USD",
|
|
799
|
-
input: 0.4,
|
|
800
|
-
output: 1.6,
|
|
801
|
-
cached: 0.2,
|
|
802
|
-
cacheWrite: undefined,
|
|
803
|
-
cacheStoragePerHour: undefined
|
|
804
|
-
},
|
|
805
|
-
"text-embedding-3-small": {
|
|
806
|
-
currency: "USD",
|
|
807
|
-
input: 0.02,
|
|
808
|
-
output: undefined,
|
|
809
|
-
cached: undefined,
|
|
810
|
-
cacheWrite: undefined,
|
|
811
|
-
cacheStoragePerHour: undefined
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
var GEMINI_PRICING = {
|
|
815
|
-
"gemini-3.1-pro-preview": {
|
|
816
|
-
currency: "USD",
|
|
817
|
-
input: 2.5,
|
|
818
|
-
output: 10,
|
|
819
|
-
cached: 0.625,
|
|
820
|
-
cacheWrite: undefined,
|
|
821
|
-
cacheStoragePerHour: 4.5
|
|
822
|
-
},
|
|
823
|
-
"gemini-3-flash-preview": {
|
|
824
|
-
currency: "USD",
|
|
825
|
-
input: 0.3,
|
|
826
|
-
output: 2.5,
|
|
827
|
-
cached: 0.075,
|
|
828
|
-
cacheWrite: undefined,
|
|
829
|
-
cacheStoragePerHour: 1
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
var XAI_GROK_4_PRICING = {
|
|
833
|
-
currency: "USD",
|
|
834
|
-
input: 2,
|
|
835
|
-
output: 6,
|
|
836
|
-
cached: 0.5,
|
|
837
|
-
cacheWrite: undefined,
|
|
838
|
-
cacheStoragePerHour: undefined
|
|
839
|
-
};
|
|
840
|
-
var XAI_PRICING = {
|
|
841
|
-
"grok-4.6": XAI_GROK_4_PRICING,
|
|
842
|
-
"grok-4.5": XAI_GROK_4_PRICING
|
|
843
|
-
};
|
|
844
|
-
var DEEPSEEK_PRICING = {
|
|
845
|
-
"deepseek-v4-flash": {
|
|
846
|
-
currency: "USD",
|
|
847
|
-
input: 0.14,
|
|
848
|
-
output: 0.28,
|
|
849
|
-
cached: 0.014,
|
|
850
|
-
cacheWrite: undefined,
|
|
851
|
-
cacheStoragePerHour: undefined
|
|
852
|
-
},
|
|
853
|
-
"deepseek-v4-pro": {
|
|
854
|
-
currency: "USD",
|
|
855
|
-
input: 0.56,
|
|
856
|
-
output: 1.68,
|
|
857
|
-
cached: 0.07,
|
|
858
|
-
cacheWrite: undefined,
|
|
859
|
-
cacheStoragePerHour: undefined
|
|
860
|
-
},
|
|
861
|
-
"deepseek-v4-pro-0813": {
|
|
862
|
-
currency: "USD",
|
|
863
|
-
input: 0.435,
|
|
864
|
-
output: 0.87,
|
|
865
|
-
cached: 0.0435,
|
|
866
|
-
cacheWrite: undefined,
|
|
867
|
-
cacheStoragePerHour: undefined
|
|
868
|
-
}
|
|
869
|
-
};
|
|
870
743
|
function resolveModelConfig(id, kind) {
|
|
871
744
|
if (id.startsWith(GGUF_PREFIX)) {
|
|
872
745
|
const ref = id.slice(GGUF_PREFIX.length);
|
|
@@ -899,31 +772,35 @@ function resolveModelConfig(id, kind) {
|
|
|
899
772
|
return {
|
|
900
773
|
provider: "ANTHROPIC",
|
|
901
774
|
provider_config: { model_name: id },
|
|
902
|
-
pricing:
|
|
775
|
+
pricing: getAnthropicModelPricing(id)
|
|
903
776
|
};
|
|
904
777
|
}
|
|
905
778
|
if (/^(?:gpt-|o\d|chatgpt-|text-embedding-)/.test(id)) {
|
|
906
779
|
return {
|
|
907
780
|
provider: "OPENAI",
|
|
908
781
|
provider_config: { model_name: id },
|
|
909
|
-
pricing:
|
|
782
|
+
pricing: getOpenAiModelPricing(id)
|
|
910
783
|
};
|
|
911
784
|
}
|
|
912
785
|
if (/^gemini-/.test(id)) {
|
|
913
786
|
return {
|
|
914
787
|
provider: "GOOGLE_GEMINI",
|
|
915
788
|
provider_config: { model_name: id },
|
|
916
|
-
pricing:
|
|
789
|
+
pricing: getGeminiModelPricing(id)
|
|
917
790
|
};
|
|
918
791
|
}
|
|
919
792
|
if (/^grok-/.test(id)) {
|
|
920
|
-
return {
|
|
793
|
+
return {
|
|
794
|
+
provider: "XAI",
|
|
795
|
+
provider_config: { model_name: id },
|
|
796
|
+
pricing: getXaiModelPricing(id)
|
|
797
|
+
};
|
|
921
798
|
}
|
|
922
799
|
if (/^deepseek-/.test(id)) {
|
|
923
800
|
return {
|
|
924
801
|
provider: "DEEPSEEK",
|
|
925
802
|
provider_config: { model_name: id },
|
|
926
|
-
pricing:
|
|
803
|
+
pricing: getDeepSeekModelPricing(id)
|
|
927
804
|
};
|
|
928
805
|
}
|
|
929
806
|
throw new Error(`cannot infer a provider for model "${id}" \u2014 use a claude-*/gpt-*/gemini-*/grok-*/deepseek-* ` + `cloud id or an org/name HuggingFace ONNX model path`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workglow/eval",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/workglow-dev/libs.git",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"src/**/*.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@workglow/ai": "0.4.
|
|
37
|
-
"@workglow/anthropic": "0.4.
|
|
38
|
-
"@workglow/cli": "0.4.
|
|
39
|
-
"@workglow/deepseek": "0.4.
|
|
40
|
-
"@workglow/google-gemini": "0.4.
|
|
41
|
-
"@workglow/huggingface-transformers": "0.4.
|
|
42
|
-
"@workglow/node-llama-cpp": "0.4.
|
|
43
|
-
"@workglow/openai": "0.4.
|
|
44
|
-
"@workglow/sqlite": "0.4.
|
|
45
|
-
"@workglow/storage": "0.4.
|
|
46
|
-
"@workglow/task-graph": "0.4.
|
|
47
|
-
"@workglow/util": "0.4.
|
|
48
|
-
"@workglow/xai": "0.4.
|
|
36
|
+
"@workglow/ai": "0.4.8",
|
|
37
|
+
"@workglow/anthropic": "0.4.8",
|
|
38
|
+
"@workglow/cli": "0.4.8",
|
|
39
|
+
"@workglow/deepseek": "0.4.8",
|
|
40
|
+
"@workglow/google-gemini": "0.4.8",
|
|
41
|
+
"@workglow/huggingface-transformers": "0.4.8",
|
|
42
|
+
"@workglow/node-llama-cpp": "0.4.8",
|
|
43
|
+
"@workglow/openai": "0.4.8",
|
|
44
|
+
"@workglow/sqlite": "0.4.8",
|
|
45
|
+
"@workglow/storage": "0.4.8",
|
|
46
|
+
"@workglow/task-graph": "0.4.8",
|
|
47
|
+
"@workglow/util": "0.4.8",
|
|
48
|
+
"@workglow/xai": "0.4.8",
|
|
49
49
|
"@huggingface/transformers": "^4.2.0",
|
|
50
50
|
"commander": "^15.0.0",
|
|
51
51
|
"hyparquet": "^1.29.2",
|