@mozaik-ai/core 4.0.6 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +292 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -512,10 +512,19 @@ declare function defineRuntime<TRuntimeState extends RuntimeState>(): {
|
|
|
512
512
|
|
|
513
513
|
declare const supportedModels: GenerativeModel[];
|
|
514
514
|
|
|
515
|
+
/**
|
|
516
|
+
* Optional connection config. When omitted, the `openai` SDK reads
|
|
517
|
+
* `OPENAI_API_KEY` and `OPENAI_BASE_URL` from the environment.
|
|
518
|
+
*/
|
|
519
|
+
interface OpenAIResponsesConfig {
|
|
520
|
+
baseURL?: string;
|
|
521
|
+
apiKey?: string;
|
|
522
|
+
}
|
|
515
523
|
declare class OpenAIResponses implements Endpoint {
|
|
516
524
|
endpointMapper: InferenceEndpointMapper;
|
|
517
525
|
private _client?;
|
|
518
|
-
|
|
526
|
+
private readonly clientConfig;
|
|
527
|
+
constructor(endpointMapper?: InferenceEndpointMapper, config?: OpenAIResponsesConfig);
|
|
519
528
|
private get client();
|
|
520
529
|
infer(inferenceInput: InferenceInput): Promise<InferenceOutput>;
|
|
521
530
|
stream(inferenceInput: InferenceInput): AsyncIterable<SemanticEvent>;
|
package/dist/index.d.ts
CHANGED
|
@@ -512,10 +512,19 @@ declare function defineRuntime<TRuntimeState extends RuntimeState>(): {
|
|
|
512
512
|
|
|
513
513
|
declare const supportedModels: GenerativeModel[];
|
|
514
514
|
|
|
515
|
+
/**
|
|
516
|
+
* Optional connection config. When omitted, the `openai` SDK reads
|
|
517
|
+
* `OPENAI_API_KEY` and `OPENAI_BASE_URL` from the environment.
|
|
518
|
+
*/
|
|
519
|
+
interface OpenAIResponsesConfig {
|
|
520
|
+
baseURL?: string;
|
|
521
|
+
apiKey?: string;
|
|
522
|
+
}
|
|
515
523
|
declare class OpenAIResponses implements Endpoint {
|
|
516
524
|
endpointMapper: InferenceEndpointMapper;
|
|
517
525
|
private _client?;
|
|
518
|
-
|
|
526
|
+
private readonly clientConfig;
|
|
527
|
+
constructor(endpointMapper?: InferenceEndpointMapper, config?: OpenAIResponsesConfig);
|
|
519
528
|
private get client();
|
|
520
529
|
infer(inferenceInput: InferenceInput): Promise<InferenceOutput>;
|
|
521
530
|
stream(inferenceInput: InferenceInput): AsyncIterable<SemanticEvent>;
|
package/dist/index.js
CHANGED
|
@@ -1346,12 +1346,16 @@ var OpenAIResponsesMapper = class {
|
|
|
1346
1346
|
|
|
1347
1347
|
// src/infrastructure/providers/openai/endpoints/openai-responses.ts
|
|
1348
1348
|
var OpenAIResponses = class {
|
|
1349
|
-
constructor(endpointMapper = new OpenAIResponsesMapper()) {
|
|
1349
|
+
constructor(endpointMapper = new OpenAIResponsesMapper(), config = {}) {
|
|
1350
1350
|
this.endpointMapper = endpointMapper;
|
|
1351
|
+
this.clientConfig = config;
|
|
1351
1352
|
}
|
|
1352
1353
|
get client() {
|
|
1353
1354
|
var _a;
|
|
1354
|
-
return (_a = this._client) != null ? _a : this._client = new import_openai.default(
|
|
1355
|
+
return (_a = this._client) != null ? _a : this._client = new import_openai.default({
|
|
1356
|
+
baseURL: this.clientConfig.baseURL,
|
|
1357
|
+
apiKey: this.clientConfig.apiKey
|
|
1358
|
+
});
|
|
1355
1359
|
}
|
|
1356
1360
|
async infer(inferenceInput) {
|
|
1357
1361
|
const request = this.endpointMapper.toRequest(inferenceInput);
|
|
@@ -1982,6 +1986,248 @@ var claudeHaiku45Specification = {
|
|
|
1982
1986
|
supportsStructuredOutput: true
|
|
1983
1987
|
};
|
|
1984
1988
|
|
|
1989
|
+
// src/infrastructure/providers/openai/models/gpt-6-astra.ts
|
|
1990
|
+
var gpt6AstraSpecification = {
|
|
1991
|
+
name: "gpt-6-astra",
|
|
1992
|
+
provider: "openai",
|
|
1993
|
+
supportsReasoningEffort: true,
|
|
1994
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
1995
|
+
supportedContextItemTypes: [
|
|
1996
|
+
"user_message",
|
|
1997
|
+
"system_message",
|
|
1998
|
+
"developer_message",
|
|
1999
|
+
"reasoning",
|
|
2000
|
+
"function_call",
|
|
2001
|
+
"function_call_output",
|
|
2002
|
+
"model_message"
|
|
2003
|
+
],
|
|
2004
|
+
supportsStreaming: true,
|
|
2005
|
+
contextWindowSize: 105e4,
|
|
2006
|
+
maxOutputTokens: 128e3,
|
|
2007
|
+
supportsFunctionCalling: true,
|
|
2008
|
+
supportsStructuredOutput: true
|
|
2009
|
+
};
|
|
2010
|
+
|
|
2011
|
+
// src/infrastructure/providers/openai/models/gpt-6-1-sol.ts
|
|
2012
|
+
var gpt61SolSpecification = {
|
|
2013
|
+
name: "gpt-6.1-sol",
|
|
2014
|
+
provider: "openai",
|
|
2015
|
+
supportsReasoningEffort: true,
|
|
2016
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
2017
|
+
supportedContextItemTypes: [
|
|
2018
|
+
"user_message",
|
|
2019
|
+
"system_message",
|
|
2020
|
+
"developer_message",
|
|
2021
|
+
"reasoning",
|
|
2022
|
+
"function_call",
|
|
2023
|
+
"function_call_output",
|
|
2024
|
+
"model_message"
|
|
2025
|
+
],
|
|
2026
|
+
supportsStreaming: true,
|
|
2027
|
+
contextWindowSize: 105e4,
|
|
2028
|
+
maxOutputTokens: 128e3,
|
|
2029
|
+
supportsFunctionCalling: true,
|
|
2030
|
+
supportsStructuredOutput: true
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
// src/infrastructure/providers/openai/models/gpt-6-sol.ts
|
|
2034
|
+
var gpt6SolSpecification = {
|
|
2035
|
+
name: "gpt-6-sol",
|
|
2036
|
+
provider: "openai",
|
|
2037
|
+
supportsReasoningEffort: true,
|
|
2038
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low", "none"],
|
|
2039
|
+
supportedContextItemTypes: [
|
|
2040
|
+
"user_message",
|
|
2041
|
+
"system_message",
|
|
2042
|
+
"developer_message",
|
|
2043
|
+
"reasoning",
|
|
2044
|
+
"function_call",
|
|
2045
|
+
"function_call_output",
|
|
2046
|
+
"model_message"
|
|
2047
|
+
],
|
|
2048
|
+
supportsStreaming: true,
|
|
2049
|
+
contextWindowSize: 105e4,
|
|
2050
|
+
maxOutputTokens: 128e3,
|
|
2051
|
+
supportsFunctionCalling: true,
|
|
2052
|
+
supportsStructuredOutput: true
|
|
2053
|
+
};
|
|
2054
|
+
|
|
2055
|
+
// src/infrastructure/providers/openai/models/gpt-6-luna.ts
|
|
2056
|
+
var gpt6LunaSpecification = {
|
|
2057
|
+
name: "gpt-6-luna",
|
|
2058
|
+
provider: "openai",
|
|
2059
|
+
supportsReasoningEffort: true,
|
|
2060
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low", "none"],
|
|
2061
|
+
supportedContextItemTypes: [
|
|
2062
|
+
"user_message",
|
|
2063
|
+
"system_message",
|
|
2064
|
+
"developer_message",
|
|
2065
|
+
"reasoning",
|
|
2066
|
+
"function_call",
|
|
2067
|
+
"function_call_output",
|
|
2068
|
+
"model_message"
|
|
2069
|
+
],
|
|
2070
|
+
supportsStreaming: true,
|
|
2071
|
+
contextWindowSize: 105e4,
|
|
2072
|
+
maxOutputTokens: 128e3,
|
|
2073
|
+
supportsFunctionCalling: true,
|
|
2074
|
+
supportsStructuredOutput: true
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
// src/infrastructure/providers/anthropic/models/claude-5-1-fable.ts
|
|
2078
|
+
var claudeFable51Specification = {
|
|
2079
|
+
name: "claude-fable-5-1",
|
|
2080
|
+
provider: "anthropic",
|
|
2081
|
+
supportsReasoningEffort: true,
|
|
2082
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
2083
|
+
supportedContextItemTypes: [
|
|
2084
|
+
"user_message",
|
|
2085
|
+
"system_message",
|
|
2086
|
+
"developer_message",
|
|
2087
|
+
"reasoning",
|
|
2088
|
+
"function_call",
|
|
2089
|
+
"function_call_output",
|
|
2090
|
+
"model_message"
|
|
2091
|
+
],
|
|
2092
|
+
supportsStreaming: true,
|
|
2093
|
+
contextWindowSize: 1e6,
|
|
2094
|
+
maxOutputTokens: 128e3,
|
|
2095
|
+
supportsFunctionCalling: true,
|
|
2096
|
+
supportsStructuredOutput: true
|
|
2097
|
+
};
|
|
2098
|
+
|
|
2099
|
+
// src/infrastructure/providers/anthropic/models/claude-5-5-opus.ts
|
|
2100
|
+
var claudeOpus55Specification = {
|
|
2101
|
+
name: "claude-opus-5-5",
|
|
2102
|
+
provider: "anthropic",
|
|
2103
|
+
supportsReasoningEffort: true,
|
|
2104
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
2105
|
+
supportedContextItemTypes: [
|
|
2106
|
+
"user_message",
|
|
2107
|
+
"system_message",
|
|
2108
|
+
"developer_message",
|
|
2109
|
+
"reasoning",
|
|
2110
|
+
"function_call",
|
|
2111
|
+
"function_call_output",
|
|
2112
|
+
"model_message"
|
|
2113
|
+
],
|
|
2114
|
+
supportsStreaming: true,
|
|
2115
|
+
contextWindowSize: 1e6,
|
|
2116
|
+
maxOutputTokens: 128e3,
|
|
2117
|
+
supportsFunctionCalling: true,
|
|
2118
|
+
supportsStructuredOutput: true
|
|
2119
|
+
};
|
|
2120
|
+
|
|
2121
|
+
// src/infrastructure/providers/anthropic/models/claude-5-5-sonnet.ts
|
|
2122
|
+
var claudeSonnet55Specification = {
|
|
2123
|
+
name: "claude-sonnet-5-5",
|
|
2124
|
+
provider: "anthropic",
|
|
2125
|
+
supportsReasoningEffort: true,
|
|
2126
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
2127
|
+
supportedContextItemTypes: [
|
|
2128
|
+
"user_message",
|
|
2129
|
+
"system_message",
|
|
2130
|
+
"developer_message",
|
|
2131
|
+
"reasoning",
|
|
2132
|
+
"function_call",
|
|
2133
|
+
"function_call_output",
|
|
2134
|
+
"model_message"
|
|
2135
|
+
],
|
|
2136
|
+
supportsStreaming: true,
|
|
2137
|
+
contextWindowSize: 1e6,
|
|
2138
|
+
maxOutputTokens: 128e3,
|
|
2139
|
+
supportsFunctionCalling: true,
|
|
2140
|
+
supportsStructuredOutput: true
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
// src/infrastructure/providers/anthropic/models/claude-5-sonnet.ts
|
|
2144
|
+
var claudeSonnet5Specification = {
|
|
2145
|
+
name: "claude-sonnet-5",
|
|
2146
|
+
provider: "anthropic",
|
|
2147
|
+
supportsReasoningEffort: true,
|
|
2148
|
+
supportedReasoningEfforts: ["max", "xhigh", "high", "medium", "low"],
|
|
2149
|
+
supportedContextItemTypes: [
|
|
2150
|
+
"user_message",
|
|
2151
|
+
"system_message",
|
|
2152
|
+
"developer_message",
|
|
2153
|
+
"reasoning",
|
|
2154
|
+
"function_call",
|
|
2155
|
+
"function_call_output",
|
|
2156
|
+
"model_message"
|
|
2157
|
+
],
|
|
2158
|
+
supportsStreaming: true,
|
|
2159
|
+
contextWindowSize: 1e6,
|
|
2160
|
+
maxOutputTokens: 128e3,
|
|
2161
|
+
supportsFunctionCalling: true,
|
|
2162
|
+
supportsStructuredOutput: true
|
|
2163
|
+
};
|
|
2164
|
+
|
|
2165
|
+
// src/infrastructure/providers/gemini/models/gemini-3-8-flash.ts
|
|
2166
|
+
var gemini38FlashSpecification = {
|
|
2167
|
+
name: "gemini-3.8-flash",
|
|
2168
|
+
provider: "google",
|
|
2169
|
+
supportsReasoningEffort: true,
|
|
2170
|
+
supportedReasoningEfforts: ["high", "medium", "low"],
|
|
2171
|
+
supportedContextItemTypes: [
|
|
2172
|
+
"user_message",
|
|
2173
|
+
"system_message",
|
|
2174
|
+
"developer_message",
|
|
2175
|
+
"reasoning",
|
|
2176
|
+
"function_call",
|
|
2177
|
+
"function_call_output",
|
|
2178
|
+
"model_message"
|
|
2179
|
+
],
|
|
2180
|
+
supportsStreaming: true,
|
|
2181
|
+
contextWindowSize: 1048576,
|
|
2182
|
+
maxOutputTokens: 65536,
|
|
2183
|
+
supportsFunctionCalling: true,
|
|
2184
|
+
supportsStructuredOutput: true
|
|
2185
|
+
};
|
|
2186
|
+
|
|
2187
|
+
// src/infrastructure/providers/gemini/models/gemini-3-5-flash-lite.ts
|
|
2188
|
+
var gemini35FlashLiteSpecification = {
|
|
2189
|
+
name: "gemini-3.5-flash-lite",
|
|
2190
|
+
provider: "google",
|
|
2191
|
+
supportsReasoningEffort: true,
|
|
2192
|
+
supportedReasoningEfforts: ["high", "medium", "low", "minimal"],
|
|
2193
|
+
supportedContextItemTypes: [
|
|
2194
|
+
"user_message",
|
|
2195
|
+
"system_message",
|
|
2196
|
+
"developer_message",
|
|
2197
|
+
"reasoning",
|
|
2198
|
+
"function_call",
|
|
2199
|
+
"function_call_output",
|
|
2200
|
+
"model_message"
|
|
2201
|
+
],
|
|
2202
|
+
supportsStreaming: true,
|
|
2203
|
+
contextWindowSize: 1048576,
|
|
2204
|
+
maxOutputTokens: 65536,
|
|
2205
|
+
supportsFunctionCalling: true,
|
|
2206
|
+
supportsStructuredOutput: true
|
|
2207
|
+
};
|
|
2208
|
+
|
|
2209
|
+
// src/infrastructure/providers/deepseek/models/deepseek-flash.ts
|
|
2210
|
+
var deepSeekFlashSpecification = {
|
|
2211
|
+
name: "deepseek-flash",
|
|
2212
|
+
provider: "deepseek",
|
|
2213
|
+
supportsReasoningEffort: true,
|
|
2214
|
+
supportedReasoningEfforts: ["max", "high", "medium", "low", "none"],
|
|
2215
|
+
supportedContextItemTypes: [
|
|
2216
|
+
"user_message",
|
|
2217
|
+
"system_message",
|
|
2218
|
+
"developer_message",
|
|
2219
|
+
"reasoning",
|
|
2220
|
+
"function_call",
|
|
2221
|
+
"function_call_output",
|
|
2222
|
+
"model_message"
|
|
2223
|
+
],
|
|
2224
|
+
supportsStreaming: true,
|
|
2225
|
+
contextWindowSize: 1e6,
|
|
2226
|
+
maxOutputTokens: 384e3,
|
|
2227
|
+
supportsFunctionCalling: true,
|
|
2228
|
+
supportsStructuredOutput: false
|
|
2229
|
+
};
|
|
2230
|
+
|
|
1985
2231
|
// src/application/services/models.ts
|
|
1986
2232
|
var supportedModels = [
|
|
1987
2233
|
{
|
|
@@ -2000,6 +2246,22 @@ var supportedModels = [
|
|
|
2000
2246
|
endpoint: new OpenAIResponses(),
|
|
2001
2247
|
specification: gpt55Specification
|
|
2002
2248
|
},
|
|
2249
|
+
{
|
|
2250
|
+
endpoint: new OpenAIResponses(),
|
|
2251
|
+
specification: gpt6LunaSpecification
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
endpoint: new OpenAIResponses(),
|
|
2255
|
+
specification: gpt6SolSpecification
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
endpoint: new OpenAIResponses(),
|
|
2259
|
+
specification: gpt61SolSpecification
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
endpoint: new OpenAIResponses(),
|
|
2263
|
+
specification: gpt6AstraSpecification
|
|
2264
|
+
},
|
|
2003
2265
|
{
|
|
2004
2266
|
endpoint: new AnthropicMessages(),
|
|
2005
2267
|
specification: claudeHaiku45Specification
|
|
@@ -2016,6 +2278,22 @@ var supportedModels = [
|
|
|
2016
2278
|
endpoint: new AnthropicMessages(),
|
|
2017
2279
|
specification: claudeOpus48Specification
|
|
2018
2280
|
},
|
|
2281
|
+
{
|
|
2282
|
+
endpoint: new AnthropicMessages(),
|
|
2283
|
+
specification: claudeSonnet5Specification
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
endpoint: new AnthropicMessages(),
|
|
2287
|
+
specification: claudeSonnet55Specification
|
|
2288
|
+
},
|
|
2289
|
+
{
|
|
2290
|
+
endpoint: new AnthropicMessages(),
|
|
2291
|
+
specification: claudeOpus55Specification
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
endpoint: new AnthropicMessages(),
|
|
2295
|
+
specification: claudeFable51Specification
|
|
2296
|
+
},
|
|
2019
2297
|
{
|
|
2020
2298
|
endpoint: new GeminiGenerateContent(),
|
|
2021
2299
|
specification: gemini35FlashSpecification
|
|
@@ -2024,6 +2302,14 @@ var supportedModels = [
|
|
|
2024
2302
|
endpoint: new GeminiGenerateContent(),
|
|
2025
2303
|
specification: gemini31ProSpecification
|
|
2026
2304
|
},
|
|
2305
|
+
{
|
|
2306
|
+
endpoint: new GeminiGenerateContent(),
|
|
2307
|
+
specification: gemini35FlashLiteSpecification
|
|
2308
|
+
},
|
|
2309
|
+
{
|
|
2310
|
+
endpoint: new GeminiGenerateContent(),
|
|
2311
|
+
specification: gemini38FlashSpecification
|
|
2312
|
+
},
|
|
2027
2313
|
{
|
|
2028
2314
|
endpoint: new OpenAIChatCompletions(),
|
|
2029
2315
|
specification: deepSeekV4FlashSpecification
|
|
@@ -2031,6 +2317,10 @@ var supportedModels = [
|
|
|
2031
2317
|
{
|
|
2032
2318
|
endpoint: new OpenAIChatCompletions(),
|
|
2033
2319
|
specification: deepSeekV4ProSpecification
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
endpoint: new OpenAIChatCompletions(),
|
|
2323
|
+
specification: deepSeekFlashSpecification
|
|
2034
2324
|
}
|
|
2035
2325
|
];
|
|
2036
2326
|
|