@tpitre/story-ui 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/story-generator/llm-providers/claude-provider.d.ts.map +1 -1
- package/dist/story-generator/llm-providers/claude-provider.js +3 -58
- package/dist/story-generator/llm-providers/gemini-provider.d.ts.map +1 -1
- package/dist/story-generator/llm-providers/gemini-provider.js +3 -63
- package/dist/story-generator/llm-providers/openai-provider.d.ts.map +1 -1
- package/dist/story-generator/llm-providers/openai-provider.js +8 -97
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/claude-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"claude-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/claude-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAiGrD,qBAAa,cAAe,SAAQ,eAAe;IACjD,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAY;IACvC,QAAQ,CAAC,eAAe,cAAiB;gBAE7B,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAUtC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAkE1E,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,OAAO,CAAC,EAAE,WAAW,GACpB,aAAa,CAAC,WAAW,CAAC;IAuGvB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAgD/D,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,cAAc;IAgCtB,OAAO,CAAC,eAAe;IAoBvB,OAAO,CAAC,aAAa;IAiBrB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAMrC;AAGD,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAErF"}
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { BaseLLMProvider } from './base-provider.js';
|
|
7
7
|
import { logger } from '../logger.js';
|
|
8
|
-
// Claude model definitions - Updated
|
|
9
|
-
//
|
|
8
|
+
// Claude model definitions - Updated December 2025
|
|
9
|
+
// Top 4 models only - Reference: Anthropic API documentation
|
|
10
10
|
const CLAUDE_MODELS = [
|
|
11
|
-
// Latest Claude 4.x models (Recommended)
|
|
12
11
|
{
|
|
13
12
|
id: 'claude-opus-4-5-20251101',
|
|
14
13
|
name: 'Claude Opus 4.5',
|
|
@@ -48,7 +47,6 @@ const CLAUDE_MODELS = [
|
|
|
48
47
|
inputPricePer1kTokens: 0.0008,
|
|
49
48
|
outputPricePer1kTokens: 0.004,
|
|
50
49
|
},
|
|
51
|
-
// Claude 4.0 models
|
|
52
50
|
{
|
|
53
51
|
id: 'claude-sonnet-4-20250514',
|
|
54
52
|
name: 'Claude Sonnet 4',
|
|
@@ -62,62 +60,9 @@ const CLAUDE_MODELS = [
|
|
|
62
60
|
inputPricePer1kTokens: 0.003,
|
|
63
61
|
outputPricePer1kTokens: 0.015,
|
|
64
62
|
},
|
|
65
|
-
{
|
|
66
|
-
id: 'claude-opus-4-20250514',
|
|
67
|
-
name: 'Claude Opus 4',
|
|
68
|
-
provider: 'claude',
|
|
69
|
-
contextWindow: 200000,
|
|
70
|
-
maxOutputTokens: 32000,
|
|
71
|
-
supportsVision: true,
|
|
72
|
-
supportsDocuments: true,
|
|
73
|
-
supportsFunctionCalling: true,
|
|
74
|
-
supportsStreaming: true,
|
|
75
|
-
inputPricePer1kTokens: 0.015,
|
|
76
|
-
outputPricePer1kTokens: 0.075,
|
|
77
|
-
},
|
|
78
|
-
// Legacy models (deprecated - use newer versions)
|
|
79
|
-
{
|
|
80
|
-
id: 'claude-3-7-sonnet-20250219',
|
|
81
|
-
name: 'Claude 3.7 Sonnet (Legacy)',
|
|
82
|
-
provider: 'claude',
|
|
83
|
-
contextWindow: 200000,
|
|
84
|
-
maxOutputTokens: 16000,
|
|
85
|
-
supportsVision: true,
|
|
86
|
-
supportsDocuments: true,
|
|
87
|
-
supportsFunctionCalling: true,
|
|
88
|
-
supportsStreaming: true,
|
|
89
|
-
inputPricePer1kTokens: 0.003,
|
|
90
|
-
outputPricePer1kTokens: 0.015,
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
id: 'claude-3-5-sonnet-20241022',
|
|
94
|
-
name: 'Claude 3.5 Sonnet (Deprecated)',
|
|
95
|
-
provider: 'claude',
|
|
96
|
-
contextWindow: 200000,
|
|
97
|
-
maxOutputTokens: 8192,
|
|
98
|
-
supportsVision: true,
|
|
99
|
-
supportsDocuments: true,
|
|
100
|
-
supportsFunctionCalling: true,
|
|
101
|
-
supportsStreaming: true,
|
|
102
|
-
inputPricePer1kTokens: 0.003,
|
|
103
|
-
outputPricePer1kTokens: 0.015,
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: 'claude-3-5-haiku-20241022',
|
|
107
|
-
name: 'Claude 3.5 Haiku (Deprecated)',
|
|
108
|
-
provider: 'claude',
|
|
109
|
-
contextWindow: 200000,
|
|
110
|
-
maxOutputTokens: 8192,
|
|
111
|
-
supportsVision: true,
|
|
112
|
-
supportsDocuments: false,
|
|
113
|
-
supportsFunctionCalling: true,
|
|
114
|
-
supportsStreaming: true,
|
|
115
|
-
inputPricePer1kTokens: 0.0008,
|
|
116
|
-
outputPricePer1kTokens: 0.004,
|
|
117
|
-
},
|
|
118
63
|
];
|
|
119
64
|
// Default model - Claude Sonnet 4.5 (recommended for agents and coding)
|
|
120
|
-
const DEFAULT_MODEL = 'claude-
|
|
65
|
+
const DEFAULT_MODEL = 'claude-opus-4-5-20251101';
|
|
121
66
|
// API configuration
|
|
122
67
|
const ANTHROPIC_API_URL = 'https://api.anthropic.com/v1/messages';
|
|
123
68
|
const ANTHROPIC_VERSION = '2023-06-01';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/gemini-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"gemini-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/gemini-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoGrD,qBAAa,cAAe,SAAQ,eAAe;IACjD,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAY;IACvC,QAAQ,CAAC,eAAe,cAAiB;gBAE7B,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAU5C,OAAO,CAAC,SAAS;IAKX,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IA6D1E,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,OAAO,CAAC,EAAE,WAAW,GACpB,aAAa,CAAC,WAAW,CAAC;IA+GvB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA8C/D,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,cAAc;IAqCtB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,eAAe;IAiBvB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAKrC;AAGD,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAErF"}
|
|
@@ -6,25 +6,8 @@
|
|
|
6
6
|
import { BaseLLMProvider } from './base-provider.js';
|
|
7
7
|
import { logger } from '../logger.js';
|
|
8
8
|
// Gemini model definitions - Updated December 2025
|
|
9
|
-
// Reference: https://ai.google.dev/gemini-api/docs/models
|
|
9
|
+
// Top 4 models only - Reference: https://ai.google.dev/gemini-api/docs/models
|
|
10
10
|
const GEMINI_MODELS = [
|
|
11
|
-
// Gemini 3 Series - Latest
|
|
12
|
-
{
|
|
13
|
-
id: 'gemini-3-pro-preview',
|
|
14
|
-
name: 'Gemini 3 Pro (Preview)',
|
|
15
|
-
provider: 'gemini',
|
|
16
|
-
contextWindow: 1048576, // 1M tokens input
|
|
17
|
-
maxOutputTokens: 65536,
|
|
18
|
-
supportsVision: true,
|
|
19
|
-
supportsDocuments: true,
|
|
20
|
-
supportsFunctionCalling: true,
|
|
21
|
-
supportsStreaming: true,
|
|
22
|
-
supportsReasoning: true,
|
|
23
|
-
inputPricePer1kTokens: 0.002,
|
|
24
|
-
outputPricePer1kTokens: 0.012,
|
|
25
|
-
description: 'Most capable Gemini model with advanced reasoning.',
|
|
26
|
-
},
|
|
27
|
-
// Gemini 2.5 Series
|
|
28
11
|
{
|
|
29
12
|
id: 'gemini-2.5-pro',
|
|
30
13
|
name: 'Gemini 2.5 Pro',
|
|
@@ -38,7 +21,6 @@ const GEMINI_MODELS = [
|
|
|
38
21
|
supportsReasoning: true,
|
|
39
22
|
inputPricePer1kTokens: 0.00125,
|
|
40
23
|
outputPricePer1kTokens: 0.01,
|
|
41
|
-
description: 'Gemini 2.5 Pro with enhanced reasoning.',
|
|
42
24
|
},
|
|
43
25
|
{
|
|
44
26
|
id: 'gemini-2.5-flash',
|
|
@@ -53,21 +35,6 @@ const GEMINI_MODELS = [
|
|
|
53
35
|
supportsReasoning: true,
|
|
54
36
|
inputPricePer1kTokens: 0.00015,
|
|
55
37
|
outputPricePer1kTokens: 0.0006,
|
|
56
|
-
description: 'Fast Gemini 2.5 Flash with adaptive thinking.',
|
|
57
|
-
},
|
|
58
|
-
// Gemini 2.0 Series
|
|
59
|
-
{
|
|
60
|
-
id: 'gemini-2.0-flash-exp',
|
|
61
|
-
name: 'Gemini 2.0 Flash Experimental',
|
|
62
|
-
provider: 'gemini',
|
|
63
|
-
contextWindow: 1048576,
|
|
64
|
-
maxOutputTokens: 8192,
|
|
65
|
-
supportsVision: true,
|
|
66
|
-
supportsDocuments: true,
|
|
67
|
-
supportsFunctionCalling: true,
|
|
68
|
-
supportsStreaming: true,
|
|
69
|
-
inputPricePer1kTokens: 0.00,
|
|
70
|
-
outputPricePer1kTokens: 0.00,
|
|
71
38
|
},
|
|
72
39
|
{
|
|
73
40
|
id: 'gemini-2.0-flash',
|
|
@@ -82,7 +49,6 @@ const GEMINI_MODELS = [
|
|
|
82
49
|
inputPricePer1kTokens: 0.00,
|
|
83
50
|
outputPricePer1kTokens: 0.00,
|
|
84
51
|
},
|
|
85
|
-
// Gemini 1.5 Series (Legacy)
|
|
86
52
|
{
|
|
87
53
|
id: 'gemini-1.5-pro',
|
|
88
54
|
name: 'Gemini 1.5 Pro',
|
|
@@ -96,35 +62,9 @@ const GEMINI_MODELS = [
|
|
|
96
62
|
inputPricePer1kTokens: 0.00125,
|
|
97
63
|
outputPricePer1kTokens: 0.005,
|
|
98
64
|
},
|
|
99
|
-
{
|
|
100
|
-
id: 'gemini-1.5-flash',
|
|
101
|
-
name: 'Gemini 1.5 Flash',
|
|
102
|
-
provider: 'gemini',
|
|
103
|
-
contextWindow: 1048576,
|
|
104
|
-
maxOutputTokens: 8192,
|
|
105
|
-
supportsVision: true,
|
|
106
|
-
supportsDocuments: true,
|
|
107
|
-
supportsFunctionCalling: true,
|
|
108
|
-
supportsStreaming: true,
|
|
109
|
-
inputPricePer1kTokens: 0.000075,
|
|
110
|
-
outputPricePer1kTokens: 0.0003,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
id: 'gemini-1.5-flash-8b',
|
|
114
|
-
name: 'Gemini 1.5 Flash 8B',
|
|
115
|
-
provider: 'gemini',
|
|
116
|
-
contextWindow: 1048576,
|
|
117
|
-
maxOutputTokens: 8192,
|
|
118
|
-
supportsVision: true,
|
|
119
|
-
supportsDocuments: true,
|
|
120
|
-
supportsFunctionCalling: true,
|
|
121
|
-
supportsStreaming: true,
|
|
122
|
-
inputPricePer1kTokens: 0.0000375,
|
|
123
|
-
outputPricePer1kTokens: 0.00015,
|
|
124
|
-
},
|
|
125
65
|
];
|
|
126
|
-
// Default model
|
|
127
|
-
const DEFAULT_MODEL = 'gemini-2.
|
|
66
|
+
// Default model - Gemini 2.5 Pro (recommended)
|
|
67
|
+
const DEFAULT_MODEL = 'gemini-2.5-pro';
|
|
128
68
|
// API configuration
|
|
129
69
|
const GEMINI_API_BASE = 'https://generativelanguage.googleapis.com/v1beta/models';
|
|
130
70
|
export class GeminiProvider extends BaseLLMProvider {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/openai-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"openai-provider.d.ts","sourceRoot":"","sources":["../../../story-generator/llm-providers/openai-provider.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAsGrD,qBAAa,cAAe,SAAQ,eAAe;IACjD,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAY;IACvC,QAAQ,CAAC,eAAe,cAAiB;gBAE7B,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAUtC,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAmE1E,UAAU,CACf,QAAQ,EAAE,WAAW,EAAE,EACvB,OAAO,CAAC,EAAE,WAAW,GACpB,aAAa,CAAC,WAAW,CAAC;IA6GvB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA+C/D,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;IAmBvB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAKrC;AAGD,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAErF"}
|
|
@@ -5,13 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { BaseLLMProvider } from './base-provider.js';
|
|
7
7
|
import { logger } from '../logger.js';
|
|
8
|
-
// OpenAI model definitions - Updated
|
|
9
|
-
// Reference: https://openai.com/
|
|
8
|
+
// OpenAI model definitions - Updated December 2025
|
|
9
|
+
// Reference: https://platform.openai.com/docs/guides/latest-model
|
|
10
10
|
const OPENAI_MODELS = [
|
|
11
|
-
// GPT-5.1 Series - Latest (November 2025)
|
|
12
11
|
{
|
|
13
|
-
id: 'gpt-5.
|
|
14
|
-
name: 'GPT-5.
|
|
12
|
+
id: 'gpt-5.2',
|
|
13
|
+
name: 'GPT-5.2',
|
|
15
14
|
provider: 'openai',
|
|
16
15
|
contextWindow: 256000,
|
|
17
16
|
maxOutputTokens: 32768,
|
|
@@ -19,47 +18,15 @@ const OPENAI_MODELS = [
|
|
|
19
18
|
supportsDocuments: true,
|
|
20
19
|
supportsFunctionCalling: true,
|
|
21
20
|
supportsStreaming: true,
|
|
22
|
-
supportsReasoning: true,
|
|
21
|
+
supportsReasoning: true,
|
|
23
22
|
inputPricePer1kTokens: 0.005,
|
|
24
23
|
outputPricePer1kTokens: 0.015,
|
|
25
|
-
description: 'Latest GPT-5 series. 76.3% on SWE-bench. Adaptive reasoning capability.',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'gpt-5.1-chat-latest',
|
|
29
|
-
name: 'GPT-5.1 Instant',
|
|
30
|
-
provider: 'openai',
|
|
31
|
-
contextWindow: 256000,
|
|
32
|
-
maxOutputTokens: 32768,
|
|
33
|
-
supportsVision: true,
|
|
34
|
-
supportsDocuments: true,
|
|
35
|
-
supportsFunctionCalling: true,
|
|
36
|
-
supportsStreaming: true,
|
|
37
|
-
supportsReasoning: true,
|
|
38
|
-
inputPricePer1kTokens: 0.003,
|
|
39
|
-
outputPricePer1kTokens: 0.012,
|
|
40
|
-
description: 'More conversational GPT-5.1 with improved instruction following.',
|
|
41
24
|
},
|
|
42
25
|
{
|
|
43
|
-
id: 'gpt-5.1
|
|
44
|
-
name: 'GPT-5.1
|
|
26
|
+
id: 'gpt-5.1',
|
|
27
|
+
name: 'GPT-5.1',
|
|
45
28
|
provider: 'openai',
|
|
46
29
|
contextWindow: 256000,
|
|
47
|
-
maxOutputTokens: 65536,
|
|
48
|
-
supportsVision: true,
|
|
49
|
-
supportsDocuments: true,
|
|
50
|
-
supportsFunctionCalling: true,
|
|
51
|
-
supportsStreaming: true,
|
|
52
|
-
supportsReasoning: true,
|
|
53
|
-
inputPricePer1kTokens: 0.008,
|
|
54
|
-
outputPricePer1kTokens: 0.024,
|
|
55
|
-
description: 'Extended thinking mode for complex reasoning tasks.',
|
|
56
|
-
},
|
|
57
|
-
// GPT-5 Original (August 2025)
|
|
58
|
-
{
|
|
59
|
-
id: 'gpt-5',
|
|
60
|
-
name: 'GPT-5',
|
|
61
|
-
provider: 'openai',
|
|
62
|
-
contextWindow: 200000,
|
|
63
30
|
maxOutputTokens: 32768,
|
|
64
31
|
supportsVision: true,
|
|
65
32
|
supportsDocuments: true,
|
|
@@ -68,9 +35,7 @@ const OPENAI_MODELS = [
|
|
|
68
35
|
supportsReasoning: true,
|
|
69
36
|
inputPricePer1kTokens: 0.005,
|
|
70
37
|
outputPricePer1kTokens: 0.015,
|
|
71
|
-
description: 'Multimodal foundation model combining reasoning and general capabilities.',
|
|
72
38
|
},
|
|
73
|
-
// GPT-4o Series
|
|
74
39
|
{
|
|
75
40
|
id: 'gpt-4o',
|
|
76
41
|
name: 'GPT-4o',
|
|
@@ -97,63 +62,9 @@ const OPENAI_MODELS = [
|
|
|
97
62
|
inputPricePer1kTokens: 0.00015,
|
|
98
63
|
outputPricePer1kTokens: 0.0006,
|
|
99
64
|
},
|
|
100
|
-
// o1 Reasoning Series
|
|
101
|
-
{
|
|
102
|
-
id: 'o1',
|
|
103
|
-
name: 'o1 (Reasoning)',
|
|
104
|
-
provider: 'openai',
|
|
105
|
-
contextWindow: 200000,
|
|
106
|
-
maxOutputTokens: 100000,
|
|
107
|
-
supportsVision: true,
|
|
108
|
-
supportsDocuments: false,
|
|
109
|
-
supportsFunctionCalling: true,
|
|
110
|
-
supportsStreaming: true,
|
|
111
|
-
inputPricePer1kTokens: 0.015,
|
|
112
|
-
outputPricePer1kTokens: 0.06,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: 'o1-mini',
|
|
116
|
-
name: 'o1 Mini (Reasoning)',
|
|
117
|
-
provider: 'openai',
|
|
118
|
-
contextWindow: 128000,
|
|
119
|
-
maxOutputTokens: 65536,
|
|
120
|
-
supportsVision: false,
|
|
121
|
-
supportsDocuments: false,
|
|
122
|
-
supportsFunctionCalling: true,
|
|
123
|
-
supportsStreaming: true,
|
|
124
|
-
inputPricePer1kTokens: 0.003,
|
|
125
|
-
outputPricePer1kTokens: 0.012,
|
|
126
|
-
},
|
|
127
|
-
// Legacy GPT-4 Series
|
|
128
|
-
{
|
|
129
|
-
id: 'gpt-4-turbo',
|
|
130
|
-
name: 'GPT-4 Turbo',
|
|
131
|
-
provider: 'openai',
|
|
132
|
-
contextWindow: 128000,
|
|
133
|
-
maxOutputTokens: 4096,
|
|
134
|
-
supportsVision: true,
|
|
135
|
-
supportsDocuments: false,
|
|
136
|
-
supportsFunctionCalling: true,
|
|
137
|
-
supportsStreaming: true,
|
|
138
|
-
inputPricePer1kTokens: 0.01,
|
|
139
|
-
outputPricePer1kTokens: 0.03,
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: 'gpt-3.5-turbo',
|
|
143
|
-
name: 'GPT-3.5 Turbo (Legacy)',
|
|
144
|
-
provider: 'openai',
|
|
145
|
-
contextWindow: 16385,
|
|
146
|
-
maxOutputTokens: 4096,
|
|
147
|
-
supportsVision: false,
|
|
148
|
-
supportsDocuments: false,
|
|
149
|
-
supportsFunctionCalling: true,
|
|
150
|
-
supportsStreaming: true,
|
|
151
|
-
inputPricePer1kTokens: 0.0005,
|
|
152
|
-
outputPricePer1kTokens: 0.0015,
|
|
153
|
-
},
|
|
154
65
|
];
|
|
155
66
|
// Default model - Updated to latest GPT-5.1 (December 2025)
|
|
156
|
-
const DEFAULT_MODEL = 'gpt-5.
|
|
67
|
+
const DEFAULT_MODEL = 'gpt-5.2';
|
|
157
68
|
// API configuration
|
|
158
69
|
const OPENAI_API_URL = 'https://api.openai.com/v1/chat/completions';
|
|
159
70
|
export class OpenAIProvider extends BaseLLMProvider {
|