@botpress/cognitive 0.1.47 → 0.1.49
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/.turbo/turbo-build.log +7 -7
- package/build.ts +3 -3
- package/dist/index.cjs +63 -59
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +50 -16
- package/dist/index.mjs +63 -59
- package/dist/index.mjs.map +2 -2
- package/package.json +5 -2
- package/refresh-models.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ type GenerateContentInput = {
|
|
|
33
33
|
type: 'text' | 'image';
|
|
34
34
|
/** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
|
|
35
35
|
mimeType?: string;
|
|
36
|
-
/** Required if part type is "text"
|
|
36
|
+
/** Required if part type is "text" */
|
|
37
37
|
text?: string;
|
|
38
38
|
/** Required if part type is "image" */
|
|
39
39
|
url?: string;
|
|
@@ -103,7 +103,7 @@ type GenerateContentOutput = {
|
|
|
103
103
|
type: 'text' | 'image';
|
|
104
104
|
/** Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL. */
|
|
105
105
|
mimeType?: string;
|
|
106
|
-
/** Required if part type is "text"
|
|
106
|
+
/** Required if part type is "text" */
|
|
107
107
|
text?: string;
|
|
108
108
|
/** Required if part type is "image" */
|
|
109
109
|
url?: string;
|
|
@@ -18030,6 +18030,7 @@ type IClient = Simplify<Client$1 & {
|
|
|
18030
18030
|
}>;
|
|
18031
18031
|
type ClientProps$2 = CommonClientProps & {
|
|
18032
18032
|
integrationId?: string;
|
|
18033
|
+
integrationAlias?: string;
|
|
18033
18034
|
workspaceId?: string;
|
|
18034
18035
|
botId?: string;
|
|
18035
18036
|
token?: string;
|
|
@@ -18983,7 +18984,7 @@ declare class Cognitive {
|
|
|
18983
18984
|
private _generateContent;
|
|
18984
18985
|
}
|
|
18985
18986
|
|
|
18986
|
-
type Models = 'auto' | 'best' | 'fast' | 'anthropic:claude-3-5-haiku-20241022' | 'anthropic:claude-3-5-sonnet-20240620' | 'anthropic:claude-3-5-sonnet-20241022' | 'anthropic:claude-3-7-sonnet-20250219' | 'anthropic:claude-3-haiku-20240307' | 'anthropic:claude-sonnet-4-20250514' | 'anthropic:claude-sonnet-4-5-20250929' | 'cerebras:gpt-oss-120b' | 'cerebras:llama-4-scout-17b-16e-instruct' | 'cerebras:llama3.1-8b' | 'cerebras:llama3.3-70b' | 'cerebras:qwen-3-32b' | 'fireworks-ai:deepseek-r1-0528' | 'fireworks-ai:deepseek-v3-0324' | 'fireworks-ai:gpt-oss-120b' | 'fireworks-ai:gpt-oss-20b' | 'fireworks-ai:llama-v3p1-8b-instruct' | 'fireworks-ai:llama-v3p3-70b-instruct' | 'fireworks-ai:llama4-maverick-instruct-basic' | 'fireworks-ai:llama4-scout-instruct-basic' | 'fireworks-ai:mixtral-8x7b-instruct' | 'fireworks-ai:mythomax-l2-13b' | 'google-ai:gemini-2.0-flash' | 'google-ai:gemini-2.5-flash' | 'google-ai:gemini-2.5-pro' | 'groq:
|
|
18987
|
+
type Models = 'auto' | 'best' | 'fast' | 'anthropic:claude-3-5-haiku-20241022' | 'anthropic:claude-3-5-sonnet-20240620' | 'anthropic:claude-3-5-sonnet-20241022' | 'anthropic:claude-3-7-sonnet-20250219' | 'anthropic:claude-3-haiku-20240307' | 'anthropic:claude-sonnet-4-20250514' | 'anthropic:claude-sonnet-4-5-20250929' | 'cerebras:gpt-oss-120b' | 'cerebras:llama-4-scout-17b-16e-instruct' | 'cerebras:llama3.1-8b' | 'cerebras:llama3.3-70b' | 'cerebras:qwen-3-32b' | 'fireworks-ai:deepseek-r1-0528' | 'fireworks-ai:deepseek-v3-0324' | 'fireworks-ai:gpt-oss-120b' | 'fireworks-ai:gpt-oss-20b' | 'fireworks-ai:llama-v3p1-8b-instruct' | 'fireworks-ai:llama-v3p3-70b-instruct' | 'fireworks-ai:llama4-maverick-instruct-basic' | 'fireworks-ai:llama4-scout-instruct-basic' | 'fireworks-ai:mixtral-8x7b-instruct' | 'fireworks-ai:mythomax-l2-13b' | 'google-ai:gemini-2.0-flash' | 'google-ai:gemini-2.5-flash' | 'google-ai:gemini-2.5-pro' | 'groq:gpt-oss-120b' | 'groq:gpt-oss-20b' | 'groq:llama-3.1-8b-instant' | 'groq:llama-3.3-70b-versatile' | 'openai:gpt-4.1-2025-04-14' | 'openai:gpt-4.1-mini-2025-04-14' | 'openai:gpt-4.1-nano-2025-04-14' | 'openai:gpt-4o-2024-11-20' | 'openai:gpt-4o-mini-2024-07-18' | 'openai:gpt-5-2025-08-07' | 'openai:gpt-5-mini-2025-08-07' | 'openai:gpt-5-nano-2025-08-07' | 'openai:o1-2024-12-17' | 'openai:o1-mini-2024-09-12' | 'openai:o3-2025-04-16' | 'openai:o3-mini-2025-01-31' | 'openai:o4-mini-2025-04-16' | 'openrouter:gpt-oss-120b' | 'xai:grok-3' | 'xai:grok-3-mini' | 'xai:grok-4-0709' | 'xai:grok-4-fast-non-reasoning' | 'xai:grok-4-fast-reasoning' | 'xai:grok-code-fast-1' | 'openai:gpt-5' | 'openai:gpt-5-mini' | 'openai:gpt-5-nano' | 'openai:o4-mini' | 'openai:o3' | 'openai:gpt-4.1' | 'openai:gpt-4.1-mini' | 'openai:gpt-4.1-nano' | 'openai:o3-mini' | 'openai:o1-mini' | 'openai:gpt-4o-mini' | 'openai:gpt-4o' | 'anthropic:claude-sonnet-4-5' | 'anthropic:claude-sonnet-4' | 'anthropic:claude-sonnet-4-reasoning' | 'google-ai:models/gemini-2.0-flash' | 'groq:openai/gpt-oss-20b' | 'groq:openai/gpt-oss-120b' | 'fireworks-ai:accounts/fireworks/models/gpt-oss-20b' | 'fireworks-ai:accounts/fireworks/models/gpt-oss-120b' | 'fireworks-ai:accounts/fireworks/models/deepseek-r1-0528' | 'fireworks-ai:accounts/fireworks/models/deepseek-v3-0324' | 'fireworks-ai:accounts/fireworks/models/llama4-maverick-instruct-basic' | 'fireworks-ai:accounts/fireworks/models/llama4-scout-instruct-basic' | 'fireworks-ai:accounts/fireworks/models/llama-v3p3-70b-instruct' | 'fireworks-ai:accounts/fireworks/models/deepseek-r1' | 'fireworks-ai:accounts/fireworks/models/deepseek-r1-basic' | 'fireworks-ai:accounts/fireworks/models/deepseek-v3' | 'fireworks-ai:accounts/fireworks/models/llama-v3p1-405b-instruct' | 'fireworks-ai:accounts/fireworks/models/llama-v3p1-70b-instruct' | 'fireworks-ai:accounts/fireworks/models/llama-v3p1-8b-instruct' | 'fireworks-ai:accounts/fireworks/models/mixtral-8x22b-instruct' | 'fireworks-ai:accounts/fireworks/models/mixtral-8x7b-instruct' | 'fireworks-ai:accounts/fireworks/models/mythomax-l2-13b' | 'fireworks-ai:accounts/fireworks/models/gemma2-9b-it' | ({} & string);
|
|
18987
18988
|
type CognitiveRequest = {
|
|
18988
18989
|
/**
|
|
18989
18990
|
* @minItems 1
|
|
@@ -19003,13 +19004,33 @@ type CognitiveRequest = {
|
|
|
19003
19004
|
* Model to query. Additional models are used as fallback if the main model is unavailable
|
|
19004
19005
|
*/
|
|
19005
19006
|
model?: Models | Models[];
|
|
19006
|
-
systemPrompt?: string;
|
|
19007
19007
|
temperature?: number;
|
|
19008
|
+
/**
|
|
19009
|
+
* DEPRECATED: Use a message with role "system"
|
|
19010
|
+
*/
|
|
19011
|
+
systemPrompt?: string;
|
|
19008
19012
|
maxTokens?: number;
|
|
19009
19013
|
stopSequences?: string | string[];
|
|
19010
19014
|
stream?: boolean;
|
|
19015
|
+
/**
|
|
19016
|
+
* json_object is deprecated, use json
|
|
19017
|
+
*/
|
|
19011
19018
|
responseFormat?: 'text' | 'json' | 'json_object';
|
|
19012
19019
|
reasoningEffort?: 'low' | 'medium' | 'high' | 'dynamic' | 'none';
|
|
19020
|
+
options?: {
|
|
19021
|
+
/**
|
|
19022
|
+
* Debug mode include additional metadata in the response
|
|
19023
|
+
*/
|
|
19024
|
+
debug?: boolean;
|
|
19025
|
+
/**
|
|
19026
|
+
* Bypass the cache and force a new request
|
|
19027
|
+
*/
|
|
19028
|
+
skipCache?: boolean;
|
|
19029
|
+
/**
|
|
19030
|
+
* Maximum time to wait for the first token before falling back to the next provider
|
|
19031
|
+
*/
|
|
19032
|
+
maxTimeToFirstToken?: number;
|
|
19033
|
+
};
|
|
19013
19034
|
meta?: {
|
|
19014
19035
|
/**
|
|
19015
19036
|
* Source of the prompt, e.g. agent/:id/:version cards/ai-generate, cards/ai-task, nodes/autonomous, etc.
|
|
@@ -19031,16 +19052,24 @@ type CognitiveStreamChunk = {
|
|
|
19031
19052
|
model?: string;
|
|
19032
19053
|
usage: {
|
|
19033
19054
|
inputTokens: number;
|
|
19055
|
+
inputCost: number;
|
|
19034
19056
|
outputTokens: number;
|
|
19035
|
-
|
|
19057
|
+
outputCost: number;
|
|
19036
19058
|
};
|
|
19037
|
-
cost
|
|
19059
|
+
cost: number;
|
|
19038
19060
|
cached?: boolean;
|
|
19061
|
+
/**
|
|
19062
|
+
* Time it took for the provider to respond to the LLM query
|
|
19063
|
+
*/
|
|
19039
19064
|
latency?: number;
|
|
19040
|
-
|
|
19065
|
+
/**
|
|
19066
|
+
* Time it took for the first token to be received from the provider
|
|
19067
|
+
*/
|
|
19068
|
+
ttft?: number;
|
|
19069
|
+
stopReason?: 'stop' | 'max_tokens' | 'content_filter' | 'tool_calls' | 'other';
|
|
19041
19070
|
reasoningEffort?: string;
|
|
19042
19071
|
warnings?: {
|
|
19043
|
-
type: 'parameter_ignored' | 'provider_limitation' | 'deprecated_model' | 'fallback_used';
|
|
19072
|
+
type: 'parameter_ignored' | 'provider_limitation' | 'deprecated_model' | 'discontinued_model' | 'fallback_used';
|
|
19044
19073
|
message: string;
|
|
19045
19074
|
}[];
|
|
19046
19075
|
/**
|
|
@@ -19048,8 +19077,8 @@ type CognitiveStreamChunk = {
|
|
|
19048
19077
|
*/
|
|
19049
19078
|
fallbackPath?: string[];
|
|
19050
19079
|
debug?: {
|
|
19051
|
-
|
|
19052
|
-
};
|
|
19080
|
+
type: 'models_to_try' | 'provider_request' | 'provider_response';
|
|
19081
|
+
}[];
|
|
19053
19082
|
};
|
|
19054
19083
|
};
|
|
19055
19084
|
type CognitiveResponse = {
|
|
@@ -19064,13 +19093,17 @@ type CognitiveResponse = {
|
|
|
19064
19093
|
outputTokens: number;
|
|
19065
19094
|
outputCost: number;
|
|
19066
19095
|
};
|
|
19067
|
-
cost
|
|
19096
|
+
cost: number;
|
|
19068
19097
|
cached?: boolean;
|
|
19069
19098
|
/**
|
|
19070
19099
|
* Time it took for the provider to respond to the LLM query
|
|
19071
19100
|
*/
|
|
19072
19101
|
latency?: number;
|
|
19073
|
-
|
|
19102
|
+
/**
|
|
19103
|
+
* Time it took for the first token to be received from the provider
|
|
19104
|
+
*/
|
|
19105
|
+
ttft?: number;
|
|
19106
|
+
stopReason?: 'stop' | 'max_tokens' | 'content_filter' | 'tool_calls' | 'other';
|
|
19074
19107
|
reasoningEffort?: string;
|
|
19075
19108
|
warnings?: {
|
|
19076
19109
|
type: 'parameter_ignored' | 'provider_limitation' | 'deprecated_model' | 'discontinued_model' | 'fallback_used';
|
|
@@ -19081,8 +19114,9 @@ type CognitiveResponse = {
|
|
|
19081
19114
|
*/
|
|
19082
19115
|
fallbackPath?: string[];
|
|
19083
19116
|
debug?: {
|
|
19084
|
-
|
|
19085
|
-
|
|
19117
|
+
type: 'models_to_try' | 'provider_request' | 'provider_response';
|
|
19118
|
+
data?: any | null;
|
|
19119
|
+
}[];
|
|
19086
19120
|
};
|
|
19087
19121
|
error?: string;
|
|
19088
19122
|
};
|
|
@@ -19112,7 +19146,7 @@ type Model = {
|
|
|
19112
19146
|
/**
|
|
19113
19147
|
* The lifecycle state of the model. Deprecated models are still available, but a warning will be shown to the user. Discontinued models will be directed to a replacement model.
|
|
19114
19148
|
*/
|
|
19115
|
-
lifecycle: '
|
|
19149
|
+
lifecycle: 'production' | 'preview' | 'deprecated' | 'discontinued';
|
|
19116
19150
|
};
|
|
19117
19151
|
|
|
19118
19152
|
type ClientProps = {
|
|
@@ -19122,7 +19156,7 @@ type ClientProps = {
|
|
|
19122
19156
|
token?: string;
|
|
19123
19157
|
withCredentials?: boolean;
|
|
19124
19158
|
debug?: boolean;
|
|
19125
|
-
headers?: Record<string, string>;
|
|
19159
|
+
headers?: Record<string, string | string[]>;
|
|
19126
19160
|
};
|
|
19127
19161
|
type RequestOptions = {
|
|
19128
19162
|
signal?: AbortSignal;
|
package/dist/index.mjs
CHANGED
|
@@ -649,7 +649,7 @@ var models = {
|
|
|
649
649
|
costPer1MTokens: 10
|
|
650
650
|
},
|
|
651
651
|
tags: ["recommended", "reasoning", "general-purpose"],
|
|
652
|
-
lifecycle: "
|
|
652
|
+
lifecycle: "production",
|
|
653
653
|
aliases: ["gpt-5"]
|
|
654
654
|
},
|
|
655
655
|
"openai:gpt-5-mini-2025-08-07": {
|
|
@@ -665,7 +665,7 @@ var models = {
|
|
|
665
665
|
costPer1MTokens: 2
|
|
666
666
|
},
|
|
667
667
|
tags: ["recommended", "reasoning", "general-purpose"],
|
|
668
|
-
lifecycle: "
|
|
668
|
+
lifecycle: "production",
|
|
669
669
|
aliases: ["gpt-5-mini"]
|
|
670
670
|
},
|
|
671
671
|
"openai:gpt-5-nano-2025-08-07": {
|
|
@@ -681,7 +681,7 @@ var models = {
|
|
|
681
681
|
costPer1MTokens: 0.4
|
|
682
682
|
},
|
|
683
683
|
tags: ["low-cost", "reasoning", "general-purpose"],
|
|
684
|
-
lifecycle: "
|
|
684
|
+
lifecycle: "production",
|
|
685
685
|
aliases: ["gpt-5-nano"]
|
|
686
686
|
},
|
|
687
687
|
"openai:o4-mini-2025-04-16": {
|
|
@@ -697,7 +697,7 @@ var models = {
|
|
|
697
697
|
costPer1MTokens: 4.4
|
|
698
698
|
},
|
|
699
699
|
tags: ["reasoning", "vision", "coding"],
|
|
700
|
-
lifecycle: "
|
|
700
|
+
lifecycle: "production",
|
|
701
701
|
aliases: ["o4-mini"]
|
|
702
702
|
},
|
|
703
703
|
"openai:o3-2025-04-16": {
|
|
@@ -713,7 +713,7 @@ var models = {
|
|
|
713
713
|
costPer1MTokens: 8
|
|
714
714
|
},
|
|
715
715
|
tags: ["reasoning", "vision", "coding"],
|
|
716
|
-
lifecycle: "
|
|
716
|
+
lifecycle: "production",
|
|
717
717
|
aliases: ["o3"]
|
|
718
718
|
},
|
|
719
719
|
"openai:gpt-4.1-2025-04-14": {
|
|
@@ -729,7 +729,7 @@ var models = {
|
|
|
729
729
|
costPer1MTokens: 8
|
|
730
730
|
},
|
|
731
731
|
tags: ["recommended", "vision", "general-purpose"],
|
|
732
|
-
lifecycle: "
|
|
732
|
+
lifecycle: "production",
|
|
733
733
|
aliases: ["gpt-4.1"]
|
|
734
734
|
},
|
|
735
735
|
"openai:gpt-4.1-mini-2025-04-14": {
|
|
@@ -745,7 +745,7 @@ var models = {
|
|
|
745
745
|
costPer1MTokens: 1.6
|
|
746
746
|
},
|
|
747
747
|
tags: ["recommended", "vision", "general-purpose"],
|
|
748
|
-
lifecycle: "
|
|
748
|
+
lifecycle: "production",
|
|
749
749
|
aliases: ["gpt-4.1-mini"]
|
|
750
750
|
},
|
|
751
751
|
"openai:gpt-4.1-nano-2025-04-14": {
|
|
@@ -761,7 +761,7 @@ var models = {
|
|
|
761
761
|
costPer1MTokens: 0.4
|
|
762
762
|
},
|
|
763
763
|
tags: ["low-cost", "vision", "general-purpose"],
|
|
764
|
-
lifecycle: "
|
|
764
|
+
lifecycle: "production",
|
|
765
765
|
aliases: ["gpt-4.1-nano"]
|
|
766
766
|
},
|
|
767
767
|
"openai:o3-mini-2025-01-31": {
|
|
@@ -777,7 +777,7 @@ var models = {
|
|
|
777
777
|
costPer1MTokens: 4.4
|
|
778
778
|
},
|
|
779
779
|
tags: ["reasoning", "general-purpose", "coding"],
|
|
780
|
-
lifecycle: "
|
|
780
|
+
lifecycle: "production",
|
|
781
781
|
aliases: ["o3-mini"]
|
|
782
782
|
},
|
|
783
783
|
"openai:o1-2024-12-17": {
|
|
@@ -793,7 +793,7 @@ var models = {
|
|
|
793
793
|
costPer1MTokens: 60
|
|
794
794
|
},
|
|
795
795
|
tags: ["reasoning", "vision", "general-purpose"],
|
|
796
|
-
lifecycle: "
|
|
796
|
+
lifecycle: "production"
|
|
797
797
|
},
|
|
798
798
|
"openai:o1-mini-2024-09-12": {
|
|
799
799
|
id: "openai:o1-mini-2024-09-12",
|
|
@@ -808,7 +808,7 @@ var models = {
|
|
|
808
808
|
costPer1MTokens: 4.4
|
|
809
809
|
},
|
|
810
810
|
tags: ["reasoning", "vision", "general-purpose"],
|
|
811
|
-
lifecycle: "
|
|
811
|
+
lifecycle: "production",
|
|
812
812
|
aliases: ["o1-mini"]
|
|
813
813
|
},
|
|
814
814
|
"openai:gpt-4o-mini-2024-07-18": {
|
|
@@ -823,8 +823,8 @@ var models = {
|
|
|
823
823
|
maxTokens: 16384,
|
|
824
824
|
costPer1MTokens: 0.6
|
|
825
825
|
},
|
|
826
|
-
tags: ["recommended", "vision", "low-cost", "general-purpose"
|
|
827
|
-
lifecycle: "
|
|
826
|
+
tags: ["recommended", "vision", "low-cost", "general-purpose"],
|
|
827
|
+
lifecycle: "production",
|
|
828
828
|
aliases: ["gpt-4o-mini"]
|
|
829
829
|
},
|
|
830
830
|
"openai:gpt-4o-2024-11-20": {
|
|
@@ -839,8 +839,8 @@ var models = {
|
|
|
839
839
|
maxTokens: 16384,
|
|
840
840
|
costPer1MTokens: 10
|
|
841
841
|
},
|
|
842
|
-
tags: ["recommended", "vision", "general-purpose", "coding", "agents"
|
|
843
|
-
lifecycle: "
|
|
842
|
+
tags: ["recommended", "vision", "general-purpose", "coding", "agents"],
|
|
843
|
+
lifecycle: "production",
|
|
844
844
|
aliases: ["gpt-4o"]
|
|
845
845
|
},
|
|
846
846
|
"openai:gpt-4o-2024-08-06": {
|
|
@@ -855,7 +855,7 @@ var models = {
|
|
|
855
855
|
maxTokens: 16384,
|
|
856
856
|
costPer1MTokens: 10
|
|
857
857
|
},
|
|
858
|
-
tags: ["deprecated", "vision", "general-purpose", "coding", "agents"
|
|
858
|
+
tags: ["deprecated", "vision", "general-purpose", "coding", "agents"],
|
|
859
859
|
lifecycle: "deprecated"
|
|
860
860
|
},
|
|
861
861
|
"openai:gpt-4o-2024-05-13": {
|
|
@@ -870,7 +870,7 @@ var models = {
|
|
|
870
870
|
maxTokens: 4096,
|
|
871
871
|
costPer1MTokens: 15
|
|
872
872
|
},
|
|
873
|
-
tags: ["deprecated", "vision", "general-purpose", "coding", "agents"
|
|
873
|
+
tags: ["deprecated", "vision", "general-purpose", "coding", "agents"],
|
|
874
874
|
lifecycle: "deprecated"
|
|
875
875
|
},
|
|
876
876
|
"openai:gpt-4-turbo-2024-04-09": {
|
|
@@ -885,7 +885,7 @@ var models = {
|
|
|
885
885
|
maxTokens: 4096,
|
|
886
886
|
costPer1MTokens: 30
|
|
887
887
|
},
|
|
888
|
-
tags: ["deprecated", "general-purpose", "coding", "agents"
|
|
888
|
+
tags: ["deprecated", "general-purpose", "coding", "agents"],
|
|
889
889
|
lifecycle: "deprecated"
|
|
890
890
|
},
|
|
891
891
|
"openai:gpt-3.5-turbo-0125": {
|
|
@@ -916,7 +916,7 @@ var models = {
|
|
|
916
916
|
costPer1MTokens: 15
|
|
917
917
|
},
|
|
918
918
|
tags: ["recommended", "reasoning", "agents", "vision", "general-purpose", "coding"],
|
|
919
|
-
lifecycle: "
|
|
919
|
+
lifecycle: "production",
|
|
920
920
|
aliases: ["claude-sonnet-4-5"]
|
|
921
921
|
},
|
|
922
922
|
"anthropic:claude-sonnet-4-20250514": {
|
|
@@ -932,7 +932,7 @@ var models = {
|
|
|
932
932
|
costPer1MTokens: 15
|
|
933
933
|
},
|
|
934
934
|
tags: ["recommended", "reasoning", "agents", "vision", "general-purpose", "coding"],
|
|
935
|
-
lifecycle: "
|
|
935
|
+
lifecycle: "production",
|
|
936
936
|
aliases: ["claude-sonnet-4"]
|
|
937
937
|
},
|
|
938
938
|
"anthropic:claude-sonnet-4-reasoning-20250514": {
|
|
@@ -964,7 +964,7 @@ var models = {
|
|
|
964
964
|
costPer1MTokens: 15
|
|
965
965
|
},
|
|
966
966
|
tags: ["recommended", "reasoning", "agents", "vision", "general-purpose", "coding"],
|
|
967
|
-
lifecycle: "
|
|
967
|
+
lifecycle: "production"
|
|
968
968
|
},
|
|
969
969
|
"anthropic:claude-3-7-sonnet-reasoning-20250219": {
|
|
970
970
|
id: "anthropic:claude-3-7-sonnet-reasoning-20250219",
|
|
@@ -994,7 +994,7 @@ var models = {
|
|
|
994
994
|
costPer1MTokens: 4
|
|
995
995
|
},
|
|
996
996
|
tags: ["general-purpose", "low-cost"],
|
|
997
|
-
lifecycle: "
|
|
997
|
+
lifecycle: "production"
|
|
998
998
|
},
|
|
999
999
|
"anthropic:claude-3-5-sonnet-20241022": {
|
|
1000
1000
|
id: "anthropic:claude-3-5-sonnet-20241022",
|
|
@@ -1008,8 +1008,8 @@ var models = {
|
|
|
1008
1008
|
maxTokens: 8192,
|
|
1009
1009
|
costPer1MTokens: 15
|
|
1010
1010
|
},
|
|
1011
|
-
tags: ["vision", "general-purpose", "agents", "coding", "
|
|
1012
|
-
lifecycle: "
|
|
1011
|
+
tags: ["vision", "general-purpose", "agents", "coding", "storytelling"],
|
|
1012
|
+
lifecycle: "production"
|
|
1013
1013
|
},
|
|
1014
1014
|
"anthropic:claude-3-5-sonnet-20240620": {
|
|
1015
1015
|
id: "anthropic:claude-3-5-sonnet-20240620",
|
|
@@ -1023,8 +1023,8 @@ var models = {
|
|
|
1023
1023
|
maxTokens: 4096,
|
|
1024
1024
|
costPer1MTokens: 15
|
|
1025
1025
|
},
|
|
1026
|
-
tags: ["vision", "general-purpose", "agents", "coding", "
|
|
1027
|
-
lifecycle: "
|
|
1026
|
+
tags: ["vision", "general-purpose", "agents", "coding", "storytelling"],
|
|
1027
|
+
lifecycle: "production"
|
|
1028
1028
|
},
|
|
1029
1029
|
"anthropic:claude-3-haiku-20240307": {
|
|
1030
1030
|
id: "anthropic:claude-3-haiku-20240307",
|
|
@@ -1039,7 +1039,7 @@ var models = {
|
|
|
1039
1039
|
costPer1MTokens: 1.25
|
|
1040
1040
|
},
|
|
1041
1041
|
tags: ["low-cost", "general-purpose"],
|
|
1042
|
-
lifecycle: "
|
|
1042
|
+
lifecycle: "production"
|
|
1043
1043
|
},
|
|
1044
1044
|
"google-ai:gemini-2.5-flash": {
|
|
1045
1045
|
id: "google-ai:gemini-2.5-flash",
|
|
@@ -1054,7 +1054,7 @@ var models = {
|
|
|
1054
1054
|
costPer1MTokens: 2.5
|
|
1055
1055
|
},
|
|
1056
1056
|
tags: ["recommended", "reasoning", "agents", "general-purpose", "vision"],
|
|
1057
|
-
lifecycle: "
|
|
1057
|
+
lifecycle: "production"
|
|
1058
1058
|
},
|
|
1059
1059
|
"google-ai:gemini-2.5-pro": {
|
|
1060
1060
|
id: "google-ai:gemini-2.5-pro",
|
|
@@ -1069,7 +1069,7 @@ var models = {
|
|
|
1069
1069
|
costPer1MTokens: 10
|
|
1070
1070
|
},
|
|
1071
1071
|
tags: ["recommended", "reasoning", "agents", "general-purpose", "vision", "coding"],
|
|
1072
|
-
lifecycle: "
|
|
1072
|
+
lifecycle: "production"
|
|
1073
1073
|
},
|
|
1074
1074
|
"google-ai:gemini-2.0-flash": {
|
|
1075
1075
|
id: "google-ai:gemini-2.0-flash",
|
|
@@ -1084,7 +1084,7 @@ var models = {
|
|
|
1084
1084
|
costPer1MTokens: 0.4
|
|
1085
1085
|
},
|
|
1086
1086
|
tags: ["low-cost", "general-purpose", "vision"],
|
|
1087
|
-
lifecycle: "
|
|
1087
|
+
lifecycle: "production",
|
|
1088
1088
|
aliases: ["models/gemini-2.0-flash"]
|
|
1089
1089
|
},
|
|
1090
1090
|
"cerebras:gpt-oss-120b": {
|
|
@@ -1100,7 +1100,7 @@ var models = {
|
|
|
1100
1100
|
costPer1MTokens: 0.75
|
|
1101
1101
|
},
|
|
1102
1102
|
tags: ["preview", "general-purpose", "reasoning"],
|
|
1103
|
-
lifecycle: "
|
|
1103
|
+
lifecycle: "production"
|
|
1104
1104
|
},
|
|
1105
1105
|
"cerebras:qwen-3-32b": {
|
|
1106
1106
|
id: "cerebras:qwen-3-32b",
|
|
@@ -1115,7 +1115,7 @@ var models = {
|
|
|
1115
1115
|
costPer1MTokens: 0.8
|
|
1116
1116
|
},
|
|
1117
1117
|
tags: ["general-purpose", "reasoning"],
|
|
1118
|
-
lifecycle: "
|
|
1118
|
+
lifecycle: "production"
|
|
1119
1119
|
},
|
|
1120
1120
|
"cerebras:llama-4-scout-17b-16e-instruct": {
|
|
1121
1121
|
id: "cerebras:llama-4-scout-17b-16e-instruct",
|
|
@@ -1130,7 +1130,7 @@ var models = {
|
|
|
1130
1130
|
costPer1MTokens: 0.85
|
|
1131
1131
|
},
|
|
1132
1132
|
tags: ["general-purpose", "vision"],
|
|
1133
|
-
lifecycle: "
|
|
1133
|
+
lifecycle: "production"
|
|
1134
1134
|
},
|
|
1135
1135
|
"cerebras:llama3.1-8b": {
|
|
1136
1136
|
id: "cerebras:llama3.1-8b",
|
|
@@ -1145,7 +1145,7 @@ var models = {
|
|
|
1145
1145
|
costPer1MTokens: 0.1
|
|
1146
1146
|
},
|
|
1147
1147
|
tags: ["low-cost", "general-purpose"],
|
|
1148
|
-
lifecycle: "
|
|
1148
|
+
lifecycle: "production"
|
|
1149
1149
|
},
|
|
1150
1150
|
"cerebras:llama3.3-70b": {
|
|
1151
1151
|
id: "cerebras:llama3.3-70b",
|
|
@@ -1160,7 +1160,7 @@ var models = {
|
|
|
1160
1160
|
costPer1MTokens: 1.2
|
|
1161
1161
|
},
|
|
1162
1162
|
tags: ["general-purpose"],
|
|
1163
|
-
lifecycle: "
|
|
1163
|
+
lifecycle: "production"
|
|
1164
1164
|
},
|
|
1165
1165
|
"groq:gpt-oss-20b": {
|
|
1166
1166
|
id: "groq:gpt-oss-20b",
|
|
@@ -1175,7 +1175,7 @@ var models = {
|
|
|
1175
1175
|
costPer1MTokens: 0.5
|
|
1176
1176
|
},
|
|
1177
1177
|
tags: ["preview", "general-purpose", "reasoning", "low-cost"],
|
|
1178
|
-
lifecycle: "
|
|
1178
|
+
lifecycle: "production",
|
|
1179
1179
|
aliases: ["openai/gpt-oss-20b"]
|
|
1180
1180
|
},
|
|
1181
1181
|
"groq:gpt-oss-120b": {
|
|
@@ -1191,7 +1191,7 @@ var models = {
|
|
|
1191
1191
|
costPer1MTokens: 0.75
|
|
1192
1192
|
},
|
|
1193
1193
|
tags: ["preview", "general-purpose", "reasoning"],
|
|
1194
|
-
lifecycle: "
|
|
1194
|
+
lifecycle: "production",
|
|
1195
1195
|
aliases: ["openai/gpt-oss-120b"]
|
|
1196
1196
|
},
|
|
1197
1197
|
"groq:deepseek-r1-distill-llama-70b": {
|
|
@@ -1207,7 +1207,7 @@ var models = {
|
|
|
1207
1207
|
costPer1MTokens: 0.99
|
|
1208
1208
|
},
|
|
1209
1209
|
tags: ["general-purpose", "reasoning", "preview"],
|
|
1210
|
-
lifecycle: "
|
|
1210
|
+
lifecycle: "discontinued"
|
|
1211
1211
|
},
|
|
1212
1212
|
"groq:llama-3.3-70b-versatile": {
|
|
1213
1213
|
id: "groq:llama-3.3-70b-versatile",
|
|
@@ -1222,7 +1222,7 @@ var models = {
|
|
|
1222
1222
|
costPer1MTokens: 0.79
|
|
1223
1223
|
},
|
|
1224
1224
|
tags: ["recommended", "general-purpose", "coding"],
|
|
1225
|
-
lifecycle: "
|
|
1225
|
+
lifecycle: "production"
|
|
1226
1226
|
},
|
|
1227
1227
|
"groq:llama-3.2-1b-preview": {
|
|
1228
1228
|
id: "groq:llama-3.2-1b-preview",
|
|
@@ -1297,7 +1297,7 @@ var models = {
|
|
|
1297
1297
|
costPer1MTokens: 0.08
|
|
1298
1298
|
},
|
|
1299
1299
|
tags: ["low-cost", "general-purpose"],
|
|
1300
|
-
lifecycle: "
|
|
1300
|
+
lifecycle: "production"
|
|
1301
1301
|
},
|
|
1302
1302
|
"groq:llama3-8b-8192": {
|
|
1303
1303
|
id: "groq:llama3-8b-8192",
|
|
@@ -1342,7 +1342,7 @@ var models = {
|
|
|
1342
1342
|
costPer1MTokens: 0.2
|
|
1343
1343
|
},
|
|
1344
1344
|
tags: ["low-cost", "general-purpose"],
|
|
1345
|
-
lifecycle: "
|
|
1345
|
+
lifecycle: "discontinued"
|
|
1346
1346
|
},
|
|
1347
1347
|
"xai:grok-code-fast-1": {
|
|
1348
1348
|
id: "xai:grok-code-fast-1",
|
|
@@ -1357,7 +1357,7 @@ var models = {
|
|
|
1357
1357
|
costPer1MTokens: 1.5
|
|
1358
1358
|
},
|
|
1359
1359
|
tags: ["coding", "general-purpose", "low-cost"],
|
|
1360
|
-
lifecycle: "
|
|
1360
|
+
lifecycle: "production"
|
|
1361
1361
|
},
|
|
1362
1362
|
"xai:grok-4-fast-reasoning": {
|
|
1363
1363
|
id: "xai:grok-4-fast-reasoning",
|
|
@@ -1372,7 +1372,7 @@ var models = {
|
|
|
1372
1372
|
costPer1MTokens: 0.5
|
|
1373
1373
|
},
|
|
1374
1374
|
tags: ["reasoning", "recommended", "general-purpose"],
|
|
1375
|
-
lifecycle: "
|
|
1375
|
+
lifecycle: "production"
|
|
1376
1376
|
},
|
|
1377
1377
|
"xai:grok-4-fast-non-reasoning": {
|
|
1378
1378
|
id: "xai:grok-4-fast-non-reasoning",
|
|
@@ -1387,7 +1387,7 @@ var models = {
|
|
|
1387
1387
|
costPer1MTokens: 0.5
|
|
1388
1388
|
},
|
|
1389
1389
|
tags: ["low-cost", "recommended", "general-purpose"],
|
|
1390
|
-
lifecycle: "
|
|
1390
|
+
lifecycle: "production"
|
|
1391
1391
|
},
|
|
1392
1392
|
"xai:grok-4-0709": {
|
|
1393
1393
|
id: "xai:grok-4-0709",
|
|
@@ -1402,7 +1402,7 @@ var models = {
|
|
|
1402
1402
|
costPer1MTokens: 15
|
|
1403
1403
|
},
|
|
1404
1404
|
tags: ["reasoning", "general-purpose"],
|
|
1405
|
-
lifecycle: "
|
|
1405
|
+
lifecycle: "production"
|
|
1406
1406
|
},
|
|
1407
1407
|
"xai:grok-3-mini": {
|
|
1408
1408
|
id: "xai:grok-3-mini",
|
|
@@ -1417,7 +1417,7 @@ var models = {
|
|
|
1417
1417
|
costPer1MTokens: 0.5
|
|
1418
1418
|
},
|
|
1419
1419
|
tags: ["low-cost", "general-purpose"],
|
|
1420
|
-
lifecycle: "
|
|
1420
|
+
lifecycle: "production"
|
|
1421
1421
|
},
|
|
1422
1422
|
"xai:grok-3": {
|
|
1423
1423
|
id: "xai:grok-3",
|
|
@@ -1432,7 +1432,7 @@ var models = {
|
|
|
1432
1432
|
costPer1MTokens: 15
|
|
1433
1433
|
},
|
|
1434
1434
|
tags: ["general-purpose"],
|
|
1435
|
-
lifecycle: "
|
|
1435
|
+
lifecycle: "production"
|
|
1436
1436
|
},
|
|
1437
1437
|
"openrouter:gpt-oss-120b": {
|
|
1438
1438
|
id: "openrouter:gpt-oss-120b",
|
|
@@ -1447,7 +1447,7 @@ var models = {
|
|
|
1447
1447
|
costPer1MTokens: 0.75
|
|
1448
1448
|
},
|
|
1449
1449
|
tags: ["preview", "general-purpose", "reasoning"],
|
|
1450
|
-
lifecycle: "
|
|
1450
|
+
lifecycle: "production"
|
|
1451
1451
|
},
|
|
1452
1452
|
"fireworks-ai:gpt-oss-20b": {
|
|
1453
1453
|
id: "fireworks-ai:gpt-oss-20b",
|
|
@@ -1462,7 +1462,7 @@ var models = {
|
|
|
1462
1462
|
costPer1MTokens: 0.3
|
|
1463
1463
|
},
|
|
1464
1464
|
tags: ["general-purpose", "reasoning", "low-cost"],
|
|
1465
|
-
lifecycle: "
|
|
1465
|
+
lifecycle: "production",
|
|
1466
1466
|
aliases: ["accounts/fireworks/models/gpt-oss-20b"]
|
|
1467
1467
|
},
|
|
1468
1468
|
"fireworks-ai:gpt-oss-120b": {
|
|
@@ -1478,7 +1478,7 @@ var models = {
|
|
|
1478
1478
|
costPer1MTokens: 0.6
|
|
1479
1479
|
},
|
|
1480
1480
|
tags: ["general-purpose", "reasoning"],
|
|
1481
|
-
lifecycle: "
|
|
1481
|
+
lifecycle: "production",
|
|
1482
1482
|
aliases: ["accounts/fireworks/models/gpt-oss-120b"]
|
|
1483
1483
|
},
|
|
1484
1484
|
"fireworks-ai:deepseek-r1-0528": {
|
|
@@ -1494,7 +1494,7 @@ var models = {
|
|
|
1494
1494
|
costPer1MTokens: 8
|
|
1495
1495
|
},
|
|
1496
1496
|
tags: ["recommended", "reasoning", "general-purpose", "coding"],
|
|
1497
|
-
lifecycle: "
|
|
1497
|
+
lifecycle: "production",
|
|
1498
1498
|
aliases: ["accounts/fireworks/models/deepseek-r1-0528"]
|
|
1499
1499
|
},
|
|
1500
1500
|
"fireworks-ai:deepseek-v3-0324": {
|
|
@@ -1510,7 +1510,7 @@ var models = {
|
|
|
1510
1510
|
costPer1MTokens: 0.9
|
|
1511
1511
|
},
|
|
1512
1512
|
tags: ["recommended", "general-purpose"],
|
|
1513
|
-
lifecycle: "
|
|
1513
|
+
lifecycle: "production",
|
|
1514
1514
|
aliases: ["accounts/fireworks/models/deepseek-v3-0324"]
|
|
1515
1515
|
},
|
|
1516
1516
|
"fireworks-ai:llama4-maverick-instruct-basic": {
|
|
@@ -1526,7 +1526,7 @@ var models = {
|
|
|
1526
1526
|
costPer1MTokens: 0.88
|
|
1527
1527
|
},
|
|
1528
1528
|
tags: ["general-purpose", "vision"],
|
|
1529
|
-
lifecycle: "
|
|
1529
|
+
lifecycle: "production",
|
|
1530
1530
|
aliases: ["accounts/fireworks/models/llama4-maverick-instruct-basic"]
|
|
1531
1531
|
},
|
|
1532
1532
|
"fireworks-ai:llama4-scout-instruct-basic": {
|
|
@@ -1542,7 +1542,7 @@ var models = {
|
|
|
1542
1542
|
costPer1MTokens: 0.6
|
|
1543
1543
|
},
|
|
1544
1544
|
tags: ["general-purpose", "vision"],
|
|
1545
|
-
lifecycle: "
|
|
1545
|
+
lifecycle: "production",
|
|
1546
1546
|
aliases: ["accounts/fireworks/models/llama4-scout-instruct-basic"]
|
|
1547
1547
|
},
|
|
1548
1548
|
"fireworks-ai:llama-v3p3-70b-instruct": {
|
|
@@ -1558,7 +1558,7 @@ var models = {
|
|
|
1558
1558
|
costPer1MTokens: 0.9
|
|
1559
1559
|
},
|
|
1560
1560
|
tags: ["general-purpose"],
|
|
1561
|
-
lifecycle: "
|
|
1561
|
+
lifecycle: "production",
|
|
1562
1562
|
aliases: ["accounts/fireworks/models/llama-v3p3-70b-instruct"]
|
|
1563
1563
|
},
|
|
1564
1564
|
"fireworks-ai:deepseek-r1": {
|
|
@@ -1654,7 +1654,7 @@ var models = {
|
|
|
1654
1654
|
costPer1MTokens: 0.2
|
|
1655
1655
|
},
|
|
1656
1656
|
tags: ["low-cost", "general-purpose"],
|
|
1657
|
-
lifecycle: "
|
|
1657
|
+
lifecycle: "production",
|
|
1658
1658
|
aliases: ["accounts/fireworks/models/llama-v3p1-8b-instruct"]
|
|
1659
1659
|
},
|
|
1660
1660
|
"fireworks-ai:mixtral-8x22b-instruct": {
|
|
@@ -1686,7 +1686,7 @@ var models = {
|
|
|
1686
1686
|
costPer1MTokens: 0.5
|
|
1687
1687
|
},
|
|
1688
1688
|
tags: ["low-cost", "general-purpose"],
|
|
1689
|
-
lifecycle: "
|
|
1689
|
+
lifecycle: "production",
|
|
1690
1690
|
aliases: ["accounts/fireworks/models/mixtral-8x7b-instruct"]
|
|
1691
1691
|
},
|
|
1692
1692
|
"fireworks-ai:mythomax-l2-13b": {
|
|
@@ -1702,7 +1702,7 @@ var models = {
|
|
|
1702
1702
|
costPer1MTokens: 0.2
|
|
1703
1703
|
},
|
|
1704
1704
|
tags: ["roleplay", "storytelling", "low-cost"],
|
|
1705
|
-
lifecycle: "
|
|
1705
|
+
lifecycle: "production",
|
|
1706
1706
|
aliases: ["accounts/fireworks/models/mythomax-l2-13b"]
|
|
1707
1707
|
},
|
|
1708
1708
|
"fireworks-ai:gemma2-9b-it": {
|
|
@@ -1735,7 +1735,7 @@ var defaultModel = {
|
|
|
1735
1735
|
maxTokens: 1e6
|
|
1736
1736
|
},
|
|
1737
1737
|
tags: [],
|
|
1738
|
-
lifecycle: "
|
|
1738
|
+
lifecycle: "production"
|
|
1739
1739
|
};
|
|
1740
1740
|
|
|
1741
1741
|
// src/cognitive-v2/index.ts
|
|
@@ -2276,6 +2276,10 @@ var Cognitive = class _Cognitive {
|
|
|
2276
2276
|
if (!this._useBeta || !getCognitiveV2Model(input.model)) {
|
|
2277
2277
|
return this._generateContent(input);
|
|
2278
2278
|
}
|
|
2279
|
+
if (input.systemPrompt) {
|
|
2280
|
+
input.messages.unshift({ role: "system", content: input.systemPrompt });
|
|
2281
|
+
delete input.systemPrompt;
|
|
2282
|
+
}
|
|
2279
2283
|
const betaClient = new CognitiveBeta(this._client.config);
|
|
2280
2284
|
const response = await betaClient.generateText(input);
|
|
2281
2285
|
return {
|