@botpress/cognitive 0.1.46 → 0.1.48

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.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-2025092' | '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.5-flash' | 'google-ai:gemini-2.5-pro' | 'google-ai:models/gemini-2.0-flash' | 'groq:deepseek-r1-distill-llama-70b' | 'groq:gemma2-9b-it' | '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' | '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
+ 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:deepseek-r1-distill-llama-70b' | 'groq:gemma2-9b-it' | '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
package/dist/index.mjs CHANGED
@@ -903,8 +903,8 @@ var models = {
903
903
  tags: ["deprecated", "general-purpose", "low-cost"],
904
904
  lifecycle: "deprecated"
905
905
  },
906
- "anthropic:claude-sonnet-4-5-2025092": {
907
- id: "anthropic:claude-sonnet-4-5-2025092",
906
+ "anthropic:claude-sonnet-4-5-20250929": {
907
+ id: "anthropic:claude-sonnet-4-5-20250929",
908
908
  name: "Claude Sonnet 4.5",
909
909
  description: "Claude Sonnet 4.5 is Anthropic's most advanced Sonnet model to date, optimized for real-world agents and coding workflows. It delivers state-of-the-art performance on coding benchmarks, with improvements across system design, code security, and specification adherence.",
910
910
  input: {
@@ -1071,8 +1071,8 @@ var models = {
1071
1071
  tags: ["recommended", "reasoning", "agents", "general-purpose", "vision", "coding"],
1072
1072
  lifecycle: "live"
1073
1073
  },
1074
- "google-ai:models/gemini-2.0-flash": {
1075
- id: "google-ai:models/gemini-2.0-flash",
1074
+ "google-ai:gemini-2.0-flash": {
1075
+ id: "google-ai:gemini-2.0-flash",
1076
1076
  name: "Gemini 2.0 Flash",
1077
1077
  description: "Next-gen Gemini model with improved capabilities, superior speed, native tool use, multimodal generation, and 1M token context window.",
1078
1078
  input: {
@@ -1084,7 +1084,8 @@ var models = {
1084
1084
  costPer1MTokens: 0.4
1085
1085
  },
1086
1086
  tags: ["low-cost", "general-purpose", "vision"],
1087
- lifecycle: "live"
1087
+ lifecycle: "live",
1088
+ aliases: ["models/gemini-2.0-flash"]
1088
1089
  },
1089
1090
  "cerebras:gpt-oss-120b": {
1090
1091
  id: "cerebras:gpt-oss-120b",
@@ -1573,7 +1574,7 @@ var models = {
1573
1574
  costPer1MTokens: 8
1574
1575
  },
1575
1576
  tags: ["reasoning", "general-purpose", "coding"],
1576
- lifecycle: "deprecated",
1577
+ lifecycle: "discontinued",
1577
1578
  aliases: ["accounts/fireworks/models/deepseek-r1"]
1578
1579
  },
1579
1580
  "fireworks-ai:deepseek-r1-basic": {
@@ -1589,7 +1590,7 @@ var models = {
1589
1590
  costPer1MTokens: 2.19
1590
1591
  },
1591
1592
  tags: ["reasoning", "general-purpose", "coding"],
1592
- lifecycle: "deprecated",
1593
+ lifecycle: "discontinued",
1593
1594
  aliases: ["accounts/fireworks/models/deepseek-r1-basic"]
1594
1595
  },
1595
1596
  "fireworks-ai:deepseek-v3": {
@@ -1605,7 +1606,7 @@ var models = {
1605
1606
  costPer1MTokens: 0.9
1606
1607
  },
1607
1608
  tags: ["deprecated", "general-purpose"],
1608
- lifecycle: "deprecated",
1609
+ lifecycle: "discontinued",
1609
1610
  aliases: ["accounts/fireworks/models/deepseek-v3"]
1610
1611
  },
1611
1612
  "fireworks-ai:llama-v3p1-405b-instruct": {
@@ -1621,7 +1622,7 @@ var models = {
1621
1622
  costPer1MTokens: 3
1622
1623
  },
1623
1624
  tags: ["deprecated", "general-purpose"],
1624
- lifecycle: "deprecated",
1625
+ lifecycle: "discontinued",
1625
1626
  aliases: ["accounts/fireworks/models/llama-v3p1-405b-instruct"]
1626
1627
  },
1627
1628
  "fireworks-ai:llama-v3p1-70b-instruct": {
@@ -1637,7 +1638,7 @@ var models = {
1637
1638
  costPer1MTokens: 0.9
1638
1639
  },
1639
1640
  tags: ["deprecated", "general-purpose"],
1640
- lifecycle: "deprecated",
1641
+ lifecycle: "discontinued",
1641
1642
  aliases: ["accounts/fireworks/models/llama-v3p1-70b-instruct"]
1642
1643
  },
1643
1644
  "fireworks-ai:llama-v3p1-8b-instruct": {
@@ -1669,7 +1670,7 @@ var models = {
1669
1670
  costPer1MTokens: 1.2
1670
1671
  },
1671
1672
  tags: ["deprecated", "general-purpose"],
1672
- lifecycle: "deprecated",
1673
+ lifecycle: "discontinued",
1673
1674
  aliases: ["accounts/fireworks/models/mixtral-8x22b-instruct"]
1674
1675
  },
1675
1676
  "fireworks-ai:mixtral-8x7b-instruct": {
@@ -1717,7 +1718,7 @@ var models = {
1717
1718
  costPer1MTokens: 0.2
1718
1719
  },
1719
1720
  tags: ["deprecated", "low-cost", "general-purpose"],
1720
- lifecycle: "deprecated",
1721
+ lifecycle: "discontinued",
1721
1722
  aliases: ["accounts/fireworks/models/gemma2-9b-it"]
1722
1723
  }
1723
1724
  };
@@ -1904,7 +1905,10 @@ var getCognitiveV2Model = (model) => {
1904
1905
  if (models[model]) {
1905
1906
  return models[model];
1906
1907
  }
1907
- const alias = Object.values(models).find((x) => x.aliases?.includes(model));
1908
+ const [_provider, baseModel] = model.split(":");
1909
+ const alias = Object.values(models).find(
1910
+ (x) => x.aliases ? x.aliases.includes(model) || baseModel && x.aliases.includes(baseModel) : false
1911
+ );
1908
1912
  if (alias) {
1909
1913
  return alias;
1910
1914
  }