@everworker/oneringai 0.4.4 → 0.4.6
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/README.md +25 -12
- package/dist/{ImageModel-OWbA277F.d.ts → ImageModel-1uP-2vk7.d.ts} +8 -2
- package/dist/{ImageModel-Ds5_6sf7.d.cts → ImageModel-BDI37OED.d.cts} +8 -2
- package/dist/capabilities/agents/index.d.cts +1 -1
- package/dist/capabilities/agents/index.d.ts +1 -1
- package/dist/capabilities/images/index.cjs +149 -7
- package/dist/capabilities/images/index.cjs.map +1 -1
- package/dist/capabilities/images/index.d.cts +1 -1
- package/dist/capabilities/images/index.d.ts +1 -1
- package/dist/capabilities/images/index.js +149 -7
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/{index-DmYrHH7d.d.cts → index-DJ-qAK15.d.cts} +25 -5
- package/dist/{index-Dyl6pHfq.d.ts → index-oBtp-8Qn.d.ts} +25 -5
- package/dist/index.cjs +1348 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -13
- package/dist/index.d.ts +47 -13
- package/dist/index.js +1348 -199
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +785 -133
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.d.cts +20 -2
- package/dist/shared/index.d.ts +20 -2
- package/dist/shared/index.js +785 -133
- package/dist/shared/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10299,6 +10299,9 @@ var ToolCatalogRegistry = class {
|
|
|
10299
10299
|
* Get the ConnectorTools module (lazy-loaded, cached).
|
|
10300
10300
|
* Returns null if ConnectorTools is not available.
|
|
10301
10301
|
* Uses false sentinel to prevent retrying after first failure.
|
|
10302
|
+
*
|
|
10303
|
+
* NOTE: The dynamic require() path fails in bundled environments (Meteor, Webpack).
|
|
10304
|
+
* Call setConnectorToolsModule() at app startup to inject the module explicitly.
|
|
10302
10305
|
*/
|
|
10303
10306
|
static getConnectorToolsModule() {
|
|
10304
10307
|
if (this._connectorToolsModule === null) {
|
|
@@ -10310,6 +10313,21 @@ var ToolCatalogRegistry = class {
|
|
|
10310
10313
|
}
|
|
10311
10314
|
return this._connectorToolsModule || null;
|
|
10312
10315
|
}
|
|
10316
|
+
/**
|
|
10317
|
+
* Explicitly set the ConnectorTools module reference.
|
|
10318
|
+
*
|
|
10319
|
+
* Use this in bundled environments (Meteor, Webpack, etc.) where the lazy
|
|
10320
|
+
* require('../../tools/connector/ConnectorTools.js') fails due to path resolution.
|
|
10321
|
+
*
|
|
10322
|
+
* @example
|
|
10323
|
+
* ```typescript
|
|
10324
|
+
* import { ToolCatalogRegistry, ConnectorTools } from '@everworker/oneringai';
|
|
10325
|
+
* ToolCatalogRegistry.setConnectorToolsModule({ ConnectorTools });
|
|
10326
|
+
* ```
|
|
10327
|
+
*/
|
|
10328
|
+
static setConnectorToolsModule(mod) {
|
|
10329
|
+
this._connectorToolsModule = mod;
|
|
10330
|
+
}
|
|
10313
10331
|
// ========================================================================
|
|
10314
10332
|
// Registration
|
|
10315
10333
|
// ========================================================================
|
|
@@ -12581,18 +12599,30 @@ function isVendor(value) {
|
|
|
12581
12599
|
// src/domain/entities/Model.ts
|
|
12582
12600
|
var LLM_MODELS = {
|
|
12583
12601
|
[Vendor.OpenAI]: {
|
|
12602
|
+
// GPT-5.3 Series
|
|
12603
|
+
GPT_5_3_CODEX: "gpt-5.3-codex",
|
|
12604
|
+
GPT_5_3_CHAT: "gpt-5.3-chat-latest",
|
|
12584
12605
|
// GPT-5.2 Series (Current Flagship)
|
|
12585
12606
|
GPT_5_2: "gpt-5.2",
|
|
12586
12607
|
GPT_5_2_PRO: "gpt-5.2-pro",
|
|
12608
|
+
GPT_5_2_CODEX: "gpt-5.2-codex",
|
|
12609
|
+
GPT_5_2_CHAT: "gpt-5.2-chat-latest",
|
|
12610
|
+
// GPT-5.1 Series
|
|
12611
|
+
GPT_5_1: "gpt-5.1",
|
|
12612
|
+
GPT_5_1_CODEX: "gpt-5.1-codex",
|
|
12613
|
+
GPT_5_1_CODEX_MAX: "gpt-5.1-codex-max",
|
|
12614
|
+
GPT_5_1_CODEX_MINI: "gpt-5.1-codex-mini",
|
|
12615
|
+
GPT_5_1_CHAT: "gpt-5.1-chat-latest",
|
|
12587
12616
|
// GPT-5 Series
|
|
12588
12617
|
GPT_5: "gpt-5",
|
|
12589
12618
|
GPT_5_MINI: "gpt-5-mini",
|
|
12590
12619
|
GPT_5_NANO: "gpt-5-nano",
|
|
12620
|
+
GPT_5_CHAT: "gpt-5-chat-latest",
|
|
12591
12621
|
// GPT-4.1 Series
|
|
12592
12622
|
GPT_4_1: "gpt-4.1",
|
|
12593
12623
|
GPT_4_1_MINI: "gpt-4.1-mini",
|
|
12594
12624
|
GPT_4_1_NANO: "gpt-4.1-nano",
|
|
12595
|
-
// GPT-4o Series (Legacy
|
|
12625
|
+
// GPT-4o Series (Legacy)
|
|
12596
12626
|
GPT_4O: "gpt-4o",
|
|
12597
12627
|
GPT_4O_MINI: "gpt-4o-mini",
|
|
12598
12628
|
// Reasoning Models (o-series)
|
|
@@ -12600,18 +12630,26 @@ var LLM_MODELS = {
|
|
|
12600
12630
|
O1: "o1"
|
|
12601
12631
|
},
|
|
12602
12632
|
[Vendor.Anthropic]: {
|
|
12603
|
-
// Claude 4.
|
|
12633
|
+
// Claude 4.6 Series (Current)
|
|
12634
|
+
CLAUDE_OPUS_4_6: "claude-opus-4-6",
|
|
12635
|
+
CLAUDE_SONNET_4_6: "claude-sonnet-4-6",
|
|
12636
|
+
// Claude 4.5 Series
|
|
12604
12637
|
CLAUDE_OPUS_4_5: "claude-opus-4-5-20251101",
|
|
12605
12638
|
CLAUDE_SONNET_4_5: "claude-sonnet-4-5-20250929",
|
|
12606
12639
|
CLAUDE_HAIKU_4_5: "claude-haiku-4-5-20251001",
|
|
12607
12640
|
// Claude 4.x Legacy
|
|
12608
12641
|
CLAUDE_OPUS_4_1: "claude-opus-4-1-20250805",
|
|
12642
|
+
CLAUDE_OPUS_4: "claude-opus-4-20250514",
|
|
12609
12643
|
CLAUDE_SONNET_4: "claude-sonnet-4-20250514",
|
|
12610
12644
|
CLAUDE_SONNET_3_7: "claude-3-7-sonnet-20250219",
|
|
12611
|
-
// Claude 3.x Legacy
|
|
12645
|
+
// Claude 3.x Legacy (Deprecated)
|
|
12612
12646
|
CLAUDE_HAIKU_3: "claude-3-haiku-20240307"
|
|
12613
12647
|
},
|
|
12614
12648
|
[Vendor.Google]: {
|
|
12649
|
+
// Gemini 3.1 Series (Preview)
|
|
12650
|
+
GEMINI_3_1_PRO_PREVIEW: "gemini-3.1-pro-preview",
|
|
12651
|
+
GEMINI_3_1_FLASH_LITE_PREVIEW: "gemini-3.1-flash-lite-preview",
|
|
12652
|
+
GEMINI_3_1_FLASH_IMAGE_PREVIEW: "gemini-3.1-flash-image-preview",
|
|
12615
12653
|
// Gemini 3 Series (Preview)
|
|
12616
12654
|
GEMINI_3_FLASH_PREVIEW: "gemini-3-flash-preview",
|
|
12617
12655
|
GEMINI_3_PRO_PREVIEW: "gemini-3-pro-preview",
|
|
@@ -12643,12 +12681,88 @@ var MODEL_REGISTRY = {
|
|
|
12643
12681
|
// ============================================================================
|
|
12644
12682
|
// OpenAI Models (Verified from platform.openai.com)
|
|
12645
12683
|
// ============================================================================
|
|
12684
|
+
// GPT-5.3 Series
|
|
12685
|
+
"gpt-5.3-codex": {
|
|
12686
|
+
name: "gpt-5.3-codex",
|
|
12687
|
+
provider: Vendor.OpenAI,
|
|
12688
|
+
description: "Latest codex model for coding and agentic tasks. Reasoning.effort: low, medium, high, xhigh",
|
|
12689
|
+
isActive: true,
|
|
12690
|
+
releaseDate: "2026-02-01",
|
|
12691
|
+
knowledgeCutoff: "2025-08-31",
|
|
12692
|
+
features: {
|
|
12693
|
+
reasoning: true,
|
|
12694
|
+
streaming: true,
|
|
12695
|
+
structuredOutput: true,
|
|
12696
|
+
functionCalling: true,
|
|
12697
|
+
fineTuning: false,
|
|
12698
|
+
predictedOutputs: false,
|
|
12699
|
+
realtime: false,
|
|
12700
|
+
vision: true,
|
|
12701
|
+
audio: false,
|
|
12702
|
+
video: false,
|
|
12703
|
+
batchAPI: true,
|
|
12704
|
+
promptCaching: true,
|
|
12705
|
+
parameters: {
|
|
12706
|
+
temperature: false,
|
|
12707
|
+
topP: false,
|
|
12708
|
+
frequencyPenalty: false,
|
|
12709
|
+
presencePenalty: false
|
|
12710
|
+
},
|
|
12711
|
+
input: {
|
|
12712
|
+
tokens: 4e5,
|
|
12713
|
+
text: true,
|
|
12714
|
+
image: true,
|
|
12715
|
+
cpm: 1.75,
|
|
12716
|
+
cpmCached: 0.175
|
|
12717
|
+
},
|
|
12718
|
+
output: {
|
|
12719
|
+
tokens: 128e3,
|
|
12720
|
+
text: true,
|
|
12721
|
+
cpm: 14
|
|
12722
|
+
}
|
|
12723
|
+
}
|
|
12724
|
+
},
|
|
12725
|
+
"gpt-5.3-chat-latest": {
|
|
12726
|
+
name: "gpt-5.3-chat-latest",
|
|
12727
|
+
provider: Vendor.OpenAI,
|
|
12728
|
+
description: "Latest GPT-5.3 chat model for general-purpose use",
|
|
12729
|
+
isActive: true,
|
|
12730
|
+
releaseDate: "2026-02-01",
|
|
12731
|
+
knowledgeCutoff: "2025-08-31",
|
|
12732
|
+
features: {
|
|
12733
|
+
reasoning: false,
|
|
12734
|
+
streaming: true,
|
|
12735
|
+
structuredOutput: true,
|
|
12736
|
+
functionCalling: true,
|
|
12737
|
+
fineTuning: false,
|
|
12738
|
+
predictedOutputs: false,
|
|
12739
|
+
realtime: false,
|
|
12740
|
+
vision: true,
|
|
12741
|
+
audio: false,
|
|
12742
|
+
video: false,
|
|
12743
|
+
batchAPI: true,
|
|
12744
|
+
promptCaching: true,
|
|
12745
|
+
input: {
|
|
12746
|
+
tokens: 128e3,
|
|
12747
|
+
text: true,
|
|
12748
|
+
image: true,
|
|
12749
|
+
cpm: 1.75,
|
|
12750
|
+
cpmCached: 0.175
|
|
12751
|
+
},
|
|
12752
|
+
output: {
|
|
12753
|
+
tokens: 16e3,
|
|
12754
|
+
text: true,
|
|
12755
|
+
cpm: 14
|
|
12756
|
+
}
|
|
12757
|
+
}
|
|
12758
|
+
},
|
|
12646
12759
|
// GPT-5.2 Series (Current Flagship)
|
|
12647
12760
|
"gpt-5.2": {
|
|
12648
12761
|
name: "gpt-5.2",
|
|
12649
12762
|
provider: Vendor.OpenAI,
|
|
12650
12763
|
description: "Flagship model for coding and agentic tasks. Reasoning.effort: none, low, medium, high, xhigh",
|
|
12651
12764
|
isActive: true,
|
|
12765
|
+
preferred: true,
|
|
12652
12766
|
releaseDate: "2025-12-01",
|
|
12653
12767
|
knowledgeCutoff: "2025-08-31",
|
|
12654
12768
|
features: {
|
|
@@ -12674,7 +12788,8 @@ var MODEL_REGISTRY = {
|
|
|
12674
12788
|
tokens: 4e5,
|
|
12675
12789
|
text: true,
|
|
12676
12790
|
image: true,
|
|
12677
|
-
cpm: 1.75
|
|
12791
|
+
cpm: 1.75,
|
|
12792
|
+
cpmCached: 0.175
|
|
12678
12793
|
},
|
|
12679
12794
|
output: {
|
|
12680
12795
|
tokens: 128e3,
|
|
@@ -12693,7 +12808,7 @@ var MODEL_REGISTRY = {
|
|
|
12693
12808
|
features: {
|
|
12694
12809
|
reasoning: true,
|
|
12695
12810
|
streaming: true,
|
|
12696
|
-
structuredOutput:
|
|
12811
|
+
structuredOutput: false,
|
|
12697
12812
|
functionCalling: true,
|
|
12698
12813
|
fineTuning: false,
|
|
12699
12814
|
predictedOutputs: false,
|
|
@@ -12722,13 +12837,88 @@ var MODEL_REGISTRY = {
|
|
|
12722
12837
|
}
|
|
12723
12838
|
}
|
|
12724
12839
|
},
|
|
12725
|
-
|
|
12726
|
-
|
|
12727
|
-
name: "gpt-5",
|
|
12840
|
+
"gpt-5.2-codex": {
|
|
12841
|
+
name: "gpt-5.2-codex",
|
|
12728
12842
|
provider: Vendor.OpenAI,
|
|
12729
|
-
description: "
|
|
12843
|
+
description: "GPT-5.2 codex for coding and agentic tasks. Reasoning.effort: low, medium, high, xhigh",
|
|
12730
12844
|
isActive: true,
|
|
12731
|
-
|
|
12845
|
+
preferred: true,
|
|
12846
|
+
releaseDate: "2025-12-01",
|
|
12847
|
+
knowledgeCutoff: "2025-08-31",
|
|
12848
|
+
features: {
|
|
12849
|
+
reasoning: true,
|
|
12850
|
+
streaming: true,
|
|
12851
|
+
structuredOutput: true,
|
|
12852
|
+
functionCalling: true,
|
|
12853
|
+
fineTuning: false,
|
|
12854
|
+
predictedOutputs: false,
|
|
12855
|
+
realtime: false,
|
|
12856
|
+
vision: true,
|
|
12857
|
+
audio: false,
|
|
12858
|
+
video: false,
|
|
12859
|
+
batchAPI: true,
|
|
12860
|
+
promptCaching: true,
|
|
12861
|
+
parameters: {
|
|
12862
|
+
temperature: false,
|
|
12863
|
+
topP: false,
|
|
12864
|
+
frequencyPenalty: false,
|
|
12865
|
+
presencePenalty: false
|
|
12866
|
+
},
|
|
12867
|
+
input: {
|
|
12868
|
+
tokens: 4e5,
|
|
12869
|
+
text: true,
|
|
12870
|
+
image: true,
|
|
12871
|
+
cpm: 1.75,
|
|
12872
|
+
cpmCached: 0.175
|
|
12873
|
+
},
|
|
12874
|
+
output: {
|
|
12875
|
+
tokens: 128e3,
|
|
12876
|
+
text: true,
|
|
12877
|
+
cpm: 14
|
|
12878
|
+
}
|
|
12879
|
+
}
|
|
12880
|
+
},
|
|
12881
|
+
"gpt-5.2-chat-latest": {
|
|
12882
|
+
name: "gpt-5.2-chat-latest",
|
|
12883
|
+
provider: Vendor.OpenAI,
|
|
12884
|
+
description: "GPT-5.2 chat model for general-purpose use",
|
|
12885
|
+
isActive: true,
|
|
12886
|
+
releaseDate: "2025-12-01",
|
|
12887
|
+
knowledgeCutoff: "2025-08-31",
|
|
12888
|
+
features: {
|
|
12889
|
+
reasoning: false,
|
|
12890
|
+
streaming: true,
|
|
12891
|
+
structuredOutput: true,
|
|
12892
|
+
functionCalling: true,
|
|
12893
|
+
fineTuning: false,
|
|
12894
|
+
predictedOutputs: false,
|
|
12895
|
+
realtime: false,
|
|
12896
|
+
vision: true,
|
|
12897
|
+
audio: false,
|
|
12898
|
+
video: false,
|
|
12899
|
+
batchAPI: true,
|
|
12900
|
+
promptCaching: true,
|
|
12901
|
+
input: {
|
|
12902
|
+
tokens: 128e3,
|
|
12903
|
+
text: true,
|
|
12904
|
+
image: true,
|
|
12905
|
+
cpm: 1.75,
|
|
12906
|
+
cpmCached: 0.175
|
|
12907
|
+
},
|
|
12908
|
+
output: {
|
|
12909
|
+
tokens: 16e3,
|
|
12910
|
+
text: true,
|
|
12911
|
+
cpm: 14
|
|
12912
|
+
}
|
|
12913
|
+
}
|
|
12914
|
+
},
|
|
12915
|
+
// GPT-5.1 Series
|
|
12916
|
+
"gpt-5.1": {
|
|
12917
|
+
name: "gpt-5.1",
|
|
12918
|
+
provider: Vendor.OpenAI,
|
|
12919
|
+
description: "Intelligent reasoning model for coding and agentic tasks. Reasoning.effort: none, low, medium, high",
|
|
12920
|
+
isActive: true,
|
|
12921
|
+
releaseDate: "2025-10-01",
|
|
12732
12922
|
knowledgeCutoff: "2024-09-30",
|
|
12733
12923
|
features: {
|
|
12734
12924
|
reasoning: true,
|
|
@@ -12753,7 +12943,8 @@ var MODEL_REGISTRY = {
|
|
|
12753
12943
|
tokens: 4e5,
|
|
12754
12944
|
text: true,
|
|
12755
12945
|
image: true,
|
|
12756
|
-
cpm: 1.25
|
|
12946
|
+
cpm: 1.25,
|
|
12947
|
+
cpmCached: 0.125
|
|
12757
12948
|
},
|
|
12758
12949
|
output: {
|
|
12759
12950
|
tokens: 128e3,
|
|
@@ -12762,13 +12953,13 @@ var MODEL_REGISTRY = {
|
|
|
12762
12953
|
}
|
|
12763
12954
|
}
|
|
12764
12955
|
},
|
|
12765
|
-
"gpt-5-
|
|
12766
|
-
name: "gpt-5-
|
|
12956
|
+
"gpt-5.1-codex": {
|
|
12957
|
+
name: "gpt-5.1-codex",
|
|
12767
12958
|
provider: Vendor.OpenAI,
|
|
12768
|
-
description: "
|
|
12959
|
+
description: "GPT-5.1 codex for coding and agentic tasks with reasoning",
|
|
12769
12960
|
isActive: true,
|
|
12770
|
-
releaseDate: "2025-
|
|
12771
|
-
knowledgeCutoff: "2024-
|
|
12961
|
+
releaseDate: "2025-10-01",
|
|
12962
|
+
knowledgeCutoff: "2024-09-30",
|
|
12772
12963
|
features: {
|
|
12773
12964
|
reasoning: true,
|
|
12774
12965
|
streaming: true,
|
|
@@ -12792,7 +12983,88 @@ var MODEL_REGISTRY = {
|
|
|
12792
12983
|
tokens: 4e5,
|
|
12793
12984
|
text: true,
|
|
12794
12985
|
image: true,
|
|
12795
|
-
cpm:
|
|
12986
|
+
cpm: 1.25,
|
|
12987
|
+
cpmCached: 0.125
|
|
12988
|
+
},
|
|
12989
|
+
output: {
|
|
12990
|
+
tokens: 128e3,
|
|
12991
|
+
text: true,
|
|
12992
|
+
cpm: 10
|
|
12993
|
+
}
|
|
12994
|
+
}
|
|
12995
|
+
},
|
|
12996
|
+
"gpt-5.1-codex-max": {
|
|
12997
|
+
name: "gpt-5.1-codex-max",
|
|
12998
|
+
provider: Vendor.OpenAI,
|
|
12999
|
+
description: "GPT-5.1 codex max for maximum reasoning depth on coding tasks",
|
|
13000
|
+
isActive: true,
|
|
13001
|
+
releaseDate: "2025-10-01",
|
|
13002
|
+
knowledgeCutoff: "2024-09-30",
|
|
13003
|
+
features: {
|
|
13004
|
+
reasoning: true,
|
|
13005
|
+
streaming: true,
|
|
13006
|
+
structuredOutput: true,
|
|
13007
|
+
functionCalling: true,
|
|
13008
|
+
fineTuning: false,
|
|
13009
|
+
predictedOutputs: false,
|
|
13010
|
+
realtime: false,
|
|
13011
|
+
vision: true,
|
|
13012
|
+
audio: false,
|
|
13013
|
+
video: false,
|
|
13014
|
+
batchAPI: true,
|
|
13015
|
+
promptCaching: true,
|
|
13016
|
+
parameters: {
|
|
13017
|
+
temperature: false,
|
|
13018
|
+
topP: false,
|
|
13019
|
+
frequencyPenalty: false,
|
|
13020
|
+
presencePenalty: false
|
|
13021
|
+
},
|
|
13022
|
+
input: {
|
|
13023
|
+
tokens: 4e5,
|
|
13024
|
+
text: true,
|
|
13025
|
+
image: true,
|
|
13026
|
+
cpm: 1.25,
|
|
13027
|
+
cpmCached: 0.125
|
|
13028
|
+
},
|
|
13029
|
+
output: {
|
|
13030
|
+
tokens: 128e3,
|
|
13031
|
+
text: true,
|
|
13032
|
+
cpm: 10
|
|
13033
|
+
}
|
|
13034
|
+
}
|
|
13035
|
+
},
|
|
13036
|
+
"gpt-5.1-codex-mini": {
|
|
13037
|
+
name: "gpt-5.1-codex-mini",
|
|
13038
|
+
provider: Vendor.OpenAI,
|
|
13039
|
+
description: "GPT-5.1 codex mini for cost-efficient coding tasks",
|
|
13040
|
+
isActive: true,
|
|
13041
|
+
releaseDate: "2025-10-01",
|
|
13042
|
+
knowledgeCutoff: "2024-09-30",
|
|
13043
|
+
features: {
|
|
13044
|
+
reasoning: true,
|
|
13045
|
+
streaming: true,
|
|
13046
|
+
structuredOutput: true,
|
|
13047
|
+
functionCalling: true,
|
|
13048
|
+
fineTuning: false,
|
|
13049
|
+
predictedOutputs: false,
|
|
13050
|
+
realtime: false,
|
|
13051
|
+
vision: true,
|
|
13052
|
+
audio: false,
|
|
13053
|
+
video: false,
|
|
13054
|
+
batchAPI: true,
|
|
13055
|
+
promptCaching: true,
|
|
13056
|
+
parameters: {
|
|
13057
|
+
temperature: false,
|
|
13058
|
+
topP: false,
|
|
13059
|
+
frequencyPenalty: false,
|
|
13060
|
+
presencePenalty: false
|
|
13061
|
+
},
|
|
13062
|
+
input: {
|
|
13063
|
+
tokens: 4e5,
|
|
13064
|
+
text: true,
|
|
13065
|
+
image: true,
|
|
13066
|
+
cpm: 0.25,
|
|
13067
|
+
cpmCached: 0.025
|
|
12796
13068
|
},
|
|
12797
13069
|
output: {
|
|
12798
13070
|
tokens: 128e3,
|
|
@@ -12801,13 +13073,48 @@ var MODEL_REGISTRY = {
|
|
|
12801
13073
|
}
|
|
12802
13074
|
}
|
|
12803
13075
|
},
|
|
12804
|
-
"gpt-5-
|
|
12805
|
-
name: "gpt-5-
|
|
13076
|
+
"gpt-5.1-chat-latest": {
|
|
13077
|
+
name: "gpt-5.1-chat-latest",
|
|
12806
13078
|
provider: Vendor.OpenAI,
|
|
12807
|
-
description: "
|
|
13079
|
+
description: "GPT-5.1 chat model for general-purpose use",
|
|
13080
|
+
isActive: true,
|
|
13081
|
+
releaseDate: "2025-10-01",
|
|
13082
|
+
knowledgeCutoff: "2024-09-30",
|
|
13083
|
+
features: {
|
|
13084
|
+
reasoning: false,
|
|
13085
|
+
streaming: true,
|
|
13086
|
+
structuredOutput: true,
|
|
13087
|
+
functionCalling: true,
|
|
13088
|
+
fineTuning: false,
|
|
13089
|
+
predictedOutputs: false,
|
|
13090
|
+
realtime: false,
|
|
13091
|
+
vision: true,
|
|
13092
|
+
audio: false,
|
|
13093
|
+
video: false,
|
|
13094
|
+
batchAPI: true,
|
|
13095
|
+
promptCaching: true,
|
|
13096
|
+
input: {
|
|
13097
|
+
tokens: 128e3,
|
|
13098
|
+
text: true,
|
|
13099
|
+
image: true,
|
|
13100
|
+
cpm: 1.25,
|
|
13101
|
+
cpmCached: 0.125
|
|
13102
|
+
},
|
|
13103
|
+
output: {
|
|
13104
|
+
tokens: 16e3,
|
|
13105
|
+
text: true,
|
|
13106
|
+
cpm: 10
|
|
13107
|
+
}
|
|
13108
|
+
}
|
|
13109
|
+
},
|
|
13110
|
+
// GPT-5 Series
|
|
13111
|
+
"gpt-5": {
|
|
13112
|
+
name: "gpt-5",
|
|
13113
|
+
provider: Vendor.OpenAI,
|
|
13114
|
+
description: "Previous intelligent reasoning model for coding and agentic tasks. Reasoning.effort: minimal, low, medium, high",
|
|
12808
13115
|
isActive: true,
|
|
12809
13116
|
releaseDate: "2025-08-01",
|
|
12810
|
-
knowledgeCutoff: "2024-
|
|
13117
|
+
knowledgeCutoff: "2024-09-30",
|
|
12811
13118
|
features: {
|
|
12812
13119
|
reasoning: true,
|
|
12813
13120
|
streaming: true,
|
|
@@ -12831,7 +13138,88 @@ var MODEL_REGISTRY = {
|
|
|
12831
13138
|
tokens: 4e5,
|
|
12832
13139
|
text: true,
|
|
12833
13140
|
image: true,
|
|
12834
|
-
cpm:
|
|
13141
|
+
cpm: 1.25,
|
|
13142
|
+
cpmCached: 0.125
|
|
13143
|
+
},
|
|
13144
|
+
output: {
|
|
13145
|
+
tokens: 128e3,
|
|
13146
|
+
text: true,
|
|
13147
|
+
cpm: 10
|
|
13148
|
+
}
|
|
13149
|
+
}
|
|
13150
|
+
},
|
|
13151
|
+
"gpt-5-mini": {
|
|
13152
|
+
name: "gpt-5-mini",
|
|
13153
|
+
provider: Vendor.OpenAI,
|
|
13154
|
+
description: "Faster, cost-efficient version of GPT-5 for well-defined tasks and precise prompts",
|
|
13155
|
+
isActive: true,
|
|
13156
|
+
releaseDate: "2025-08-01",
|
|
13157
|
+
knowledgeCutoff: "2024-05-31",
|
|
13158
|
+
features: {
|
|
13159
|
+
reasoning: true,
|
|
13160
|
+
streaming: true,
|
|
13161
|
+
structuredOutput: true,
|
|
13162
|
+
functionCalling: true,
|
|
13163
|
+
fineTuning: false,
|
|
13164
|
+
predictedOutputs: false,
|
|
13165
|
+
realtime: false,
|
|
13166
|
+
vision: true,
|
|
13167
|
+
audio: false,
|
|
13168
|
+
video: false,
|
|
13169
|
+
batchAPI: true,
|
|
13170
|
+
promptCaching: true,
|
|
13171
|
+
parameters: {
|
|
13172
|
+
temperature: false,
|
|
13173
|
+
topP: false,
|
|
13174
|
+
frequencyPenalty: false,
|
|
13175
|
+
presencePenalty: false
|
|
13176
|
+
},
|
|
13177
|
+
input: {
|
|
13178
|
+
tokens: 4e5,
|
|
13179
|
+
text: true,
|
|
13180
|
+
image: true,
|
|
13181
|
+
cpm: 0.25,
|
|
13182
|
+
cpmCached: 0.025
|
|
13183
|
+
},
|
|
13184
|
+
output: {
|
|
13185
|
+
tokens: 128e3,
|
|
13186
|
+
text: true,
|
|
13187
|
+
cpm: 2
|
|
13188
|
+
}
|
|
13189
|
+
}
|
|
13190
|
+
},
|
|
13191
|
+
"gpt-5-nano": {
|
|
13192
|
+
name: "gpt-5-nano",
|
|
13193
|
+
provider: Vendor.OpenAI,
|
|
13194
|
+
description: "Fastest, most cost-efficient GPT-5. Great for summarization and classification tasks",
|
|
13195
|
+
isActive: true,
|
|
13196
|
+
releaseDate: "2025-08-01",
|
|
13197
|
+
knowledgeCutoff: "2024-05-31",
|
|
13198
|
+
features: {
|
|
13199
|
+
reasoning: true,
|
|
13200
|
+
streaming: true,
|
|
13201
|
+
structuredOutput: true,
|
|
13202
|
+
functionCalling: true,
|
|
13203
|
+
fineTuning: false,
|
|
13204
|
+
predictedOutputs: false,
|
|
13205
|
+
realtime: false,
|
|
13206
|
+
vision: true,
|
|
13207
|
+
audio: false,
|
|
13208
|
+
video: false,
|
|
13209
|
+
batchAPI: true,
|
|
13210
|
+
promptCaching: true,
|
|
13211
|
+
parameters: {
|
|
13212
|
+
temperature: false,
|
|
13213
|
+
topP: false,
|
|
13214
|
+
frequencyPenalty: false,
|
|
13215
|
+
presencePenalty: false
|
|
13216
|
+
},
|
|
13217
|
+
input: {
|
|
13218
|
+
tokens: 4e5,
|
|
13219
|
+
text: true,
|
|
13220
|
+
image: true,
|
|
13221
|
+
cpm: 0.05,
|
|
13222
|
+
cpmCached: 5e-3
|
|
12835
13223
|
},
|
|
12836
13224
|
output: {
|
|
12837
13225
|
tokens: 128e3,
|
|
@@ -12840,6 +13228,40 @@ var MODEL_REGISTRY = {
|
|
|
12840
13228
|
}
|
|
12841
13229
|
}
|
|
12842
13230
|
},
|
|
13231
|
+
"gpt-5-chat-latest": {
|
|
13232
|
+
name: "gpt-5-chat-latest",
|
|
13233
|
+
provider: Vendor.OpenAI,
|
|
13234
|
+
description: "GPT-5 chat model for general-purpose use",
|
|
13235
|
+
isActive: true,
|
|
13236
|
+
releaseDate: "2025-08-01",
|
|
13237
|
+
knowledgeCutoff: "2024-09-30",
|
|
13238
|
+
features: {
|
|
13239
|
+
reasoning: false,
|
|
13240
|
+
streaming: true,
|
|
13241
|
+
structuredOutput: true,
|
|
13242
|
+
functionCalling: true,
|
|
13243
|
+
fineTuning: false,
|
|
13244
|
+
predictedOutputs: false,
|
|
13245
|
+
realtime: false,
|
|
13246
|
+
vision: true,
|
|
13247
|
+
audio: false,
|
|
13248
|
+
video: false,
|
|
13249
|
+
batchAPI: true,
|
|
13250
|
+
promptCaching: true,
|
|
13251
|
+
input: {
|
|
13252
|
+
tokens: 128e3,
|
|
13253
|
+
text: true,
|
|
13254
|
+
image: true,
|
|
13255
|
+
cpm: 1.25,
|
|
13256
|
+
cpmCached: 0.125
|
|
13257
|
+
},
|
|
13258
|
+
output: {
|
|
13259
|
+
tokens: 16e3,
|
|
13260
|
+
text: true,
|
|
13261
|
+
cpm: 10
|
|
13262
|
+
}
|
|
13263
|
+
}
|
|
13264
|
+
},
|
|
12843
13265
|
// GPT-4.1 Series
|
|
12844
13266
|
"gpt-4.1": {
|
|
12845
13267
|
name: "gpt-4.1",
|
|
@@ -12847,7 +13269,7 @@ var MODEL_REGISTRY = {
|
|
|
12847
13269
|
description: "GPT-4.1 specialized for coding with 1M token context window",
|
|
12848
13270
|
isActive: true,
|
|
12849
13271
|
releaseDate: "2025-04-14",
|
|
12850
|
-
knowledgeCutoff: "
|
|
13272
|
+
knowledgeCutoff: "2024-06-01",
|
|
12851
13273
|
features: {
|
|
12852
13274
|
reasoning: false,
|
|
12853
13275
|
streaming: true,
|
|
@@ -12865,7 +13287,8 @@ var MODEL_REGISTRY = {
|
|
|
12865
13287
|
tokens: 1e6,
|
|
12866
13288
|
text: true,
|
|
12867
13289
|
image: true,
|
|
12868
|
-
cpm: 2
|
|
13290
|
+
cpm: 2,
|
|
13291
|
+
cpmCached: 0.5
|
|
12869
13292
|
},
|
|
12870
13293
|
output: {
|
|
12871
13294
|
tokens: 32768,
|
|
@@ -12880,7 +13303,7 @@ var MODEL_REGISTRY = {
|
|
|
12880
13303
|
description: "Efficient GPT-4.1 model, beats GPT-4o in many benchmarks at 83% lower cost",
|
|
12881
13304
|
isActive: true,
|
|
12882
13305
|
releaseDate: "2025-04-14",
|
|
12883
|
-
knowledgeCutoff: "
|
|
13306
|
+
knowledgeCutoff: "2024-06-01",
|
|
12884
13307
|
features: {
|
|
12885
13308
|
reasoning: false,
|
|
12886
13309
|
streaming: true,
|
|
@@ -12898,7 +13321,8 @@ var MODEL_REGISTRY = {
|
|
|
12898
13321
|
tokens: 1e6,
|
|
12899
13322
|
text: true,
|
|
12900
13323
|
image: true,
|
|
12901
|
-
cpm: 0.4
|
|
13324
|
+
cpm: 0.4,
|
|
13325
|
+
cpmCached: 0.1
|
|
12902
13326
|
},
|
|
12903
13327
|
output: {
|
|
12904
13328
|
tokens: 16384,
|
|
@@ -12913,7 +13337,7 @@ var MODEL_REGISTRY = {
|
|
|
12913
13337
|
description: "Fastest and cheapest model with 1M context. 80.1% MMLU, ideal for classification/autocompletion",
|
|
12914
13338
|
isActive: true,
|
|
12915
13339
|
releaseDate: "2025-04-14",
|
|
12916
|
-
knowledgeCutoff: "
|
|
13340
|
+
knowledgeCutoff: "2024-06-01",
|
|
12917
13341
|
features: {
|
|
12918
13342
|
reasoning: false,
|
|
12919
13343
|
streaming: true,
|
|
@@ -12931,7 +13355,8 @@ var MODEL_REGISTRY = {
|
|
|
12931
13355
|
tokens: 1e6,
|
|
12932
13356
|
text: true,
|
|
12933
13357
|
image: true,
|
|
12934
|
-
cpm: 0.1
|
|
13358
|
+
cpm: 0.1,
|
|
13359
|
+
cpmCached: 0.025
|
|
12935
13360
|
},
|
|
12936
13361
|
output: {
|
|
12937
13362
|
tokens: 16384,
|
|
@@ -12940,14 +13365,14 @@ var MODEL_REGISTRY = {
|
|
|
12940
13365
|
}
|
|
12941
13366
|
}
|
|
12942
13367
|
},
|
|
12943
|
-
// GPT-4o Series (Legacy
|
|
13368
|
+
// GPT-4o Series (Legacy)
|
|
12944
13369
|
"gpt-4o": {
|
|
12945
13370
|
name: "gpt-4o",
|
|
12946
13371
|
provider: Vendor.OpenAI,
|
|
12947
|
-
description: "Versatile omni model
|
|
13372
|
+
description: "Versatile omni model. Legacy but still available",
|
|
12948
13373
|
isActive: true,
|
|
12949
13374
|
releaseDate: "2024-05-13",
|
|
12950
|
-
knowledgeCutoff: "
|
|
13375
|
+
knowledgeCutoff: "2023-10-01",
|
|
12951
13376
|
features: {
|
|
12952
13377
|
reasoning: false,
|
|
12953
13378
|
streaming: true,
|
|
@@ -12957,7 +13382,7 @@ var MODEL_REGISTRY = {
|
|
|
12957
13382
|
predictedOutputs: true,
|
|
12958
13383
|
realtime: true,
|
|
12959
13384
|
vision: true,
|
|
12960
|
-
audio:
|
|
13385
|
+
audio: false,
|
|
12961
13386
|
video: false,
|
|
12962
13387
|
batchAPI: true,
|
|
12963
13388
|
promptCaching: true,
|
|
@@ -12965,13 +13390,12 @@ var MODEL_REGISTRY = {
|
|
|
12965
13390
|
tokens: 128e3,
|
|
12966
13391
|
text: true,
|
|
12967
13392
|
image: true,
|
|
12968
|
-
|
|
12969
|
-
|
|
13393
|
+
cpm: 2.5,
|
|
13394
|
+
cpmCached: 1.25
|
|
12970
13395
|
},
|
|
12971
13396
|
output: {
|
|
12972
13397
|
tokens: 16384,
|
|
12973
13398
|
text: true,
|
|
12974
|
-
audio: true,
|
|
12975
13399
|
cpm: 10
|
|
12976
13400
|
}
|
|
12977
13401
|
}
|
|
@@ -12979,10 +13403,10 @@ var MODEL_REGISTRY = {
|
|
|
12979
13403
|
"gpt-4o-mini": {
|
|
12980
13404
|
name: "gpt-4o-mini",
|
|
12981
13405
|
provider: Vendor.OpenAI,
|
|
12982
|
-
description: "Fast, affordable omni model
|
|
13406
|
+
description: "Fast, affordable omni model",
|
|
12983
13407
|
isActive: true,
|
|
12984
13408
|
releaseDate: "2024-07-18",
|
|
12985
|
-
knowledgeCutoff: "
|
|
13409
|
+
knowledgeCutoff: "2023-10-01",
|
|
12986
13410
|
features: {
|
|
12987
13411
|
reasoning: false,
|
|
12988
13412
|
streaming: true,
|
|
@@ -12992,7 +13416,7 @@ var MODEL_REGISTRY = {
|
|
|
12992
13416
|
predictedOutputs: false,
|
|
12993
13417
|
realtime: true,
|
|
12994
13418
|
vision: true,
|
|
12995
|
-
audio:
|
|
13419
|
+
audio: false,
|
|
12996
13420
|
video: false,
|
|
12997
13421
|
batchAPI: true,
|
|
12998
13422
|
promptCaching: true,
|
|
@@ -13000,13 +13424,12 @@ var MODEL_REGISTRY = {
|
|
|
13000
13424
|
tokens: 128e3,
|
|
13001
13425
|
text: true,
|
|
13002
13426
|
image: true,
|
|
13003
|
-
|
|
13004
|
-
|
|
13427
|
+
cpm: 0.15,
|
|
13428
|
+
cpmCached: 0.075
|
|
13005
13429
|
},
|
|
13006
13430
|
output: {
|
|
13007
13431
|
tokens: 16384,
|
|
13008
13432
|
text: true,
|
|
13009
|
-
audio: true,
|
|
13010
13433
|
cpm: 0.6
|
|
13011
13434
|
}
|
|
13012
13435
|
}
|
|
@@ -13018,7 +13441,7 @@ var MODEL_REGISTRY = {
|
|
|
13018
13441
|
description: "Fast reasoning model tailored for coding, math, and science",
|
|
13019
13442
|
isActive: true,
|
|
13020
13443
|
releaseDate: "2025-01-31",
|
|
13021
|
-
knowledgeCutoff: "
|
|
13444
|
+
knowledgeCutoff: "2023-10-01",
|
|
13022
13445
|
features: {
|
|
13023
13446
|
reasoning: true,
|
|
13024
13447
|
streaming: true,
|
|
@@ -13027,11 +13450,11 @@ var MODEL_REGISTRY = {
|
|
|
13027
13450
|
fineTuning: false,
|
|
13028
13451
|
predictedOutputs: false,
|
|
13029
13452
|
realtime: false,
|
|
13030
|
-
vision:
|
|
13453
|
+
vision: false,
|
|
13031
13454
|
audio: false,
|
|
13032
13455
|
video: false,
|
|
13033
13456
|
batchAPI: true,
|
|
13034
|
-
promptCaching:
|
|
13457
|
+
promptCaching: true,
|
|
13035
13458
|
parameters: {
|
|
13036
13459
|
temperature: false,
|
|
13037
13460
|
topP: false,
|
|
@@ -13041,8 +13464,8 @@ var MODEL_REGISTRY = {
|
|
|
13041
13464
|
input: {
|
|
13042
13465
|
tokens: 2e5,
|
|
13043
13466
|
text: true,
|
|
13044
|
-
|
|
13045
|
-
|
|
13467
|
+
cpm: 1.1,
|
|
13468
|
+
cpmCached: 0.55
|
|
13046
13469
|
},
|
|
13047
13470
|
output: {
|
|
13048
13471
|
tokens: 1e5,
|
|
@@ -13057,7 +13480,7 @@ var MODEL_REGISTRY = {
|
|
|
13057
13480
|
description: "Advanced reasoning model for complex problems",
|
|
13058
13481
|
isActive: true,
|
|
13059
13482
|
releaseDate: "2024-12-17",
|
|
13060
|
-
knowledgeCutoff: "
|
|
13483
|
+
knowledgeCutoff: "2023-10-01",
|
|
13061
13484
|
features: {
|
|
13062
13485
|
reasoning: true,
|
|
13063
13486
|
streaming: true,
|
|
@@ -13070,7 +13493,7 @@ var MODEL_REGISTRY = {
|
|
|
13070
13493
|
audio: false,
|
|
13071
13494
|
video: false,
|
|
13072
13495
|
batchAPI: true,
|
|
13073
|
-
promptCaching:
|
|
13496
|
+
promptCaching: true,
|
|
13074
13497
|
parameters: {
|
|
13075
13498
|
temperature: false,
|
|
13076
13499
|
topP: false,
|
|
@@ -13081,7 +13504,8 @@ var MODEL_REGISTRY = {
|
|
|
13081
13504
|
tokens: 2e5,
|
|
13082
13505
|
text: true,
|
|
13083
13506
|
image: true,
|
|
13084
|
-
cpm: 15
|
|
13507
|
+
cpm: 15,
|
|
13508
|
+
cpmCached: 7.5
|
|
13085
13509
|
},
|
|
13086
13510
|
output: {
|
|
13087
13511
|
tokens: 1e5,
|
|
@@ -13091,13 +13515,88 @@ var MODEL_REGISTRY = {
|
|
|
13091
13515
|
}
|
|
13092
13516
|
},
|
|
13093
13517
|
// ============================================================================
|
|
13094
|
-
// Anthropic Models (Verified from platform.claude.com)
|
|
13518
|
+
// Anthropic Models (Verified from platform.claude.com - March 2026)
|
|
13095
13519
|
// ============================================================================
|
|
13096
|
-
// Claude 4.
|
|
13520
|
+
// Claude 4.6 Series (Current)
|
|
13521
|
+
"claude-opus-4-6": {
|
|
13522
|
+
name: "claude-opus-4-6",
|
|
13523
|
+
provider: Vendor.Anthropic,
|
|
13524
|
+
description: "The most intelligent model for building agents and coding. 128K output, adaptive thinking",
|
|
13525
|
+
isActive: true,
|
|
13526
|
+
preferred: true,
|
|
13527
|
+
releaseDate: "2026-02-01",
|
|
13528
|
+
knowledgeCutoff: "2025-05-01",
|
|
13529
|
+
features: {
|
|
13530
|
+
reasoning: false,
|
|
13531
|
+
streaming: true,
|
|
13532
|
+
structuredOutput: true,
|
|
13533
|
+
functionCalling: true,
|
|
13534
|
+
fineTuning: false,
|
|
13535
|
+
predictedOutputs: false,
|
|
13536
|
+
realtime: false,
|
|
13537
|
+
vision: true,
|
|
13538
|
+
audio: false,
|
|
13539
|
+
video: false,
|
|
13540
|
+
extendedThinking: true,
|
|
13541
|
+
batchAPI: true,
|
|
13542
|
+
promptCaching: true,
|
|
13543
|
+
input: {
|
|
13544
|
+
tokens: 2e5,
|
|
13545
|
+
// 1M with beta header
|
|
13546
|
+
text: true,
|
|
13547
|
+
image: true,
|
|
13548
|
+
cpm: 5,
|
|
13549
|
+
cpmCached: 0.5
|
|
13550
|
+
},
|
|
13551
|
+
output: {
|
|
13552
|
+
tokens: 128e3,
|
|
13553
|
+
text: true,
|
|
13554
|
+
cpm: 25
|
|
13555
|
+
}
|
|
13556
|
+
}
|
|
13557
|
+
},
|
|
13558
|
+
"claude-sonnet-4-6": {
|
|
13559
|
+
name: "claude-sonnet-4-6",
|
|
13560
|
+
provider: Vendor.Anthropic,
|
|
13561
|
+
description: "Best combination of speed and intelligence. Adaptive thinking, 1M context beta",
|
|
13562
|
+
isActive: true,
|
|
13563
|
+
preferred: true,
|
|
13564
|
+
releaseDate: "2026-02-01",
|
|
13565
|
+
knowledgeCutoff: "2025-08-01",
|
|
13566
|
+
features: {
|
|
13567
|
+
reasoning: false,
|
|
13568
|
+
streaming: true,
|
|
13569
|
+
structuredOutput: true,
|
|
13570
|
+
functionCalling: true,
|
|
13571
|
+
fineTuning: false,
|
|
13572
|
+
predictedOutputs: false,
|
|
13573
|
+
realtime: false,
|
|
13574
|
+
vision: true,
|
|
13575
|
+
audio: false,
|
|
13576
|
+
video: false,
|
|
13577
|
+
extendedThinking: true,
|
|
13578
|
+
batchAPI: true,
|
|
13579
|
+
promptCaching: true,
|
|
13580
|
+
input: {
|
|
13581
|
+
tokens: 2e5,
|
|
13582
|
+
// 1M with beta header
|
|
13583
|
+
text: true,
|
|
13584
|
+
image: true,
|
|
13585
|
+
cpm: 3,
|
|
13586
|
+
cpmCached: 0.3
|
|
13587
|
+
},
|
|
13588
|
+
output: {
|
|
13589
|
+
tokens: 64e3,
|
|
13590
|
+
text: true,
|
|
13591
|
+
cpm: 15
|
|
13592
|
+
}
|
|
13593
|
+
}
|
|
13594
|
+
},
|
|
13595
|
+
// Claude 4.5 Series
|
|
13097
13596
|
"claude-opus-4-5-20251101": {
|
|
13098
13597
|
name: "claude-opus-4-5-20251101",
|
|
13099
13598
|
provider: Vendor.Anthropic,
|
|
13100
|
-
description: "Premium model combining maximum intelligence with practical performance",
|
|
13599
|
+
description: "Legacy Opus 4.5. Premium model combining maximum intelligence with practical performance",
|
|
13101
13600
|
isActive: true,
|
|
13102
13601
|
releaseDate: "2025-11-01",
|
|
13103
13602
|
knowledgeCutoff: "2025-05-01",
|
|
@@ -13132,7 +13631,7 @@ var MODEL_REGISTRY = {
|
|
|
13132
13631
|
"claude-sonnet-4-5-20250929": {
|
|
13133
13632
|
name: "claude-sonnet-4-5-20250929",
|
|
13134
13633
|
provider: Vendor.Anthropic,
|
|
13135
|
-
description: "Smart model for complex agents and coding
|
|
13634
|
+
description: "Legacy Sonnet 4.5. Smart model for complex agents and coding",
|
|
13136
13635
|
isActive: true,
|
|
13137
13636
|
releaseDate: "2025-09-29",
|
|
13138
13637
|
knowledgeCutoff: "2025-01-01",
|
|
@@ -13152,6 +13651,7 @@ var MODEL_REGISTRY = {
|
|
|
13152
13651
|
promptCaching: true,
|
|
13153
13652
|
input: {
|
|
13154
13653
|
tokens: 2e5,
|
|
13654
|
+
// 1M with beta header
|
|
13155
13655
|
text: true,
|
|
13156
13656
|
image: true,
|
|
13157
13657
|
cpm: 3,
|
|
@@ -13235,10 +13735,45 @@ var MODEL_REGISTRY = {
|
|
|
13235
13735
|
}
|
|
13236
13736
|
}
|
|
13237
13737
|
},
|
|
13738
|
+
"claude-opus-4-20250514": {
|
|
13739
|
+
name: "claude-opus-4-20250514",
|
|
13740
|
+
provider: Vendor.Anthropic,
|
|
13741
|
+
description: "Legacy Opus 4. Agentic tasks and reasoning",
|
|
13742
|
+
isActive: true,
|
|
13743
|
+
releaseDate: "2025-05-14",
|
|
13744
|
+
knowledgeCutoff: "2025-01-01",
|
|
13745
|
+
features: {
|
|
13746
|
+
reasoning: false,
|
|
13747
|
+
streaming: true,
|
|
13748
|
+
structuredOutput: true,
|
|
13749
|
+
functionCalling: true,
|
|
13750
|
+
fineTuning: false,
|
|
13751
|
+
predictedOutputs: false,
|
|
13752
|
+
realtime: false,
|
|
13753
|
+
vision: true,
|
|
13754
|
+
audio: false,
|
|
13755
|
+
video: false,
|
|
13756
|
+
extendedThinking: true,
|
|
13757
|
+
batchAPI: true,
|
|
13758
|
+
promptCaching: true,
|
|
13759
|
+
input: {
|
|
13760
|
+
tokens: 2e5,
|
|
13761
|
+
text: true,
|
|
13762
|
+
image: true,
|
|
13763
|
+
cpm: 15,
|
|
13764
|
+
cpmCached: 1.5
|
|
13765
|
+
},
|
|
13766
|
+
output: {
|
|
13767
|
+
tokens: 32e3,
|
|
13768
|
+
text: true,
|
|
13769
|
+
cpm: 75
|
|
13770
|
+
}
|
|
13771
|
+
}
|
|
13772
|
+
},
|
|
13238
13773
|
"claude-sonnet-4-20250514": {
|
|
13239
13774
|
name: "claude-sonnet-4-20250514",
|
|
13240
13775
|
provider: Vendor.Anthropic,
|
|
13241
|
-
description: "Legacy Sonnet 4.
|
|
13776
|
+
description: "Legacy Sonnet 4. Supports 1M context beta",
|
|
13242
13777
|
isActive: true,
|
|
13243
13778
|
releaseDate: "2025-05-14",
|
|
13244
13779
|
knowledgeCutoff: "2025-01-01",
|
|
@@ -13274,7 +13809,7 @@ var MODEL_REGISTRY = {
|
|
|
13274
13809
|
"claude-3-7-sonnet-20250219": {
|
|
13275
13810
|
name: "claude-3-7-sonnet-20250219",
|
|
13276
13811
|
provider: Vendor.Anthropic,
|
|
13277
|
-
description: "Claude 3.7 Sonnet with extended thinking
|
|
13812
|
+
description: "Deprecated. Claude 3.7 Sonnet with extended thinking",
|
|
13278
13813
|
isActive: true,
|
|
13279
13814
|
releaseDate: "2025-02-19",
|
|
13280
13815
|
knowledgeCutoff: "2024-10-01",
|
|
@@ -13301,17 +13836,16 @@ var MODEL_REGISTRY = {
|
|
|
13301
13836
|
},
|
|
13302
13837
|
output: {
|
|
13303
13838
|
tokens: 64e3,
|
|
13304
|
-
// 128K with beta header
|
|
13305
13839
|
text: true,
|
|
13306
13840
|
cpm: 15
|
|
13307
13841
|
}
|
|
13308
13842
|
}
|
|
13309
13843
|
},
|
|
13310
|
-
// Claude 3.x Legacy
|
|
13844
|
+
// Claude 3.x Legacy (Deprecated - retiring April 19, 2026)
|
|
13311
13845
|
"claude-3-haiku-20240307": {
|
|
13312
13846
|
name: "claude-3-haiku-20240307",
|
|
13313
13847
|
provider: Vendor.Anthropic,
|
|
13314
|
-
description: "
|
|
13848
|
+
description: "Deprecated. Retiring April 19, 2026. Migrate to Haiku 4.5",
|
|
13315
13849
|
isActive: true,
|
|
13316
13850
|
releaseDate: "2024-03-07",
|
|
13317
13851
|
knowledgeCutoff: "2023-08-01",
|
|
@@ -13344,16 +13878,124 @@ var MODEL_REGISTRY = {
|
|
|
13344
13878
|
}
|
|
13345
13879
|
},
|
|
13346
13880
|
// ============================================================================
|
|
13347
|
-
// Google Models (Verified from ai.google.dev)
|
|
13881
|
+
// Google Models (Verified from ai.google.dev - March 2026)
|
|
13348
13882
|
// ============================================================================
|
|
13883
|
+
// Gemini 3.1 Series (Preview)
|
|
13884
|
+
"gemini-3.1-pro-preview": {
|
|
13885
|
+
name: "gemini-3.1-pro-preview",
|
|
13886
|
+
provider: Vendor.Google,
|
|
13887
|
+
description: "Advanced intelligence with powerful agentic and coding capabilities. Replaces gemini-3-pro-preview",
|
|
13888
|
+
isActive: true,
|
|
13889
|
+
preferred: true,
|
|
13890
|
+
releaseDate: "2026-02-01",
|
|
13891
|
+
knowledgeCutoff: "2025-01-01",
|
|
13892
|
+
features: {
|
|
13893
|
+
reasoning: true,
|
|
13894
|
+
streaming: true,
|
|
13895
|
+
structuredOutput: true,
|
|
13896
|
+
functionCalling: true,
|
|
13897
|
+
fineTuning: false,
|
|
13898
|
+
predictedOutputs: false,
|
|
13899
|
+
realtime: false,
|
|
13900
|
+
vision: true,
|
|
13901
|
+
audio: true,
|
|
13902
|
+
video: true,
|
|
13903
|
+
batchAPI: true,
|
|
13904
|
+
promptCaching: true,
|
|
13905
|
+
input: {
|
|
13906
|
+
tokens: 1048576,
|
|
13907
|
+
text: true,
|
|
13908
|
+
image: true,
|
|
13909
|
+
audio: true,
|
|
13910
|
+
video: true,
|
|
13911
|
+
cpm: 2,
|
|
13912
|
+
cpmCached: 0.2
|
|
13913
|
+
},
|
|
13914
|
+
output: {
|
|
13915
|
+
tokens: 65536,
|
|
13916
|
+
text: true,
|
|
13917
|
+
cpm: 12
|
|
13918
|
+
}
|
|
13919
|
+
}
|
|
13920
|
+
},
|
|
13921
|
+
"gemini-3.1-flash-lite-preview": {
|
|
13922
|
+
name: "gemini-3.1-flash-lite-preview",
|
|
13923
|
+
provider: Vendor.Google,
|
|
13924
|
+
description: "High performance, budget-friendly for high-volume agentic tasks and data extraction",
|
|
13925
|
+
isActive: true,
|
|
13926
|
+
releaseDate: "2026-03-01",
|
|
13927
|
+
knowledgeCutoff: "2025-01-01",
|
|
13928
|
+
features: {
|
|
13929
|
+
reasoning: true,
|
|
13930
|
+
streaming: true,
|
|
13931
|
+
structuredOutput: true,
|
|
13932
|
+
functionCalling: true,
|
|
13933
|
+
fineTuning: false,
|
|
13934
|
+
predictedOutputs: false,
|
|
13935
|
+
realtime: false,
|
|
13936
|
+
vision: true,
|
|
13937
|
+
audio: true,
|
|
13938
|
+
video: true,
|
|
13939
|
+
batchAPI: true,
|
|
13940
|
+
promptCaching: true,
|
|
13941
|
+
input: {
|
|
13942
|
+
tokens: 1048576,
|
|
13943
|
+
text: true,
|
|
13944
|
+
image: true,
|
|
13945
|
+
audio: true,
|
|
13946
|
+
video: true,
|
|
13947
|
+
cpm: 0.25
|
|
13948
|
+
},
|
|
13949
|
+
output: {
|
|
13950
|
+
tokens: 65536,
|
|
13951
|
+
text: true,
|
|
13952
|
+
cpm: 1.5
|
|
13953
|
+
}
|
|
13954
|
+
}
|
|
13955
|
+
},
|
|
13956
|
+
"gemini-3.1-flash-image-preview": {
|
|
13957
|
+
name: "gemini-3.1-flash-image-preview",
|
|
13958
|
+
provider: Vendor.Google,
|
|
13959
|
+
description: "High-efficiency image generation with up to 4K output, search grounding support",
|
|
13960
|
+
isActive: true,
|
|
13961
|
+
releaseDate: "2026-02-01",
|
|
13962
|
+
knowledgeCutoff: "2025-01-01",
|
|
13963
|
+
features: {
|
|
13964
|
+
reasoning: true,
|
|
13965
|
+
streaming: true,
|
|
13966
|
+
structuredOutput: false,
|
|
13967
|
+
functionCalling: false,
|
|
13968
|
+
fineTuning: false,
|
|
13969
|
+
predictedOutputs: false,
|
|
13970
|
+
realtime: false,
|
|
13971
|
+
vision: true,
|
|
13972
|
+
audio: false,
|
|
13973
|
+
video: false,
|
|
13974
|
+
batchAPI: true,
|
|
13975
|
+
promptCaching: false,
|
|
13976
|
+
input: {
|
|
13977
|
+
tokens: 131072,
|
|
13978
|
+
text: true,
|
|
13979
|
+
image: true,
|
|
13980
|
+
cpm: 0.25
|
|
13981
|
+
},
|
|
13982
|
+
output: {
|
|
13983
|
+
tokens: 32768,
|
|
13984
|
+
text: true,
|
|
13985
|
+
image: true,
|
|
13986
|
+
cpm: 1.5
|
|
13987
|
+
}
|
|
13988
|
+
}
|
|
13989
|
+
},
|
|
13349
13990
|
// Gemini 3 Series (Preview)
|
|
13350
13991
|
"gemini-3-flash-preview": {
|
|
13351
13992
|
name: "gemini-3-flash-preview",
|
|
13352
13993
|
provider: Vendor.Google,
|
|
13353
|
-
description: "
|
|
13994
|
+
description: "Most powerful agentic and coding model with frontier-class reasoning",
|
|
13354
13995
|
isActive: true,
|
|
13355
|
-
|
|
13356
|
-
|
|
13996
|
+
preferred: true,
|
|
13997
|
+
releaseDate: "2025-12-01",
|
|
13998
|
+
knowledgeCutoff: "2025-01-01",
|
|
13357
13999
|
features: {
|
|
13358
14000
|
reasoning: true,
|
|
13359
14001
|
streaming: true,
|
|
@@ -13368,27 +14010,28 @@ var MODEL_REGISTRY = {
|
|
|
13368
14010
|
batchAPI: true,
|
|
13369
14011
|
promptCaching: true,
|
|
13370
14012
|
input: {
|
|
13371
|
-
tokens:
|
|
14013
|
+
tokens: 1048576,
|
|
13372
14014
|
text: true,
|
|
13373
14015
|
image: true,
|
|
13374
14016
|
audio: true,
|
|
13375
14017
|
video: true,
|
|
13376
|
-
cpm: 0.
|
|
14018
|
+
cpm: 0.5,
|
|
14019
|
+
cpmCached: 0.05
|
|
13377
14020
|
},
|
|
13378
14021
|
output: {
|
|
13379
14022
|
tokens: 65536,
|
|
13380
14023
|
text: true,
|
|
13381
|
-
cpm:
|
|
14024
|
+
cpm: 3
|
|
13382
14025
|
}
|
|
13383
14026
|
}
|
|
13384
14027
|
},
|
|
13385
14028
|
"gemini-3-pro-preview": {
|
|
13386
14029
|
name: "gemini-3-pro-preview",
|
|
13387
14030
|
provider: Vendor.Google,
|
|
13388
|
-
description: "
|
|
14031
|
+
description: "Deprecated. Shutting down March 9, 2026. Migrate to gemini-3.1-pro-preview",
|
|
13389
14032
|
isActive: true,
|
|
13390
14033
|
releaseDate: "2025-11-18",
|
|
13391
|
-
knowledgeCutoff: "2025-
|
|
14034
|
+
knowledgeCutoff: "2025-01-01",
|
|
13392
14035
|
features: {
|
|
13393
14036
|
reasoning: true,
|
|
13394
14037
|
streaming: true,
|
|
@@ -13403,7 +14046,7 @@ var MODEL_REGISTRY = {
|
|
|
13403
14046
|
batchAPI: true,
|
|
13404
14047
|
promptCaching: true,
|
|
13405
14048
|
input: {
|
|
13406
|
-
tokens:
|
|
14049
|
+
tokens: 1048576,
|
|
13407
14050
|
text: true,
|
|
13408
14051
|
image: true,
|
|
13409
14052
|
audio: true,
|
|
@@ -13420,14 +14063,14 @@ var MODEL_REGISTRY = {
|
|
|
13420
14063
|
"gemini-3-pro-image-preview": {
|
|
13421
14064
|
name: "gemini-3-pro-image-preview",
|
|
13422
14065
|
provider: Vendor.Google,
|
|
13423
|
-
description: "
|
|
14066
|
+
description: "Professional-grade image generation and editing with reasoning",
|
|
13424
14067
|
isActive: true,
|
|
13425
14068
|
releaseDate: "2025-11-18",
|
|
13426
|
-
knowledgeCutoff: "2025-
|
|
14069
|
+
knowledgeCutoff: "2025-01-01",
|
|
13427
14070
|
features: {
|
|
13428
14071
|
reasoning: true,
|
|
13429
14072
|
streaming: true,
|
|
13430
|
-
structuredOutput:
|
|
14073
|
+
structuredOutput: true,
|
|
13431
14074
|
functionCalling: false,
|
|
13432
14075
|
fineTuning: false,
|
|
13433
14076
|
predictedOutputs: false,
|
|
@@ -13436,15 +14079,15 @@ var MODEL_REGISTRY = {
|
|
|
13436
14079
|
audio: false,
|
|
13437
14080
|
video: false,
|
|
13438
14081
|
batchAPI: true,
|
|
13439
|
-
promptCaching:
|
|
14082
|
+
promptCaching: false,
|
|
13440
14083
|
input: {
|
|
13441
|
-
tokens:
|
|
14084
|
+
tokens: 65536,
|
|
13442
14085
|
text: true,
|
|
13443
14086
|
image: true,
|
|
13444
14087
|
cpm: 1.25
|
|
13445
14088
|
},
|
|
13446
14089
|
output: {
|
|
13447
|
-
tokens:
|
|
14090
|
+
tokens: 32768,
|
|
13448
14091
|
text: true,
|
|
13449
14092
|
image: true,
|
|
13450
14093
|
cpm: 10
|
|
@@ -13455,7 +14098,7 @@ var MODEL_REGISTRY = {
|
|
|
13455
14098
|
"gemini-2.5-pro": {
|
|
13456
14099
|
name: "gemini-2.5-pro",
|
|
13457
14100
|
provider: Vendor.Google,
|
|
13458
|
-
description: "
|
|
14101
|
+
description: "Most advanced model for complex tasks with deep reasoning and coding",
|
|
13459
14102
|
isActive: true,
|
|
13460
14103
|
releaseDate: "2025-03-01",
|
|
13461
14104
|
knowledgeCutoff: "2025-01-01",
|
|
@@ -13473,12 +14116,13 @@ var MODEL_REGISTRY = {
|
|
|
13473
14116
|
batchAPI: true,
|
|
13474
14117
|
promptCaching: true,
|
|
13475
14118
|
input: {
|
|
13476
|
-
tokens:
|
|
14119
|
+
tokens: 1048576,
|
|
13477
14120
|
text: true,
|
|
13478
14121
|
image: true,
|
|
13479
14122
|
audio: true,
|
|
13480
14123
|
video: true,
|
|
13481
|
-
cpm: 1.25
|
|
14124
|
+
cpm: 1.25,
|
|
14125
|
+
cpmCached: 0.125
|
|
13482
14126
|
},
|
|
13483
14127
|
output: {
|
|
13484
14128
|
tokens: 65536,
|
|
@@ -13490,7 +14134,7 @@ var MODEL_REGISTRY = {
|
|
|
13490
14134
|
"gemini-2.5-flash": {
|
|
13491
14135
|
name: "gemini-2.5-flash",
|
|
13492
14136
|
provider: Vendor.Google,
|
|
13493
|
-
description: "
|
|
14137
|
+
description: "Best price-performance for low-latency, high-volume tasks with reasoning",
|
|
13494
14138
|
isActive: true,
|
|
13495
14139
|
releaseDate: "2025-06-17",
|
|
13496
14140
|
knowledgeCutoff: "2025-01-01",
|
|
@@ -13508,24 +14152,25 @@ var MODEL_REGISTRY = {
|
|
|
13508
14152
|
batchAPI: true,
|
|
13509
14153
|
promptCaching: true,
|
|
13510
14154
|
input: {
|
|
13511
|
-
tokens:
|
|
14155
|
+
tokens: 1048576,
|
|
13512
14156
|
text: true,
|
|
13513
14157
|
image: true,
|
|
13514
14158
|
audio: true,
|
|
13515
14159
|
video: true,
|
|
13516
|
-
cpm: 0.
|
|
14160
|
+
cpm: 0.3,
|
|
14161
|
+
cpmCached: 0.03
|
|
13517
14162
|
},
|
|
13518
14163
|
output: {
|
|
13519
14164
|
tokens: 65536,
|
|
13520
14165
|
text: true,
|
|
13521
|
-
cpm:
|
|
14166
|
+
cpm: 2.5
|
|
13522
14167
|
}
|
|
13523
14168
|
}
|
|
13524
14169
|
},
|
|
13525
14170
|
"gemini-2.5-flash-lite": {
|
|
13526
14171
|
name: "gemini-2.5-flash-lite",
|
|
13527
14172
|
provider: Vendor.Google,
|
|
13528
|
-
description: "
|
|
14173
|
+
description: "Fastest and most budget-friendly multimodal model in the 2.5 family",
|
|
13529
14174
|
isActive: true,
|
|
13530
14175
|
releaseDate: "2025-06-17",
|
|
13531
14176
|
knowledgeCutoff: "2025-01-01",
|
|
@@ -13543,31 +14188,31 @@ var MODEL_REGISTRY = {
|
|
|
13543
14188
|
batchAPI: true,
|
|
13544
14189
|
promptCaching: true,
|
|
13545
14190
|
input: {
|
|
13546
|
-
tokens:
|
|
14191
|
+
tokens: 1048576,
|
|
13547
14192
|
text: true,
|
|
13548
14193
|
image: true,
|
|
13549
14194
|
audio: true,
|
|
13550
14195
|
video: true,
|
|
13551
|
-
cpm: 0.
|
|
14196
|
+
cpm: 0.1
|
|
13552
14197
|
},
|
|
13553
14198
|
output: {
|
|
13554
14199
|
tokens: 65536,
|
|
13555
14200
|
text: true,
|
|
13556
|
-
cpm: 0.
|
|
14201
|
+
cpm: 0.4
|
|
13557
14202
|
}
|
|
13558
14203
|
}
|
|
13559
14204
|
},
|
|
13560
14205
|
"gemini-2.5-flash-image": {
|
|
13561
14206
|
name: "gemini-2.5-flash-image",
|
|
13562
14207
|
provider: Vendor.Google,
|
|
13563
|
-
description: "
|
|
14208
|
+
description: "Fast native image generation and editing (Nano Banana)",
|
|
13564
14209
|
isActive: true,
|
|
13565
|
-
releaseDate: "2025-
|
|
13566
|
-
knowledgeCutoff: "2025-
|
|
14210
|
+
releaseDate: "2025-10-01",
|
|
14211
|
+
knowledgeCutoff: "2025-06-01",
|
|
13567
14212
|
features: {
|
|
13568
|
-
reasoning:
|
|
14213
|
+
reasoning: false,
|
|
13569
14214
|
streaming: true,
|
|
13570
|
-
structuredOutput:
|
|
14215
|
+
structuredOutput: true,
|
|
13571
14216
|
functionCalling: false,
|
|
13572
14217
|
fineTuning: false,
|
|
13573
14218
|
predictedOutputs: false,
|
|
@@ -13578,13 +14223,13 @@ var MODEL_REGISTRY = {
|
|
|
13578
14223
|
batchAPI: true,
|
|
13579
14224
|
promptCaching: true,
|
|
13580
14225
|
input: {
|
|
13581
|
-
tokens:
|
|
14226
|
+
tokens: 65536,
|
|
13582
14227
|
text: true,
|
|
13583
14228
|
image: true,
|
|
13584
14229
|
cpm: 0.15
|
|
13585
14230
|
},
|
|
13586
14231
|
output: {
|
|
13587
|
-
tokens:
|
|
14232
|
+
tokens: 32768,
|
|
13588
14233
|
text: true,
|
|
13589
14234
|
image: true,
|
|
13590
14235
|
cpm: 0.6
|
|
@@ -13592,7 +14237,7 @@ var MODEL_REGISTRY = {
|
|
|
13592
14237
|
}
|
|
13593
14238
|
},
|
|
13594
14239
|
// ============================================================================
|
|
13595
|
-
// xAI Grok Models (Verified from docs.x.ai -
|
|
14240
|
+
// xAI Grok Models (Verified from docs.x.ai - March 2026)
|
|
13596
14241
|
// ============================================================================
|
|
13597
14242
|
// Grok 4.1 Series (2M context, fast)
|
|
13598
14243
|
"grok-4-1-fast-reasoning": {
|
|
@@ -13613,13 +14258,14 @@ var MODEL_REGISTRY = {
|
|
|
13613
14258
|
vision: true,
|
|
13614
14259
|
audio: false,
|
|
13615
14260
|
video: false,
|
|
13616
|
-
batchAPI:
|
|
13617
|
-
promptCaching:
|
|
14261
|
+
batchAPI: true,
|
|
14262
|
+
promptCaching: true,
|
|
13618
14263
|
input: {
|
|
13619
14264
|
tokens: 2e6,
|
|
13620
14265
|
text: true,
|
|
13621
14266
|
image: true,
|
|
13622
|
-
cpm: 0.2
|
|
14267
|
+
cpm: 0.2,
|
|
14268
|
+
cpmCached: 0.05
|
|
13623
14269
|
},
|
|
13624
14270
|
output: {
|
|
13625
14271
|
tokens: 65536,
|
|
@@ -13646,13 +14292,14 @@ var MODEL_REGISTRY = {
|
|
|
13646
14292
|
vision: true,
|
|
13647
14293
|
audio: false,
|
|
13648
14294
|
video: false,
|
|
13649
|
-
batchAPI:
|
|
13650
|
-
promptCaching:
|
|
14295
|
+
batchAPI: true,
|
|
14296
|
+
promptCaching: true,
|
|
13651
14297
|
input: {
|
|
13652
14298
|
tokens: 2e6,
|
|
13653
14299
|
text: true,
|
|
13654
14300
|
image: true,
|
|
13655
|
-
cpm: 0.2
|
|
14301
|
+
cpm: 0.2,
|
|
14302
|
+
cpmCached: 0.05
|
|
13656
14303
|
},
|
|
13657
14304
|
output: {
|
|
13658
14305
|
tokens: 65536,
|
|
@@ -13680,12 +14327,13 @@ var MODEL_REGISTRY = {
|
|
|
13680
14327
|
vision: false,
|
|
13681
14328
|
audio: false,
|
|
13682
14329
|
video: false,
|
|
13683
|
-
batchAPI:
|
|
13684
|
-
promptCaching:
|
|
14330
|
+
batchAPI: true,
|
|
14331
|
+
promptCaching: true,
|
|
13685
14332
|
input: {
|
|
13686
14333
|
tokens: 256e3,
|
|
13687
14334
|
text: true,
|
|
13688
|
-
cpm: 0.2
|
|
14335
|
+
cpm: 0.2,
|
|
14336
|
+
cpmCached: 0.02
|
|
13689
14337
|
},
|
|
13690
14338
|
output: {
|
|
13691
14339
|
tokens: 32768,
|
|
@@ -13698,7 +14346,7 @@ var MODEL_REGISTRY = {
|
|
|
13698
14346
|
"grok-4-fast-reasoning": {
|
|
13699
14347
|
name: "grok-4-fast-reasoning",
|
|
13700
14348
|
provider: Vendor.Grok,
|
|
13701
|
-
description: "Fast Grok 4 with reasoning capabilities, 2M context window",
|
|
14349
|
+
description: "Fast Grok 4 with reasoning capabilities, 2M context window, vision support",
|
|
13702
14350
|
isActive: true,
|
|
13703
14351
|
releaseDate: "2025-09-01",
|
|
13704
14352
|
knowledgeCutoff: "2024-11-01",
|
|
@@ -13710,15 +14358,17 @@ var MODEL_REGISTRY = {
|
|
|
13710
14358
|
fineTuning: false,
|
|
13711
14359
|
predictedOutputs: false,
|
|
13712
14360
|
realtime: false,
|
|
13713
|
-
vision:
|
|
14361
|
+
vision: true,
|
|
13714
14362
|
audio: false,
|
|
13715
14363
|
video: false,
|
|
13716
|
-
batchAPI:
|
|
13717
|
-
promptCaching:
|
|
14364
|
+
batchAPI: true,
|
|
14365
|
+
promptCaching: true,
|
|
13718
14366
|
input: {
|
|
13719
14367
|
tokens: 2e6,
|
|
13720
14368
|
text: true,
|
|
13721
|
-
|
|
14369
|
+
image: true,
|
|
14370
|
+
cpm: 0.2,
|
|
14371
|
+
cpmCached: 0.05
|
|
13722
14372
|
},
|
|
13723
14373
|
output: {
|
|
13724
14374
|
tokens: 65536,
|
|
@@ -13745,13 +14395,14 @@ var MODEL_REGISTRY = {
|
|
|
13745
14395
|
vision: true,
|
|
13746
14396
|
audio: false,
|
|
13747
14397
|
video: false,
|
|
13748
|
-
batchAPI:
|
|
13749
|
-
promptCaching:
|
|
14398
|
+
batchAPI: true,
|
|
14399
|
+
promptCaching: true,
|
|
13750
14400
|
input: {
|
|
13751
14401
|
tokens: 2e6,
|
|
13752
14402
|
text: true,
|
|
13753
14403
|
image: true,
|
|
13754
|
-
cpm: 0.2
|
|
14404
|
+
cpm: 0.2,
|
|
14405
|
+
cpmCached: 0.05
|
|
13755
14406
|
},
|
|
13756
14407
|
output: {
|
|
13757
14408
|
tokens: 65536,
|
|
@@ -13763,12 +14414,12 @@ var MODEL_REGISTRY = {
|
|
|
13763
14414
|
"grok-4-0709": {
|
|
13764
14415
|
name: "grok-4-0709",
|
|
13765
14416
|
provider: Vendor.Grok,
|
|
13766
|
-
description: "Grok 4 flagship model (July 2025 release), 256K context, vision support",
|
|
14417
|
+
description: "Grok 4 flagship model (July 2025 release), 256K context, vision support, reasoning",
|
|
13767
14418
|
isActive: true,
|
|
13768
14419
|
releaseDate: "2025-07-09",
|
|
13769
14420
|
knowledgeCutoff: "2024-11-01",
|
|
13770
14421
|
features: {
|
|
13771
|
-
reasoning:
|
|
14422
|
+
reasoning: true,
|
|
13772
14423
|
streaming: true,
|
|
13773
14424
|
structuredOutput: true,
|
|
13774
14425
|
functionCalling: true,
|
|
@@ -13778,13 +14429,14 @@ var MODEL_REGISTRY = {
|
|
|
13778
14429
|
vision: true,
|
|
13779
14430
|
audio: false,
|
|
13780
14431
|
video: false,
|
|
13781
|
-
batchAPI:
|
|
13782
|
-
promptCaching:
|
|
14432
|
+
batchAPI: true,
|
|
14433
|
+
promptCaching: true,
|
|
13783
14434
|
input: {
|
|
13784
14435
|
tokens: 256e3,
|
|
13785
14436
|
text: true,
|
|
13786
14437
|
image: true,
|
|
13787
|
-
cpm: 3
|
|
14438
|
+
cpm: 3,
|
|
14439
|
+
cpmCached: 0.75
|
|
13788
14440
|
},
|
|
13789
14441
|
output: {
|
|
13790
14442
|
tokens: 32768,
|
|
@@ -13797,12 +14449,12 @@ var MODEL_REGISTRY = {
|
|
|
13797
14449
|
"grok-3-mini": {
|
|
13798
14450
|
name: "grok-3-mini",
|
|
13799
14451
|
provider: Vendor.Grok,
|
|
13800
|
-
description: "Lightweight, cost-efficient model
|
|
14452
|
+
description: "Lightweight, cost-efficient model with reasoning, 131K context",
|
|
13801
14453
|
isActive: true,
|
|
13802
14454
|
releaseDate: "2025-06-01",
|
|
13803
14455
|
knowledgeCutoff: "2024-11-01",
|
|
13804
14456
|
features: {
|
|
13805
|
-
reasoning:
|
|
14457
|
+
reasoning: true,
|
|
13806
14458
|
streaming: true,
|
|
13807
14459
|
structuredOutput: true,
|
|
13808
14460
|
functionCalling: true,
|
|
@@ -13812,12 +14464,13 @@ var MODEL_REGISTRY = {
|
|
|
13812
14464
|
vision: false,
|
|
13813
14465
|
audio: false,
|
|
13814
14466
|
video: false,
|
|
13815
|
-
batchAPI:
|
|
13816
|
-
promptCaching:
|
|
14467
|
+
batchAPI: true,
|
|
14468
|
+
promptCaching: true,
|
|
13817
14469
|
input: {
|
|
13818
14470
|
tokens: 131072,
|
|
13819
14471
|
text: true,
|
|
13820
|
-
cpm: 0.3
|
|
14472
|
+
cpm: 0.3,
|
|
14473
|
+
cpmCached: 0.07
|
|
13821
14474
|
},
|
|
13822
14475
|
output: {
|
|
13823
14476
|
tokens: 32768,
|
|
@@ -13844,12 +14497,13 @@ var MODEL_REGISTRY = {
|
|
|
13844
14497
|
vision: false,
|
|
13845
14498
|
audio: false,
|
|
13846
14499
|
video: false,
|
|
13847
|
-
batchAPI:
|
|
13848
|
-
promptCaching:
|
|
14500
|
+
batchAPI: true,
|
|
14501
|
+
promptCaching: true,
|
|
13849
14502
|
input: {
|
|
13850
14503
|
tokens: 131072,
|
|
13851
14504
|
text: true,
|
|
13852
|
-
cpm: 3
|
|
14505
|
+
cpm: 3,
|
|
14506
|
+
cpmCached: 0.75
|
|
13853
14507
|
},
|
|
13854
14508
|
output: {
|
|
13855
14509
|
tokens: 32768,
|
|
@@ -13858,11 +14512,11 @@ var MODEL_REGISTRY = {
|
|
|
13858
14512
|
}
|
|
13859
14513
|
}
|
|
13860
14514
|
},
|
|
13861
|
-
// Grok 2 Series (
|
|
14515
|
+
// Grok 2 Series (Legacy - not in current docs)
|
|
13862
14516
|
"grok-2-vision-1212": {
|
|
13863
14517
|
name: "grok-2-vision-1212",
|
|
13864
14518
|
provider: Vendor.Grok,
|
|
13865
|
-
description: "
|
|
14519
|
+
description: "Legacy vision model for image understanding, 32K context. Not in current xAI docs",
|
|
13866
14520
|
isActive: true,
|
|
13867
14521
|
releaseDate: "2024-12-12",
|
|
13868
14522
|
knowledgeCutoff: "2024-11-01",
|
|
@@ -17008,27 +17662,6 @@ ${formatValue(entry.value)}`).join("\n\n")
|
|
|
17008
17662
|
// src/core/context-nextgen/plugins/ToolCatalogPluginNextGen.ts
|
|
17009
17663
|
init_Logger();
|
|
17010
17664
|
var DEFAULT_MAX_LOADED = 10;
|
|
17011
|
-
var TOOL_CATALOG_INSTRUCTIONS = `## Tool Catalog
|
|
17012
|
-
|
|
17013
|
-
You have access to a dynamic tool catalog. Not all tools are loaded at once \u2014 use these metatools to discover and load what you need:
|
|
17014
|
-
|
|
17015
|
-
**tool_catalog_search** \u2014 Browse available tool categories and search for specific tools.
|
|
17016
|
-
- No params \u2192 list all available categories with descriptions
|
|
17017
|
-
- \`category\` \u2192 list tools in that category
|
|
17018
|
-
- \`query\` \u2192 keyword search across categories and tools
|
|
17019
|
-
|
|
17020
|
-
**tool_catalog_load** \u2014 Load a category's tools so you can use them.
|
|
17021
|
-
- Tools become available immediately after loading.
|
|
17022
|
-
- If you need tools from a category, load it first.
|
|
17023
|
-
|
|
17024
|
-
**tool_catalog_unload** \u2014 Unload a category to free token budget.
|
|
17025
|
-
- Unloaded tools are no longer sent to you.
|
|
17026
|
-
- Use when you're done with a category.
|
|
17027
|
-
|
|
17028
|
-
**Best practices:**
|
|
17029
|
-
- Search first to find the right category before loading.
|
|
17030
|
-
- Unload categories you no longer need to keep context lean.
|
|
17031
|
-
- Categories marked [LOADED] are already available.`;
|
|
17032
17665
|
var catalogSearchDefinition = {
|
|
17033
17666
|
type: "function",
|
|
17034
17667
|
function: {
|
|
@@ -17087,6 +17720,8 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17087
17720
|
name = "tool_catalog";
|
|
17088
17721
|
/** category name → array of tool names that were loaded */
|
|
17089
17722
|
_loadedCategories = /* @__PURE__ */ new Map();
|
|
17723
|
+
/** Categories that cannot be unloaded */
|
|
17724
|
+
_pinnedCategories = /* @__PURE__ */ new Set();
|
|
17090
17725
|
/** Reference to the ToolManager for registering/disabling tools */
|
|
17091
17726
|
_toolManager = null;
|
|
17092
17727
|
/** Cached connector categories — discovered once in setToolManager() */
|
|
@@ -17102,12 +17737,17 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17102
17737
|
maxLoadedCategories: DEFAULT_MAX_LOADED,
|
|
17103
17738
|
...config
|
|
17104
17739
|
};
|
|
17740
|
+
if (this._config.pinned?.length) {
|
|
17741
|
+
for (const cat of this._config.pinned) {
|
|
17742
|
+
this._pinnedCategories.add(cat);
|
|
17743
|
+
}
|
|
17744
|
+
}
|
|
17105
17745
|
}
|
|
17106
17746
|
// ========================================================================
|
|
17107
17747
|
// Plugin Interface
|
|
17108
17748
|
// ========================================================================
|
|
17109
17749
|
getInstructions() {
|
|
17110
|
-
return
|
|
17750
|
+
return this.buildInstructions();
|
|
17111
17751
|
}
|
|
17112
17752
|
async getContent() {
|
|
17113
17753
|
const categories = this.getAllowedCategories();
|
|
@@ -17118,15 +17758,15 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17118
17758
|
if (loaded.length > 0) {
|
|
17119
17759
|
lines.push(`**Loaded:** ${loaded.join(", ")}`);
|
|
17120
17760
|
}
|
|
17121
|
-
lines.push(`**Available categories:** ${categories.length}`);
|
|
17761
|
+
lines.push(`**Available categories:** ${categories.length + this.getConnectorCategories().length}`);
|
|
17122
17762
|
for (const cat of categories) {
|
|
17123
17763
|
const tools = ToolCatalogRegistry.getToolsInCategory(cat.name);
|
|
17124
|
-
const
|
|
17125
|
-
lines.push(`- **${cat.displayName}** (${tools.length} tools)${
|
|
17764
|
+
const markers = this.getCategoryMarkers(cat.name);
|
|
17765
|
+
lines.push(`- **${cat.displayName}** (${tools.length} tools)${markers}: ${cat.description}`);
|
|
17126
17766
|
}
|
|
17127
17767
|
for (const cc of this.getConnectorCategories()) {
|
|
17128
|
-
const
|
|
17129
|
-
lines.push(`- **${cc.displayName}** (${cc.toolCount} tools)${
|
|
17768
|
+
const markers = this.getCategoryMarkers(cc.name);
|
|
17769
|
+
lines.push(`- **${cc.displayName}** (${cc.toolCount} tools)${markers}: ${cc.description}`);
|
|
17130
17770
|
}
|
|
17131
17771
|
const content = lines.join("\n");
|
|
17132
17772
|
this.updateTokenCache(this.estimator.estimateTokens(content));
|
|
@@ -17137,7 +17777,8 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17137
17777
|
loadedCategories: Array.from(this._loadedCategories.entries()).map(([name, tools]) => ({
|
|
17138
17778
|
category: name,
|
|
17139
17779
|
toolCount: tools.length,
|
|
17140
|
-
tools
|
|
17780
|
+
tools,
|
|
17781
|
+
pinned: this._pinnedCategories.has(name)
|
|
17141
17782
|
}))
|
|
17142
17783
|
};
|
|
17143
17784
|
}
|
|
@@ -17164,11 +17805,14 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17164
17805
|
return [searchTool, loadTool, unloadTool];
|
|
17165
17806
|
}
|
|
17166
17807
|
isCompactable() {
|
|
17167
|
-
|
|
17808
|
+
for (const category of this._loadedCategories.keys()) {
|
|
17809
|
+
if (!this._pinnedCategories.has(category)) return true;
|
|
17810
|
+
}
|
|
17811
|
+
return false;
|
|
17168
17812
|
}
|
|
17169
17813
|
async compact(targetTokensToFree) {
|
|
17170
17814
|
if (!this._toolManager || this._loadedCategories.size === 0) return 0;
|
|
17171
|
-
const categoriesByLastUsed = this.getCategoriesSortedByLastUsed();
|
|
17815
|
+
const categoriesByLastUsed = this.getCategoriesSortedByLastUsed().filter((cat) => !this._pinnedCategories.has(cat));
|
|
17172
17816
|
let freed = 0;
|
|
17173
17817
|
for (const category of categoriesByLastUsed) {
|
|
17174
17818
|
if (freed >= targetTokensToFree) break;
|
|
@@ -17209,6 +17853,7 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17209
17853
|
}
|
|
17210
17854
|
destroy() {
|
|
17211
17855
|
this._loadedCategories.clear();
|
|
17856
|
+
this._pinnedCategories.clear();
|
|
17212
17857
|
this._toolManager = null;
|
|
17213
17858
|
this._connectorCategories = null;
|
|
17214
17859
|
this._destroyed = true;
|
|
@@ -17222,11 +17867,20 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17222
17867
|
setToolManager(tm) {
|
|
17223
17868
|
this._toolManager = tm;
|
|
17224
17869
|
this._connectorCategories = ToolCatalogRegistry.discoverConnectorCategories({
|
|
17225
|
-
scope: this._config.categoryScope,
|
|
17226
17870
|
identities: this._config.identities
|
|
17227
17871
|
});
|
|
17872
|
+
for (const category of this._pinnedCategories) {
|
|
17873
|
+
const result = this.executeLoad(category);
|
|
17874
|
+
if (result.error) {
|
|
17875
|
+
logger.warn(
|
|
17876
|
+
{ category, error: result.error },
|
|
17877
|
+
`[ToolCatalogPlugin] Failed to load pinned category '${category}'`
|
|
17878
|
+
);
|
|
17879
|
+
}
|
|
17880
|
+
}
|
|
17228
17881
|
if (this._config.autoLoadCategories?.length) {
|
|
17229
17882
|
for (const category of this._config.autoLoadCategories) {
|
|
17883
|
+
if (this._pinnedCategories.has(category)) continue;
|
|
17230
17884
|
const result = this.executeLoad(category);
|
|
17231
17885
|
if (result.error) {
|
|
17232
17886
|
logger.warn(
|
|
@@ -17241,6 +17895,10 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17241
17895
|
get loadedCategories() {
|
|
17242
17896
|
return Array.from(this._loadedCategories.keys());
|
|
17243
17897
|
}
|
|
17898
|
+
/** Get set of pinned category names */
|
|
17899
|
+
get pinnedCategories() {
|
|
17900
|
+
return this._pinnedCategories;
|
|
17901
|
+
}
|
|
17244
17902
|
// ========================================================================
|
|
17245
17903
|
// Metatool Implementations
|
|
17246
17904
|
// ========================================================================
|
|
@@ -17261,6 +17919,7 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17261
17919
|
return {
|
|
17262
17920
|
category,
|
|
17263
17921
|
loaded,
|
|
17922
|
+
pinned: this._pinnedCategories.has(category),
|
|
17264
17923
|
tools: tools.map((t) => ({
|
|
17265
17924
|
name: t.name,
|
|
17266
17925
|
displayName: t.displayName,
|
|
@@ -17282,7 +17941,8 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17282
17941
|
displayName: cat.displayName,
|
|
17283
17942
|
description: cat.description,
|
|
17284
17943
|
toolCount: tools.length,
|
|
17285
|
-
loaded: this._loadedCategories.has(cat.name)
|
|
17944
|
+
loaded: this._loadedCategories.has(cat.name),
|
|
17945
|
+
pinned: this._pinnedCategories.has(cat.name)
|
|
17286
17946
|
});
|
|
17287
17947
|
}
|
|
17288
17948
|
for (const cc of connectorCats) {
|
|
@@ -17291,7 +17951,8 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17291
17951
|
displayName: cc.displayName,
|
|
17292
17952
|
description: cc.description,
|
|
17293
17953
|
toolCount: cc.toolCount,
|
|
17294
|
-
loaded: this._loadedCategories.has(cc.name)
|
|
17954
|
+
loaded: this._loadedCategories.has(cc.name),
|
|
17955
|
+
pinned: this._pinnedCategories.has(cc.name)
|
|
17295
17956
|
});
|
|
17296
17957
|
}
|
|
17297
17958
|
return { categories: result };
|
|
@@ -17301,20 +17962,28 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17301
17962
|
if (!this._toolManager) {
|
|
17302
17963
|
return { error: "ToolManager not connected. Plugin not properly initialized." };
|
|
17303
17964
|
}
|
|
17304
|
-
|
|
17305
|
-
|
|
17965
|
+
const isConnector = ToolCatalogRegistry.parseConnectorCategory(category) !== null;
|
|
17966
|
+
if (isConnector) {
|
|
17967
|
+
const allowed = this.getConnectorCategories().some((cc) => cc.name === category);
|
|
17968
|
+
if (!allowed) {
|
|
17969
|
+
return { error: `Category '${category}' is not available for this agent.` };
|
|
17970
|
+
}
|
|
17971
|
+
} else {
|
|
17972
|
+
if (!ToolCatalogRegistry.isCategoryAllowed(category, this._config.categoryScope)) {
|
|
17973
|
+
return { error: `Category '${category}' is not available for this agent.` };
|
|
17974
|
+
}
|
|
17306
17975
|
}
|
|
17307
17976
|
if (this._loadedCategories.has(category)) {
|
|
17308
17977
|
const toolNames2 = this._loadedCategories.get(category);
|
|
17309
17978
|
return { loaded: toolNames2.length, tools: toolNames2, alreadyLoaded: true };
|
|
17310
17979
|
}
|
|
17311
|
-
|
|
17980
|
+
const nonPinnedLoaded = this._loadedCategories.size - this._pinnedCategories.size;
|
|
17981
|
+
if (!this._pinnedCategories.has(category) && nonPinnedLoaded >= this._config.maxLoadedCategories) {
|
|
17312
17982
|
return {
|
|
17313
17983
|
error: `Maximum loaded categories (${this._config.maxLoadedCategories}) reached. Unload a category first.`,
|
|
17314
17984
|
loaded: Array.from(this._loadedCategories.keys())
|
|
17315
17985
|
};
|
|
17316
17986
|
}
|
|
17317
|
-
const isConnector = ToolCatalogRegistry.parseConnectorCategory(category) !== null;
|
|
17318
17987
|
let tools;
|
|
17319
17988
|
if (isConnector) {
|
|
17320
17989
|
tools = ToolCatalogRegistry.resolveConnectorCategoryTools(category);
|
|
@@ -17351,6 +18020,9 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17351
18020
|
if (!this._toolManager) {
|
|
17352
18021
|
return { error: "ToolManager not connected." };
|
|
17353
18022
|
}
|
|
18023
|
+
if (this._pinnedCategories.has(category)) {
|
|
18024
|
+
return { error: `Category '${category}' is pinned and cannot be unloaded.` };
|
|
18025
|
+
}
|
|
17354
18026
|
const toolNames = this._loadedCategories.get(category);
|
|
17355
18027
|
if (!toolNames) {
|
|
17356
18028
|
return { unloaded: 0, message: `Category '${category}' is not loaded.` };
|
|
@@ -17376,6 +18048,61 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17376
18048
|
getConnectorCategories() {
|
|
17377
18049
|
return this._connectorCategories ?? [];
|
|
17378
18050
|
}
|
|
18051
|
+
/**
|
|
18052
|
+
* Build status markers for a category (e.g., " [PINNED]", " [LOADED]", " [PINNED] [LOADED]")
|
|
18053
|
+
*/
|
|
18054
|
+
getCategoryMarkers(name) {
|
|
18055
|
+
const parts = [];
|
|
18056
|
+
if (this._pinnedCategories.has(name)) parts.push("[PINNED]");
|
|
18057
|
+
if (this._loadedCategories.has(name)) parts.push("[LOADED]");
|
|
18058
|
+
return parts.length > 0 ? " " + parts.join(" ") : "";
|
|
18059
|
+
}
|
|
18060
|
+
/**
|
|
18061
|
+
* Build dynamic instructions that include the list of available categories.
|
|
18062
|
+
*/
|
|
18063
|
+
buildInstructions() {
|
|
18064
|
+
const lines = [];
|
|
18065
|
+
lines.push("## Tool Catalog");
|
|
18066
|
+
lines.push("");
|
|
18067
|
+
lines.push("Your core tools (memory, context, instructions, etc.) are always available.");
|
|
18068
|
+
lines.push("Additional tool categories can be loaded on demand from the catalog below.");
|
|
18069
|
+
lines.push("");
|
|
18070
|
+
lines.push("**tool_catalog_search** \u2014 Browse available tool categories and search for specific tools.");
|
|
18071
|
+
lines.push(" - No params \u2192 list all available categories with descriptions");
|
|
18072
|
+
lines.push(" - `category` \u2192 list tools in that category");
|
|
18073
|
+
lines.push(" - `query` \u2192 keyword search across categories and tools");
|
|
18074
|
+
lines.push("");
|
|
18075
|
+
lines.push("**tool_catalog_load** \u2014 Load a category's tools so you can use them.");
|
|
18076
|
+
lines.push(" - Tools become available immediately after loading.");
|
|
18077
|
+
lines.push(" - If you need tools from a category, load it first.");
|
|
18078
|
+
lines.push("");
|
|
18079
|
+
lines.push("**tool_catalog_unload** \u2014 Unload a category to free token budget.");
|
|
18080
|
+
lines.push(" - Unloaded tools are no longer sent to you.");
|
|
18081
|
+
lines.push(" - Use when you're done with a category.");
|
|
18082
|
+
lines.push(" - Pinned categories cannot be unloaded.");
|
|
18083
|
+
lines.push("");
|
|
18084
|
+
const builtIn = this.getAllowedCategories();
|
|
18085
|
+
const connectors = this.getConnectorCategories();
|
|
18086
|
+
if (builtIn.length > 0 || connectors.length > 0) {
|
|
18087
|
+
lines.push("**Available categories:**");
|
|
18088
|
+
for (const cat of builtIn) {
|
|
18089
|
+
const tools = ToolCatalogRegistry.getToolsInCategory(cat.name);
|
|
18090
|
+
const pinned = this._pinnedCategories.has(cat.name) ? " [PINNED]" : "";
|
|
18091
|
+
lines.push(`- ${cat.name} (${tools.length} tools)${pinned}: ${cat.description}`);
|
|
18092
|
+
}
|
|
18093
|
+
for (const cc of connectors) {
|
|
18094
|
+
const pinned = this._pinnedCategories.has(cc.name) ? " [PINNED]" : "";
|
|
18095
|
+
lines.push(`- ${cc.name} (${cc.toolCount} tools)${pinned}: ${cc.description}`);
|
|
18096
|
+
}
|
|
18097
|
+
lines.push("");
|
|
18098
|
+
}
|
|
18099
|
+
lines.push("**Best practices:**");
|
|
18100
|
+
lines.push("- Search first to find the right category before loading.");
|
|
18101
|
+
lines.push("- Unload categories you no longer need to keep context lean.");
|
|
18102
|
+
lines.push("- Categories marked [LOADED] are already available.");
|
|
18103
|
+
lines.push("- Categories marked [PINNED] are always available and cannot be unloaded.");
|
|
18104
|
+
return lines.join("\n");
|
|
18105
|
+
}
|
|
17379
18106
|
keywordSearch(query) {
|
|
17380
18107
|
const lq = query.toLowerCase();
|
|
17381
18108
|
const results = [];
|
|
@@ -17413,12 +18140,17 @@ var ToolCatalogPluginNextGen = class extends BasePluginNextGen {
|
|
|
17413
18140
|
return { query, results, totalMatches: results.length };
|
|
17414
18141
|
}
|
|
17415
18142
|
searchConnectorCategory(category) {
|
|
18143
|
+
const allowed = this.getConnectorCategories().some((cc) => cc.name === category);
|
|
18144
|
+
if (!allowed) {
|
|
18145
|
+
return { error: `Category '${category}' is not available for this agent.` };
|
|
18146
|
+
}
|
|
17416
18147
|
const connectorName = ToolCatalogRegistry.parseConnectorCategory(category);
|
|
17417
18148
|
const tools = ToolCatalogRegistry.resolveConnectorCategoryTools(category);
|
|
17418
18149
|
const loaded = this._loadedCategories.has(category);
|
|
17419
18150
|
return {
|
|
17420
18151
|
category,
|
|
17421
18152
|
loaded,
|
|
18153
|
+
pinned: this._pinnedCategories.has(category),
|
|
17422
18154
|
connectorName,
|
|
17423
18155
|
tools: tools.map((t) => ({
|
|
17424
18156
|
name: t.name,
|
|
@@ -20505,9 +21237,17 @@ var OpenAITextProvider = class extends BaseTextProvider {
|
|
|
20505
21237
|
...options.metadata && { metadata: options.metadata }
|
|
20506
21238
|
};
|
|
20507
21239
|
this.applyReasoningConfig(params, options);
|
|
21240
|
+
console.log(
|
|
21241
|
+
`[OpenAITextProvider] generate: calling OpenAI API (model=${options.model}, tools=${params.tools?.length ?? 0})`
|
|
21242
|
+
);
|
|
21243
|
+
const genStartTime = Date.now();
|
|
20508
21244
|
const response = await this.client.responses.create(params);
|
|
21245
|
+
console.log(
|
|
21246
|
+
`[OpenAITextProvider] generate: response received (${Date.now() - genStartTime}ms)`
|
|
21247
|
+
);
|
|
20509
21248
|
return this.converter.convertResponse(response);
|
|
20510
21249
|
} catch (error) {
|
|
21250
|
+
console.error(`[OpenAITextProvider] generate error (model=${options.model}):`, error.message || error);
|
|
20511
21251
|
this.handleError(error, options.model);
|
|
20512
21252
|
throw error;
|
|
20513
21253
|
}
|
|
@@ -20547,9 +21287,27 @@ var OpenAITextProvider = class extends BaseTextProvider {
|
|
|
20547
21287
|
stream: true
|
|
20548
21288
|
};
|
|
20549
21289
|
this.applyReasoningConfig(params, options);
|
|
21290
|
+
console.log(
|
|
21291
|
+
`[OpenAITextProvider] streamGenerate: calling OpenAI API (model=${options.model}, tools=${params.tools?.length ?? 0})`
|
|
21292
|
+
);
|
|
21293
|
+
const streamStartTime = Date.now();
|
|
20550
21294
|
const stream = await this.client.responses.create(params);
|
|
20551
|
-
|
|
21295
|
+
console.log(
|
|
21296
|
+
`[OpenAITextProvider] streamGenerate: OpenAI stream opened (${Date.now() - streamStartTime}ms)`
|
|
21297
|
+
);
|
|
21298
|
+
let chunkCount = 0;
|
|
21299
|
+
for await (const event of this.streamConverter.convertStream(stream)) {
|
|
21300
|
+
chunkCount++;
|
|
21301
|
+
yield event;
|
|
21302
|
+
}
|
|
21303
|
+
console.log(
|
|
21304
|
+
`[OpenAITextProvider] streamGenerate: stream complete (${chunkCount} events, ${Date.now() - streamStartTime}ms total)`
|
|
21305
|
+
);
|
|
20552
21306
|
} catch (error) {
|
|
21307
|
+
console.error(
|
|
21308
|
+
`[OpenAITextProvider] streamGenerate error (model=${options.model}):`,
|
|
21309
|
+
error.message || error
|
|
21310
|
+
);
|
|
20553
21311
|
this.handleError(error, options.model);
|
|
20554
21312
|
throw error;
|
|
20555
21313
|
}
|
|
@@ -21555,12 +22313,20 @@ var AnthropicTextProvider = class extends BaseTextProvider {
|
|
|
21555
22313
|
return this.executeWithCircuitBreaker(async () => {
|
|
21556
22314
|
try {
|
|
21557
22315
|
const anthropicRequest = this.converter.convertRequest(options);
|
|
22316
|
+
console.log(
|
|
22317
|
+
`[AnthropicTextProvider] generate: calling Anthropic API (model=${options.model}, messages=${anthropicRequest.messages?.length ?? 0}, tools=${anthropicRequest.tools?.length ?? 0})`
|
|
22318
|
+
);
|
|
22319
|
+
const genStartTime = Date.now();
|
|
21558
22320
|
const anthropicResponse = await this.client.messages.create({
|
|
21559
22321
|
...anthropicRequest,
|
|
21560
22322
|
stream: false
|
|
21561
22323
|
});
|
|
22324
|
+
console.log(
|
|
22325
|
+
`[AnthropicTextProvider] generate: response received (${Date.now() - genStartTime}ms)`
|
|
22326
|
+
);
|
|
21562
22327
|
return this.converter.convertResponse(anthropicResponse);
|
|
21563
22328
|
} catch (error) {
|
|
22329
|
+
console.error(`[AnthropicTextProvider] generate error (model=${options.model}):`, error.message || error);
|
|
21564
22330
|
this.handleError(error, options.model);
|
|
21565
22331
|
throw error;
|
|
21566
22332
|
}
|
|
@@ -21572,13 +22338,31 @@ var AnthropicTextProvider = class extends BaseTextProvider {
|
|
|
21572
22338
|
async *streamGenerate(options) {
|
|
21573
22339
|
try {
|
|
21574
22340
|
const anthropicRequest = this.converter.convertRequest(options);
|
|
22341
|
+
console.log(
|
|
22342
|
+
`[AnthropicTextProvider] streamGenerate: calling Anthropic API (model=${options.model}, messages=${anthropicRequest.messages?.length ?? 0}, tools=${anthropicRequest.tools?.length ?? 0})`
|
|
22343
|
+
);
|
|
22344
|
+
const streamStartTime = Date.now();
|
|
21575
22345
|
const stream = await this.client.messages.create({
|
|
21576
22346
|
...anthropicRequest,
|
|
21577
22347
|
stream: true
|
|
21578
22348
|
});
|
|
22349
|
+
console.log(
|
|
22350
|
+
`[AnthropicTextProvider] streamGenerate: Anthropic stream opened (${Date.now() - streamStartTime}ms)`
|
|
22351
|
+
);
|
|
21579
22352
|
this.streamConverter.reset();
|
|
21580
|
-
|
|
22353
|
+
let chunkCount = 0;
|
|
22354
|
+
for await (const event of this.streamConverter.convertStream(stream, options.model)) {
|
|
22355
|
+
chunkCount++;
|
|
22356
|
+
yield event;
|
|
22357
|
+
}
|
|
22358
|
+
console.log(
|
|
22359
|
+
`[AnthropicTextProvider] streamGenerate: stream complete (${chunkCount} events, ${Date.now() - streamStartTime}ms total)`
|
|
22360
|
+
);
|
|
21581
22361
|
} catch (error) {
|
|
22362
|
+
console.error(
|
|
22363
|
+
`[AnthropicTextProvider] streamGenerate error (model=${options.model}):`,
|
|
22364
|
+
error.message || error
|
|
22365
|
+
);
|
|
21582
22366
|
this.handleError(error, options.model);
|
|
21583
22367
|
throw error;
|
|
21584
22368
|
} finally {
|
|
@@ -22372,6 +23156,10 @@ var GoogleTextProvider = class extends BaseTextProvider {
|
|
|
22372
23156
|
// First message only
|
|
22373
23157
|
}, null, 2));
|
|
22374
23158
|
}
|
|
23159
|
+
console.log(
|
|
23160
|
+
`[GoogleTextProvider] generate: calling Google API (model=${options.model}, contents=${googleRequest.contents?.length ?? 0} messages, tools=${googleRequest.tools?.[0]?.functionDeclarations?.length ?? 0} tools)`
|
|
23161
|
+
);
|
|
23162
|
+
const genStartTime = Date.now();
|
|
22375
23163
|
const result = await this.client.models.generateContent({
|
|
22376
23164
|
model: options.model,
|
|
22377
23165
|
contents: googleRequest.contents,
|
|
@@ -22382,6 +23170,9 @@ var GoogleTextProvider = class extends BaseTextProvider {
|
|
|
22382
23170
|
...googleRequest.generationConfig
|
|
22383
23171
|
}
|
|
22384
23172
|
});
|
|
23173
|
+
console.log(
|
|
23174
|
+
`[GoogleTextProvider] generate: response received (${Date.now() - genStartTime}ms)`
|
|
23175
|
+
);
|
|
22385
23176
|
if (process.env.DEBUG_GOOGLE) {
|
|
22386
23177
|
console.error("[DEBUG] Google Response:", JSON.stringify({
|
|
22387
23178
|
candidates: result.candidates?.map((c) => ({
|
|
@@ -22400,6 +23191,7 @@ var GoogleTextProvider = class extends BaseTextProvider {
|
|
|
22400
23191
|
}
|
|
22401
23192
|
return response;
|
|
22402
23193
|
} catch (error) {
|
|
23194
|
+
console.error(`[GoogleTextProvider] generate error (model=${options.model}):`, error.message || error);
|
|
22403
23195
|
this.converter.clearMappings();
|
|
22404
23196
|
this.handleError(error, options.model);
|
|
22405
23197
|
throw error;
|
|
@@ -22412,6 +23204,10 @@ var GoogleTextProvider = class extends BaseTextProvider {
|
|
|
22412
23204
|
async *streamGenerate(options) {
|
|
22413
23205
|
try {
|
|
22414
23206
|
const googleRequest = await this.converter.convertRequest(options);
|
|
23207
|
+
console.log(
|
|
23208
|
+
`[GoogleTextProvider] streamGenerate: calling Google API (model=${options.model}, contents=${googleRequest.contents?.length ?? 0} messages, tools=${googleRequest.tools?.[0]?.functionDeclarations?.length ?? 0} tools)`
|
|
23209
|
+
);
|
|
23210
|
+
const streamStartTime = Date.now();
|
|
22415
23211
|
const stream = await this.client.models.generateContentStream({
|
|
22416
23212
|
model: options.model,
|
|
22417
23213
|
contents: googleRequest.contents,
|
|
@@ -22422,13 +23218,27 @@ var GoogleTextProvider = class extends BaseTextProvider {
|
|
|
22422
23218
|
...googleRequest.generationConfig
|
|
22423
23219
|
}
|
|
22424
23220
|
});
|
|
23221
|
+
console.log(
|
|
23222
|
+
`[GoogleTextProvider] streamGenerate: Google stream opened (${Date.now() - streamStartTime}ms)`
|
|
23223
|
+
);
|
|
22425
23224
|
this.streamConverter.reset();
|
|
22426
|
-
|
|
23225
|
+
let chunkCount = 0;
|
|
23226
|
+
for await (const event of this.streamConverter.convertStream(stream, options.model)) {
|
|
23227
|
+
chunkCount++;
|
|
23228
|
+
yield event;
|
|
23229
|
+
}
|
|
23230
|
+
console.log(
|
|
23231
|
+
`[GoogleTextProvider] streamGenerate: stream complete (${chunkCount} events, ${Date.now() - streamStartTime}ms total)`
|
|
23232
|
+
);
|
|
22427
23233
|
if (!this.streamConverter.hasToolCalls()) {
|
|
22428
23234
|
this.converter.clearMappings();
|
|
22429
23235
|
this.streamConverter.clear();
|
|
22430
23236
|
}
|
|
22431
23237
|
} catch (error) {
|
|
23238
|
+
console.error(
|
|
23239
|
+
`[GoogleTextProvider] streamGenerate error (model=${options.model}):`,
|
|
23240
|
+
error.message || error
|
|
23241
|
+
);
|
|
22432
23242
|
this.converter.clearMappings();
|
|
22433
23243
|
this.streamConverter.clear();
|
|
22434
23244
|
this.handleError(error, options.model);
|
|
@@ -22515,6 +23325,10 @@ var VertexAITextProvider = class extends BaseTextProvider {
|
|
|
22515
23325
|
async generate(options) {
|
|
22516
23326
|
try {
|
|
22517
23327
|
const googleRequest = await this.converter.convertRequest(options);
|
|
23328
|
+
console.log(
|
|
23329
|
+
`[VertexAITextProvider] generate: calling Vertex AI (model=${options.model}, contents=${googleRequest.contents?.length ?? 0} messages, tools=${googleRequest.tools?.[0]?.functionDeclarations?.length ?? 0} tools)`
|
|
23330
|
+
);
|
|
23331
|
+
const genStartTime = Date.now();
|
|
22518
23332
|
const result = await this.client.models.generateContent({
|
|
22519
23333
|
model: options.model,
|
|
22520
23334
|
contents: googleRequest.contents,
|
|
@@ -22525,8 +23339,12 @@ var VertexAITextProvider = class extends BaseTextProvider {
|
|
|
22525
23339
|
...googleRequest.generationConfig
|
|
22526
23340
|
}
|
|
22527
23341
|
});
|
|
23342
|
+
console.log(
|
|
23343
|
+
`[VertexAITextProvider] generate: response received (${Date.now() - genStartTime}ms)`
|
|
23344
|
+
);
|
|
22528
23345
|
return this.converter.convertResponse(result);
|
|
22529
23346
|
} catch (error) {
|
|
23347
|
+
console.error(`[VertexAITextProvider] generate error (model=${options.model}):`, error.message || error);
|
|
22530
23348
|
this.handleError(error, options.model);
|
|
22531
23349
|
throw error;
|
|
22532
23350
|
}
|
|
@@ -22537,6 +23355,10 @@ var VertexAITextProvider = class extends BaseTextProvider {
|
|
|
22537
23355
|
async *streamGenerate(options) {
|
|
22538
23356
|
try {
|
|
22539
23357
|
const googleRequest = await this.converter.convertRequest(options);
|
|
23358
|
+
console.log(
|
|
23359
|
+
`[VertexAITextProvider] streamGenerate: calling Vertex AI (model=${options.model}, contents=${googleRequest.contents?.length ?? 0} messages, tools=${googleRequest.tools?.[0]?.functionDeclarations?.length ?? 0} tools)`
|
|
23360
|
+
);
|
|
23361
|
+
const streamStartTime = Date.now();
|
|
22540
23362
|
const stream = await this.client.models.generateContentStream({
|
|
22541
23363
|
model: options.model,
|
|
22542
23364
|
contents: googleRequest.contents,
|
|
@@ -22547,9 +23369,23 @@ var VertexAITextProvider = class extends BaseTextProvider {
|
|
|
22547
23369
|
...googleRequest.generationConfig
|
|
22548
23370
|
}
|
|
22549
23371
|
});
|
|
23372
|
+
console.log(
|
|
23373
|
+
`[VertexAITextProvider] streamGenerate: Vertex AI stream opened (${Date.now() - streamStartTime}ms)`
|
|
23374
|
+
);
|
|
22550
23375
|
const streamConverter = new GoogleStreamConverter();
|
|
22551
|
-
|
|
23376
|
+
let chunkCount = 0;
|
|
23377
|
+
for await (const event of streamConverter.convertStream(stream, options.model)) {
|
|
23378
|
+
chunkCount++;
|
|
23379
|
+
yield event;
|
|
23380
|
+
}
|
|
23381
|
+
console.log(
|
|
23382
|
+
`[VertexAITextProvider] streamGenerate: stream complete (${chunkCount} events, ${Date.now() - streamStartTime}ms total)`
|
|
23383
|
+
);
|
|
22552
23384
|
} catch (error) {
|
|
23385
|
+
console.error(
|
|
23386
|
+
`[VertexAITextProvider] streamGenerate error (model=${options.model}):`,
|
|
23387
|
+
error.message || error
|
|
23388
|
+
);
|
|
22553
23389
|
this.handleError(error, options.model);
|
|
22554
23390
|
throw error;
|
|
22555
23391
|
}
|
|
@@ -24490,6 +25326,20 @@ var Agent = class _Agent extends BaseAgent {
|
|
|
24490
25326
|
timestamp: /* @__PURE__ */ new Date(),
|
|
24491
25327
|
duration: totalDuration
|
|
24492
25328
|
});
|
|
25329
|
+
const hasTextOutput = response.output_text?.trim() || response.output?.some(
|
|
25330
|
+
(item) => "content" in item && Array.isArray(item.content) && item.content.some((c) => c.type === "output_text" /* OUTPUT_TEXT */ && c.text?.trim())
|
|
25331
|
+
);
|
|
25332
|
+
if (!hasTextOutput) {
|
|
25333
|
+
console.warn(
|
|
25334
|
+
`[Agent] WARNING: ${methodName} completed with zero text output (executionId=${executionId}, iterations=${this.executionContext?.metrics.iterationCount ?? "?"}, tokens=${response.usage?.total_tokens ?? 0})`
|
|
25335
|
+
);
|
|
25336
|
+
this.emit("execution:empty_output", {
|
|
25337
|
+
executionId,
|
|
25338
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
25339
|
+
duration: totalDuration,
|
|
25340
|
+
usage: response.usage
|
|
25341
|
+
});
|
|
25342
|
+
}
|
|
24493
25343
|
const duration = Date.now() - startTime;
|
|
24494
25344
|
this._logger.info({ duration }, `Agent ${methodName} completed`);
|
|
24495
25345
|
metrics.timing(`agent.${methodName}.duration`, duration, { model: this.model, connector: this.connector.name });
|
|
@@ -24544,6 +25394,17 @@ var Agent = class _Agent extends BaseAgent {
|
|
|
24544
25394
|
}
|
|
24545
25395
|
const iterationStartTime = Date.now();
|
|
24546
25396
|
const prepared = await this._agentContext.prepare();
|
|
25397
|
+
const b1 = prepared.budget;
|
|
25398
|
+
const bd1 = b1.breakdown;
|
|
25399
|
+
const bp1 = [
|
|
25400
|
+
`sysPrompt=${bd1.systemPrompt}`,
|
|
25401
|
+
`PI=${bd1.persistentInstructions}`,
|
|
25402
|
+
bd1.pluginInstructions ? `pluginInstr=${bd1.pluginInstructions}` : "",
|
|
25403
|
+
...Object.entries(bd1.pluginContents || {}).map(([k, v]) => `plugin:${k}=${v}`)
|
|
25404
|
+
].filter(Boolean).join(" ");
|
|
25405
|
+
console.log(
|
|
25406
|
+
`[Agent] [Context] iteration=${iteration} tokens: ${b1.totalUsed}/${b1.maxTokens} (${b1.utilizationPercent.toFixed(1)}%) tools=${b1.toolsTokens} conversation=${b1.conversationTokens} system=${b1.systemMessageTokens} input=${b1.currentInputTokens}` + (bp1 ? ` | ${bp1}` : "") + (prepared.compacted ? ` COMPACTED: ${prepared.compactionLog.join("; ")}` : "")
|
|
25407
|
+
);
|
|
24547
25408
|
const response = await this.generateWithHooks(prepared.input, iteration, executionId);
|
|
24548
25409
|
const toolCalls = this.extractToolCalls(response.output);
|
|
24549
25410
|
this._agentContext.addAssistantResponse(response.output);
|
|
@@ -24658,13 +25519,23 @@ var Agent = class _Agent extends BaseAgent {
|
|
|
24658
25519
|
* Build placeholder response for streaming finalization
|
|
24659
25520
|
*/
|
|
24660
25521
|
_buildPlaceholderResponse(executionId, startTime, streamState) {
|
|
25522
|
+
const outputText = streamState.getAllText();
|
|
25523
|
+
const output = [];
|
|
25524
|
+
if (outputText && outputText.trim()) {
|
|
25525
|
+
output.push({
|
|
25526
|
+
type: "message",
|
|
25527
|
+
role: "assistant" /* ASSISTANT */,
|
|
25528
|
+
content: [{ type: "output_text" /* OUTPUT_TEXT */, text: outputText }]
|
|
25529
|
+
});
|
|
25530
|
+
}
|
|
24661
25531
|
return {
|
|
24662
25532
|
id: executionId,
|
|
24663
25533
|
object: "response",
|
|
24664
25534
|
created_at: Math.floor(startTime / 1e3),
|
|
24665
25535
|
status: "completed",
|
|
24666
25536
|
model: this.model,
|
|
24667
|
-
output
|
|
25537
|
+
output,
|
|
25538
|
+
output_text: outputText || void 0,
|
|
24668
25539
|
usage: streamState.usage
|
|
24669
25540
|
};
|
|
24670
25541
|
}
|
|
@@ -24684,6 +25555,17 @@ var Agent = class _Agent extends BaseAgent {
|
|
|
24684
25555
|
break;
|
|
24685
25556
|
}
|
|
24686
25557
|
const prepared = await this._agentContext.prepare();
|
|
25558
|
+
const b2 = prepared.budget;
|
|
25559
|
+
const bd2 = b2.breakdown;
|
|
25560
|
+
const bp2 = [
|
|
25561
|
+
`sysPrompt=${bd2.systemPrompt}`,
|
|
25562
|
+
`PI=${bd2.persistentInstructions}`,
|
|
25563
|
+
bd2.pluginInstructions ? `pluginInstr=${bd2.pluginInstructions}` : "",
|
|
25564
|
+
...Object.entries(bd2.pluginContents || {}).map(([k, v]) => `plugin:${k}=${v}`)
|
|
25565
|
+
].filter(Boolean).join(" ");
|
|
25566
|
+
console.log(
|
|
25567
|
+
`[Agent] [Context] iteration=${iteration} tokens: ${b2.totalUsed}/${b2.maxTokens} (${b2.utilizationPercent.toFixed(1)}%) tools=${b2.toolsTokens} conversation=${b2.conversationTokens} system=${b2.systemMessageTokens} input=${b2.currentInputTokens}` + (bp2 ? ` | ${bp2}` : "") + (prepared.compacted ? ` COMPACTED: ${prepared.compactionLog.join("; ")}` : "")
|
|
25568
|
+
);
|
|
24687
25569
|
const iterationStreamState = new StreamState(executionId, this.model);
|
|
24688
25570
|
const toolCallsMap = /* @__PURE__ */ new Map();
|
|
24689
25571
|
yield* this.streamGenerateWithHooks(
|
|
@@ -33954,13 +34836,13 @@ var TTS_MODEL_REGISTRY = {
|
|
|
33954
34836
|
name: "gemini-2.5-flash-preview-tts",
|
|
33955
34837
|
displayName: "Gemini 2.5 Flash TTS",
|
|
33956
34838
|
provider: Vendor.Google,
|
|
33957
|
-
description: "Google Gemini 2.5 Flash TTS - optimized for low latency",
|
|
34839
|
+
description: "Google Gemini 2.5 Flash TTS - optimized for low latency, 30 voices, 70+ languages",
|
|
33958
34840
|
isActive: true,
|
|
33959
34841
|
releaseDate: "2025-01-01",
|
|
33960
34842
|
sources: {
|
|
33961
34843
|
documentation: "https://ai.google.dev/gemini-api/docs/speech-generation",
|
|
33962
34844
|
pricing: "https://ai.google.dev/pricing",
|
|
33963
|
-
lastVerified: "2026-
|
|
34845
|
+
lastVerified: "2026-03-04"
|
|
33964
34846
|
},
|
|
33965
34847
|
capabilities: {
|
|
33966
34848
|
voices: GEMINI_VOICES,
|
|
@@ -33979,20 +34861,27 @@ var TTS_MODEL_REGISTRY = {
|
|
|
33979
34861
|
wordTimestamps: false
|
|
33980
34862
|
},
|
|
33981
34863
|
limits: { maxInputLength: 32e3 }
|
|
33982
|
-
// 32k
|
|
34864
|
+
// 32k token context window
|
|
34865
|
+
},
|
|
34866
|
+
pricing: {
|
|
34867
|
+
perMInputTokens: 0.5,
|
|
34868
|
+
// $0.50 per 1M input tokens
|
|
34869
|
+
perMOutputTokens: 10,
|
|
34870
|
+
// $10.00 per 1M output tokens
|
|
34871
|
+
currency: "USD"
|
|
33983
34872
|
}
|
|
33984
34873
|
},
|
|
33985
34874
|
"gemini-2.5-pro-preview-tts": {
|
|
33986
34875
|
name: "gemini-2.5-pro-preview-tts",
|
|
33987
34876
|
displayName: "Gemini 2.5 Pro TTS",
|
|
33988
34877
|
provider: Vendor.Google,
|
|
33989
|
-
description: "Google Gemini 2.5 Pro TTS - optimized for quality",
|
|
34878
|
+
description: "Google Gemini 2.5 Pro TTS - optimized for quality, 30 voices, 70+ languages",
|
|
33990
34879
|
isActive: true,
|
|
33991
34880
|
releaseDate: "2025-01-01",
|
|
33992
34881
|
sources: {
|
|
33993
34882
|
documentation: "https://ai.google.dev/gemini-api/docs/speech-generation",
|
|
33994
34883
|
pricing: "https://ai.google.dev/pricing",
|
|
33995
|
-
lastVerified: "2026-
|
|
34884
|
+
lastVerified: "2026-03-04"
|
|
33996
34885
|
},
|
|
33997
34886
|
capabilities: {
|
|
33998
34887
|
voices: GEMINI_VOICES,
|
|
@@ -34011,7 +34900,14 @@ var TTS_MODEL_REGISTRY = {
|
|
|
34011
34900
|
wordTimestamps: false
|
|
34012
34901
|
},
|
|
34013
34902
|
limits: { maxInputLength: 32e3 }
|
|
34014
|
-
// 32k
|
|
34903
|
+
// 32k token context window
|
|
34904
|
+
},
|
|
34905
|
+
pricing: {
|
|
34906
|
+
perMInputTokens: 1,
|
|
34907
|
+
// $1.00 per 1M input tokens
|
|
34908
|
+
perMOutputTokens: 20,
|
|
34909
|
+
// $20.00 per 1M output tokens
|
|
34910
|
+
currency: "USD"
|
|
34015
34911
|
}
|
|
34016
34912
|
}
|
|
34017
34913
|
};
|
|
@@ -34024,10 +34920,18 @@ function getTTSModelsWithFeature(feature) {
|
|
|
34024
34920
|
(model) => model.isActive && model.capabilities.features[feature]
|
|
34025
34921
|
);
|
|
34026
34922
|
}
|
|
34027
|
-
function calculateTTSCost(modelName, characterCount) {
|
|
34923
|
+
function calculateTTSCost(modelName, characterCount, options) {
|
|
34028
34924
|
const model = getTTSModelInfo(modelName);
|
|
34029
34925
|
if (!model?.pricing) return null;
|
|
34030
|
-
|
|
34926
|
+
if (model.pricing.per1kCharacters) {
|
|
34927
|
+
return characterCount / 1e3 * model.pricing.per1kCharacters;
|
|
34928
|
+
}
|
|
34929
|
+
if (model.pricing.perMInputTokens && options?.inputTokens != null) {
|
|
34930
|
+
const inputCost = options.inputTokens / 1e6 * model.pricing.perMInputTokens;
|
|
34931
|
+
const outputCost = options.outputTokens ? options.outputTokens / 1e6 * (model.pricing.perMOutputTokens ?? 0) : 0;
|
|
34932
|
+
return inputCost + outputCost;
|
|
34933
|
+
}
|
|
34934
|
+
return null;
|
|
34031
34935
|
}
|
|
34032
34936
|
var TextToSpeech = class _TextToSpeech {
|
|
34033
34937
|
provider;
|
|
@@ -35473,7 +36377,13 @@ var IMAGE_MODELS = {
|
|
|
35473
36377
|
/** Imagen 4.0 Ultra: Highest quality */
|
|
35474
36378
|
IMAGEN_4_ULTRA: "imagen-4.0-ultra-generate-001",
|
|
35475
36379
|
/** Imagen 4.0 Fast: Optimized for speed */
|
|
35476
|
-
IMAGEN_4_FAST: "imagen-4.0-fast-generate-001"
|
|
36380
|
+
IMAGEN_4_FAST: "imagen-4.0-fast-generate-001",
|
|
36381
|
+
/** Nano Banana 2: Gemini 3.1 Flash native image gen with 4K support */
|
|
36382
|
+
GEMINI_3_1_FLASH_IMAGE: "gemini-3.1-flash-image-preview",
|
|
36383
|
+
/** Nano Banana Pro: Gemini 3 Pro professional design engine with reasoning */
|
|
36384
|
+
GEMINI_3_PRO_IMAGE: "gemini-3-pro-image-preview",
|
|
36385
|
+
/** Nano Banana: Gemini 2.5 Flash native image gen/editing */
|
|
36386
|
+
GEMINI_2_5_FLASH_IMAGE: "gemini-2.5-flash-image"
|
|
35477
36387
|
},
|
|
35478
36388
|
[Vendor.Grok]: {
|
|
35479
36389
|
/** Grok Imagine Image: xAI image generation with editing support */
|
|
@@ -35657,7 +36567,7 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35657
36567
|
sources: {
|
|
35658
36568
|
documentation: "https://ai.google.dev/gemini-api/docs/imagen",
|
|
35659
36569
|
pricing: "https://ai.google.dev/pricing",
|
|
35660
|
-
lastVerified: "2026-
|
|
36570
|
+
lastVerified: "2026-03-04"
|
|
35661
36571
|
},
|
|
35662
36572
|
capabilities: {
|
|
35663
36573
|
sizes: ["1024x1024"],
|
|
@@ -35768,7 +36678,7 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35768
36678
|
sources: {
|
|
35769
36679
|
documentation: "https://ai.google.dev/gemini-api/docs/imagen",
|
|
35770
36680
|
pricing: "https://ai.google.dev/pricing",
|
|
35771
|
-
lastVerified: "2026-
|
|
36681
|
+
lastVerified: "2026-03-04"
|
|
35772
36682
|
},
|
|
35773
36683
|
capabilities: {
|
|
35774
36684
|
sizes: ["1024x1024"],
|
|
@@ -35865,7 +36775,8 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35865
36775
|
}
|
|
35866
36776
|
},
|
|
35867
36777
|
pricing: {
|
|
35868
|
-
perImage: 0.
|
|
36778
|
+
perImage: 0.06,
|
|
36779
|
+
// Updated per official pricing page (was $0.08)
|
|
35869
36780
|
currency: "USD"
|
|
35870
36781
|
}
|
|
35871
36782
|
},
|
|
@@ -35879,7 +36790,7 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35879
36790
|
sources: {
|
|
35880
36791
|
documentation: "https://ai.google.dev/gemini-api/docs/imagen",
|
|
35881
36792
|
pricing: "https://ai.google.dev/pricing",
|
|
35882
|
-
lastVerified: "2026-
|
|
36793
|
+
lastVerified: "2026-03-04"
|
|
35883
36794
|
},
|
|
35884
36795
|
capabilities: {
|
|
35885
36796
|
sizes: ["1024x1024"],
|
|
@@ -35980,6 +36891,141 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35980
36891
|
currency: "USD"
|
|
35981
36892
|
}
|
|
35982
36893
|
},
|
|
36894
|
+
// ======================== Google Nano Banana (Gemini Native Image) ========================
|
|
36895
|
+
"gemini-3.1-flash-image-preview": {
|
|
36896
|
+
name: "gemini-3.1-flash-image-preview",
|
|
36897
|
+
displayName: "Nano Banana 2 (Gemini 3.1 Flash Image)",
|
|
36898
|
+
provider: Vendor.Google,
|
|
36899
|
+
description: "High-efficiency native image generation and editing with 4K support and thinking capabilities",
|
|
36900
|
+
isActive: true,
|
|
36901
|
+
releaseDate: "2026-02-01",
|
|
36902
|
+
sources: {
|
|
36903
|
+
documentation: "https://ai.google.dev/gemini-api/docs/models/gemini-3.1-flash-image-preview",
|
|
36904
|
+
pricing: "https://ai.google.dev/pricing",
|
|
36905
|
+
lastVerified: "2026-03-04"
|
|
36906
|
+
},
|
|
36907
|
+
capabilities: {
|
|
36908
|
+
sizes: ["512x512", "1024x1024", "1536x1536", "auto"],
|
|
36909
|
+
aspectRatios: ["1:1", "1:4", "4:1", "1:8", "8:1"],
|
|
36910
|
+
maxImagesPerRequest: 4,
|
|
36911
|
+
outputFormats: ["png", "jpeg"],
|
|
36912
|
+
features: {
|
|
36913
|
+
generation: true,
|
|
36914
|
+
editing: true,
|
|
36915
|
+
variations: false,
|
|
36916
|
+
styleControl: false,
|
|
36917
|
+
qualityControl: true,
|
|
36918
|
+
// Multiple resolution tiers: 0.5K, 1K, 2K, 4K
|
|
36919
|
+
transparency: false,
|
|
36920
|
+
promptRevision: false
|
|
36921
|
+
},
|
|
36922
|
+
limits: { maxPromptLength: 131072 },
|
|
36923
|
+
// 131K input tokens
|
|
36924
|
+
vendorOptions: {
|
|
36925
|
+
outputImageResolution: {
|
|
36926
|
+
type: "enum",
|
|
36927
|
+
label: "Resolution",
|
|
36928
|
+
description: "Output image resolution tier",
|
|
36929
|
+
enum: ["0.5K", "1K", "2K", "4K"],
|
|
36930
|
+
default: "1K",
|
|
36931
|
+
controlType: "select"
|
|
36932
|
+
}
|
|
36933
|
+
}
|
|
36934
|
+
},
|
|
36935
|
+
pricing: {
|
|
36936
|
+
// Per-image, varies by resolution: $0.045 (512px), $0.067 (1K), $0.101 (2K), $0.151 (4K)
|
|
36937
|
+
perImageStandard: 0.067,
|
|
36938
|
+
// 1K default
|
|
36939
|
+
perImageHD: 0.151,
|
|
36940
|
+
// 4K
|
|
36941
|
+
currency: "USD"
|
|
36942
|
+
}
|
|
36943
|
+
},
|
|
36944
|
+
"gemini-3-pro-image-preview": {
|
|
36945
|
+
name: "gemini-3-pro-image-preview",
|
|
36946
|
+
displayName: "Nano Banana Pro (Gemini 3 Pro Image)",
|
|
36947
|
+
provider: Vendor.Google,
|
|
36948
|
+
description: "Professional design engine with reasoning for studio-quality 4K visuals, complex layouts, and precise text rendering",
|
|
36949
|
+
isActive: true,
|
|
36950
|
+
releaseDate: "2025-11-01",
|
|
36951
|
+
sources: {
|
|
36952
|
+
documentation: "https://ai.google.dev/gemini-api/docs/models/gemini-3-pro-image-preview",
|
|
36953
|
+
pricing: "https://ai.google.dev/pricing",
|
|
36954
|
+
lastVerified: "2026-03-04"
|
|
36955
|
+
},
|
|
36956
|
+
capabilities: {
|
|
36957
|
+
sizes: ["1024x1024", "auto"],
|
|
36958
|
+
aspectRatios: ["1:1", "3:4", "4:3", "9:16", "16:9"],
|
|
36959
|
+
maxImagesPerRequest: 4,
|
|
36960
|
+
outputFormats: ["png", "jpeg"],
|
|
36961
|
+
features: {
|
|
36962
|
+
generation: true,
|
|
36963
|
+
editing: true,
|
|
36964
|
+
variations: false,
|
|
36965
|
+
styleControl: true,
|
|
36966
|
+
// Reasoning-driven design
|
|
36967
|
+
qualityControl: true,
|
|
36968
|
+
// 1K, 2K, 4K tiers
|
|
36969
|
+
transparency: false,
|
|
36970
|
+
promptRevision: false
|
|
36971
|
+
},
|
|
36972
|
+
limits: { maxPromptLength: 65536 },
|
|
36973
|
+
// 65K input tokens
|
|
36974
|
+
vendorOptions: {
|
|
36975
|
+
outputImageResolution: {
|
|
36976
|
+
type: "enum",
|
|
36977
|
+
label: "Resolution",
|
|
36978
|
+
description: "Output image resolution tier",
|
|
36979
|
+
enum: ["1K", "2K", "4K"],
|
|
36980
|
+
default: "1K",
|
|
36981
|
+
controlType: "select"
|
|
36982
|
+
}
|
|
36983
|
+
}
|
|
36984
|
+
},
|
|
36985
|
+
pricing: {
|
|
36986
|
+
// $0.134 per 1K/2K image, $0.24 per 4K image
|
|
36987
|
+
perImageStandard: 0.134,
|
|
36988
|
+
// 1K/2K
|
|
36989
|
+
perImageHD: 0.24,
|
|
36990
|
+
// 4K
|
|
36991
|
+
currency: "USD"
|
|
36992
|
+
}
|
|
36993
|
+
},
|
|
36994
|
+
"gemini-2.5-flash-image": {
|
|
36995
|
+
name: "gemini-2.5-flash-image",
|
|
36996
|
+
displayName: "Nano Banana (Gemini 2.5 Flash Image)",
|
|
36997
|
+
provider: Vendor.Google,
|
|
36998
|
+
description: "Native image generation and editing designed for fast, creative workflows",
|
|
36999
|
+
isActive: true,
|
|
37000
|
+
releaseDate: "2025-10-01",
|
|
37001
|
+
sources: {
|
|
37002
|
+
documentation: "https://ai.google.dev/gemini-api/docs/models/gemini-2.5-flash-image",
|
|
37003
|
+
pricing: "https://ai.google.dev/pricing",
|
|
37004
|
+
lastVerified: "2026-03-04"
|
|
37005
|
+
},
|
|
37006
|
+
capabilities: {
|
|
37007
|
+
sizes: ["1024x1024", "auto"],
|
|
37008
|
+
aspectRatios: ["1:1", "3:4", "4:3", "9:16", "16:9"],
|
|
37009
|
+
maxImagesPerRequest: 4,
|
|
37010
|
+
outputFormats: ["png", "jpeg"],
|
|
37011
|
+
features: {
|
|
37012
|
+
generation: true,
|
|
37013
|
+
editing: true,
|
|
37014
|
+
variations: false,
|
|
37015
|
+
styleControl: false,
|
|
37016
|
+
qualityControl: false,
|
|
37017
|
+
transparency: false,
|
|
37018
|
+
promptRevision: false
|
|
37019
|
+
},
|
|
37020
|
+
limits: { maxPromptLength: 65536 }
|
|
37021
|
+
// 65K input tokens
|
|
37022
|
+
},
|
|
37023
|
+
pricing: {
|
|
37024
|
+
perImage: 0.039,
|
|
37025
|
+
// $0.039 per image
|
|
37026
|
+
currency: "USD"
|
|
37027
|
+
}
|
|
37028
|
+
},
|
|
35983
37029
|
// ======================== xAI Grok ========================
|
|
35984
37030
|
"grok-imagine-image": {
|
|
35985
37031
|
name: "grok-imagine-image",
|
|
@@ -35991,11 +37037,11 @@ var IMAGE_MODEL_REGISTRY = {
|
|
|
35991
37037
|
sources: {
|
|
35992
37038
|
documentation: "https://docs.x.ai/docs/guides/image-generation",
|
|
35993
37039
|
pricing: "https://docs.x.ai/docs/models",
|
|
35994
|
-
lastVerified: "2026-
|
|
37040
|
+
lastVerified: "2026-03-04"
|
|
35995
37041
|
},
|
|
35996
37042
|
capabilities: {
|
|
35997
37043
|
sizes: ["1024x1024"],
|
|
35998
|
-
aspectRatios: ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3"],
|
|
37044
|
+
aspectRatios: ["1:1", "4:3", "3:4", "16:9", "9:16", "3:2", "2:3", "2:1", "1:2"],
|
|
35999
37045
|
maxImagesPerRequest: 10,
|
|
36000
37046
|
outputFormats: ["png", "jpeg"],
|
|
36001
37047
|
features: {
|
|
@@ -37251,9 +38297,9 @@ var OPENAI_SOURCES = {
|
|
|
37251
38297
|
lastVerified: "2026-01-25"
|
|
37252
38298
|
};
|
|
37253
38299
|
var GOOGLE_SOURCES = {
|
|
37254
|
-
documentation: "https://
|
|
37255
|
-
apiReference: "https://
|
|
37256
|
-
lastVerified: "2026-
|
|
38300
|
+
documentation: "https://ai.google.dev/gemini-api/docs/video",
|
|
38301
|
+
apiReference: "https://ai.google.dev/gemini-api/docs/models/veo",
|
|
38302
|
+
lastVerified: "2026-03-04"
|
|
37257
38303
|
};
|
|
37258
38304
|
var GROK_SOURCES = {
|
|
37259
38305
|
documentation: "https://docs.x.ai/docs/guides/video-generations",
|
|
@@ -37327,14 +38373,16 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37327
38373
|
sources: GOOGLE_SOURCES,
|
|
37328
38374
|
capabilities: {
|
|
37329
38375
|
durations: [5, 6, 7, 8],
|
|
37330
|
-
resolutions: [],
|
|
37331
|
-
// Veo 2
|
|
38376
|
+
resolutions: ["720p"],
|
|
38377
|
+
// Veo 2 only supports 720p
|
|
37332
38378
|
aspectRatios: ["16:9", "9:16"],
|
|
37333
38379
|
maxFps: 24,
|
|
37334
38380
|
audio: false,
|
|
37335
|
-
imageToVideo:
|
|
38381
|
+
imageToVideo: false,
|
|
38382
|
+
// Veo 2 does not support reference images
|
|
37336
38383
|
videoExtension: false,
|
|
37337
38384
|
frameControl: true,
|
|
38385
|
+
// First/last frame interpolation supported
|
|
37338
38386
|
features: {
|
|
37339
38387
|
upscaling: false,
|
|
37340
38388
|
styleControl: false,
|
|
@@ -37343,7 +38391,8 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37343
38391
|
}
|
|
37344
38392
|
},
|
|
37345
38393
|
pricing: {
|
|
37346
|
-
perSecond: 0.
|
|
38394
|
+
perSecond: 0.35,
|
|
38395
|
+
// Updated per official pricing page (was $0.03)
|
|
37347
38396
|
currency: "USD"
|
|
37348
38397
|
}
|
|
37349
38398
|
},
|
|
@@ -37355,14 +38404,18 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37355
38404
|
sources: GOOGLE_SOURCES,
|
|
37356
38405
|
capabilities: {
|
|
37357
38406
|
durations: [4, 6, 8],
|
|
37358
|
-
resolutions: ["720p"],
|
|
37359
|
-
//
|
|
38407
|
+
resolutions: ["720p", "1080p", "4k"],
|
|
38408
|
+
// 1080p/4k require 8s duration
|
|
37360
38409
|
aspectRatios: ["16:9", "9:16"],
|
|
37361
38410
|
maxFps: 24,
|
|
37362
38411
|
audio: true,
|
|
38412
|
+
// Native audio generation
|
|
37363
38413
|
imageToVideo: true,
|
|
37364
|
-
|
|
37365
|
-
|
|
38414
|
+
// Up to 3 reference images
|
|
38415
|
+
videoExtension: true,
|
|
38416
|
+
// Supported (720p only)
|
|
38417
|
+
frameControl: true,
|
|
38418
|
+
// First/last frame interpolation
|
|
37366
38419
|
features: {
|
|
37367
38420
|
upscaling: false,
|
|
37368
38421
|
styleControl: false,
|
|
@@ -37371,7 +38424,8 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37371
38424
|
}
|
|
37372
38425
|
},
|
|
37373
38426
|
pricing: {
|
|
37374
|
-
perSecond: 0.
|
|
38427
|
+
perSecond: 0.15,
|
|
38428
|
+
// $0.15 for 720p/1080p, $0.35 for 4K
|
|
37375
38429
|
currency: "USD"
|
|
37376
38430
|
}
|
|
37377
38431
|
},
|
|
@@ -37388,8 +38442,11 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37388
38442
|
aspectRatios: ["16:9", "9:16"],
|
|
37389
38443
|
maxFps: 30,
|
|
37390
38444
|
audio: true,
|
|
38445
|
+
// Native audio generation
|
|
37391
38446
|
imageToVideo: true,
|
|
38447
|
+
// Up to 3 reference images
|
|
37392
38448
|
videoExtension: true,
|
|
38449
|
+
// Supported (720p only)
|
|
37393
38450
|
frameControl: true,
|
|
37394
38451
|
features: {
|
|
37395
38452
|
upscaling: true,
|
|
@@ -37399,7 +38456,8 @@ var VIDEO_MODEL_REGISTRY = {
|
|
|
37399
38456
|
}
|
|
37400
38457
|
},
|
|
37401
38458
|
pricing: {
|
|
37402
|
-
perSecond: 0.
|
|
38459
|
+
perSecond: 0.4,
|
|
38460
|
+
// $0.40 for 720p/1080p, $0.60 for 4K
|
|
37403
38461
|
currency: "USD"
|
|
37404
38462
|
}
|
|
37405
38463
|
},
|
|
@@ -42302,6 +43360,14 @@ var SERVICE_DEFINITIONS = [
|
|
|
42302
43360
|
baseURL: "https://aws.amazon.com",
|
|
42303
43361
|
docsURL: "https://docs.aws.amazon.com/"
|
|
42304
43362
|
},
|
|
43363
|
+
{
|
|
43364
|
+
id: "cloudflare",
|
|
43365
|
+
name: "Cloudflare",
|
|
43366
|
+
category: "cloud",
|
|
43367
|
+
urlPattern: /api\.cloudflare\.com/i,
|
|
43368
|
+
baseURL: "https://api.cloudflare.com/client/v4",
|
|
43369
|
+
docsURL: "https://developers.cloudflare.com/api/"
|
|
43370
|
+
},
|
|
42305
43371
|
// ============ Storage ============
|
|
42306
43372
|
{
|
|
42307
43373
|
id: "dropbox",
|
|
@@ -42345,6 +43411,14 @@ var SERVICE_DEFINITIONS = [
|
|
|
42345
43411
|
baseURL: "https://api.postmarkapp.com",
|
|
42346
43412
|
docsURL: "https://postmarkapp.com/developer"
|
|
42347
43413
|
},
|
|
43414
|
+
{
|
|
43415
|
+
id: "mailgun",
|
|
43416
|
+
name: "Mailgun",
|
|
43417
|
+
category: "email",
|
|
43418
|
+
urlPattern: /api\.mailgun\.net|api\.eu\.mailgun\.net/i,
|
|
43419
|
+
baseURL: "https://api.mailgun.net/v3",
|
|
43420
|
+
docsURL: "https://documentation.mailgun.com/docs/mailgun/api-reference/"
|
|
43421
|
+
},
|
|
42348
43422
|
// ============ Monitoring & Observability ============
|
|
42349
43423
|
{
|
|
42350
43424
|
id: "datadog",
|
|
@@ -45084,6 +46158,43 @@ var awsTemplate = {
|
|
|
45084
46158
|
]
|
|
45085
46159
|
};
|
|
45086
46160
|
|
|
46161
|
+
// src/connectors/vendors/templates/cloudflare.ts
|
|
46162
|
+
var cloudflareTemplate = {
|
|
46163
|
+
id: "cloudflare",
|
|
46164
|
+
name: "Cloudflare",
|
|
46165
|
+
serviceType: "cloudflare",
|
|
46166
|
+
baseURL: "https://api.cloudflare.com/client/v4",
|
|
46167
|
+
docsURL: "https://developers.cloudflare.com/api/",
|
|
46168
|
+
credentialsSetupURL: "https://dash.cloudflare.com/profile/api-tokens",
|
|
46169
|
+
category: "cloud",
|
|
46170
|
+
notes: "API Tokens (recommended) are scoped and more secure. Global API Key requires email and has full account access.",
|
|
46171
|
+
authTemplates: [
|
|
46172
|
+
{
|
|
46173
|
+
id: "api-token",
|
|
46174
|
+
name: "API Token",
|
|
46175
|
+
type: "api_key",
|
|
46176
|
+
description: "Scoped API token (recommended). Create at dash.cloudflare.com > My Profile > API Tokens",
|
|
46177
|
+
requiredFields: ["apiKey"],
|
|
46178
|
+
defaults: {
|
|
46179
|
+
type: "api_key",
|
|
46180
|
+
headerName: "Authorization",
|
|
46181
|
+
headerPrefix: "Bearer"
|
|
46182
|
+
}
|
|
46183
|
+
},
|
|
46184
|
+
{
|
|
46185
|
+
id: "global-api-key",
|
|
46186
|
+
name: "Global API Key",
|
|
46187
|
+
type: "api_key",
|
|
46188
|
+
description: "Legacy global API key + email. Has full account access. Prefer API Tokens for least-privilege access",
|
|
46189
|
+
requiredFields: ["apiKey", "username"],
|
|
46190
|
+
defaults: {
|
|
46191
|
+
type: "api_key",
|
|
46192
|
+
headerName: "X-Auth-Key"
|
|
46193
|
+
}
|
|
46194
|
+
}
|
|
46195
|
+
]
|
|
46196
|
+
};
|
|
46197
|
+
|
|
45087
46198
|
// src/connectors/vendors/templates/dropbox.ts
|
|
45088
46199
|
var dropboxTemplate = {
|
|
45089
46200
|
id: "dropbox",
|
|
@@ -45272,6 +46383,30 @@ var postmarkTemplate = {
|
|
|
45272
46383
|
}
|
|
45273
46384
|
]
|
|
45274
46385
|
};
|
|
46386
|
+
var mailgunTemplate = {
|
|
46387
|
+
id: "mailgun",
|
|
46388
|
+
name: "Mailgun",
|
|
46389
|
+
serviceType: "mailgun",
|
|
46390
|
+
baseURL: "https://api.mailgun.net/v3",
|
|
46391
|
+
docsURL: "https://documentation.mailgun.com/docs/mailgun/api-reference/",
|
|
46392
|
+
credentialsSetupURL: "https://app.mailgun.com/settings/api_security",
|
|
46393
|
+
category: "email",
|
|
46394
|
+
notes: "EU region uses api.eu.mailgun.net. Most endpoints require /v3/<domain> in the path.",
|
|
46395
|
+
authTemplates: [
|
|
46396
|
+
{
|
|
46397
|
+
id: "api-key",
|
|
46398
|
+
name: "API Key",
|
|
46399
|
+
type: "api_key",
|
|
46400
|
+
description: "Private API key for full account access. Find at Settings > API Security",
|
|
46401
|
+
requiredFields: ["apiKey"],
|
|
46402
|
+
defaults: {
|
|
46403
|
+
type: "api_key",
|
|
46404
|
+
headerName: "Authorization",
|
|
46405
|
+
headerPrefix: "Basic"
|
|
46406
|
+
}
|
|
46407
|
+
}
|
|
46408
|
+
]
|
|
46409
|
+
};
|
|
45275
46410
|
|
|
45276
46411
|
// src/connectors/vendors/templates/monitoring.ts
|
|
45277
46412
|
var datadogTemplate = {
|
|
@@ -45720,6 +46855,7 @@ var allVendorTemplates = [
|
|
|
45720
46855
|
rampTemplate,
|
|
45721
46856
|
// Cloud
|
|
45722
46857
|
awsTemplate,
|
|
46858
|
+
cloudflareTemplate,
|
|
45723
46859
|
// Storage
|
|
45724
46860
|
dropboxTemplate,
|
|
45725
46861
|
boxTemplate,
|
|
@@ -45727,6 +46863,7 @@ var allVendorTemplates = [
|
|
|
45727
46863
|
sendgridTemplate,
|
|
45728
46864
|
mailchimpTemplate,
|
|
45729
46865
|
postmarkTemplate,
|
|
46866
|
+
mailgunTemplate,
|
|
45730
46867
|
// Monitoring
|
|
45731
46868
|
datadogTemplate,
|
|
45732
46869
|
pagerdutyTemplate,
|
|
@@ -49084,7 +50221,8 @@ SANDBOX API:
|
|
|
49084
50221
|
4. connectors.get(name) \u2014 Connector info: { displayName, description, baseURL, serviceType }
|
|
49085
50222
|
|
|
49086
50223
|
VARIABLES:
|
|
49087
|
-
\u2022 input \u2014 data passed via the "input" parameter (default: {})
|
|
50224
|
+
\u2022 input \u2014 data passed via the "input" parameter (default: {}). Always a parsed object/array, never a string.
|
|
50225
|
+
CRITICAL: You MUST pass actual data values directly. Template placeholders ({{results}}, {{param.name}}, etc.) are NOT supported and will be passed as literal strings. If you need data from a previous tool call, include the actual returned data in the input object.
|
|
49088
50226
|
\u2022 output \u2014 SET THIS to return your result to the caller
|
|
49089
50227
|
|
|
49090
50228
|
GLOBALS: console.log/error/warn, JSON, Math, Date, Buffer, Promise, Array, Object, String, Number, Boolean, setTimeout, setInterval, URL, URLSearchParams, RegExp, Map, Set, Error, TextEncoder, TextDecoder
|
|
@@ -49107,7 +50245,8 @@ const resp = await authenticatedFetch('/chat.postMessage', {
|
|
|
49107
50245
|
}, 'slack');
|
|
49108
50246
|
output = await resp.json();
|
|
49109
50247
|
${accountIdExamples}
|
|
49110
|
-
// Data processing
|
|
50248
|
+
// Data processing \u2014 pass actual data via the input parameter, NOT template references
|
|
50249
|
+
// e.g. call with: { "code": "...", "input": { "data": [{"score": 0.9}, {"score": 0.5}] } }
|
|
49111
50250
|
const items = input.data;
|
|
49112
50251
|
output = items.filter(i => i.score > 0.8).sort((a, b) => b.score - a.score);
|
|
49113
50252
|
|
|
@@ -49131,7 +50270,7 @@ function createExecuteJavaScriptTool(options) {
|
|
|
49131
50270
|
description: 'JavaScript code to execute. Set the "output" variable with your result. Code is auto-wrapped in async IIFE \u2014 you can use await directly. For explicit async control, wrap in (async () => { ... })().'
|
|
49132
50271
|
},
|
|
49133
50272
|
input: {
|
|
49134
|
-
description: 'Optional data available as the "input" variable in your code.
|
|
50273
|
+
description: 'Optional data available as the "input" variable in your code. IMPORTANT: Pass actual data directly as a JSON object/array. Template placeholders like {{results}} or {{param.name}} are NOT supported here and will be passed as literal strings. You must include the actual data values inline. Correct: "input": {"deals": [{"id":"1"}, ...]}. Wrong: "input": {"deals": "{{results}}"}.'
|
|
49135
50274
|
},
|
|
49136
50275
|
timeout: {
|
|
49137
50276
|
type: "number",
|
|
@@ -49154,9 +50293,19 @@ function createExecuteJavaScriptTool(options) {
|
|
|
49154
50293
|
try {
|
|
49155
50294
|
const timeout = Math.min(Math.max(args.timeout || defaultTimeout, 0), maxTimeout);
|
|
49156
50295
|
const registry = context?.connectorRegistry ?? Connector.asRegistry();
|
|
50296
|
+
let resolvedInput = args.input;
|
|
50297
|
+
if (typeof resolvedInput === "string") {
|
|
50298
|
+
const trimmed = resolvedInput.trim();
|
|
50299
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}") || trimmed.startsWith("[") && trimmed.endsWith("]")) {
|
|
50300
|
+
try {
|
|
50301
|
+
resolvedInput = JSON.parse(trimmed);
|
|
50302
|
+
} catch {
|
|
50303
|
+
}
|
|
50304
|
+
}
|
|
50305
|
+
}
|
|
49157
50306
|
const result = await executeInVM(
|
|
49158
50307
|
args.code,
|
|
49159
|
-
|
|
50308
|
+
resolvedInput,
|
|
49160
50309
|
timeout,
|
|
49161
50310
|
logs,
|
|
49162
50311
|
context?.userId,
|