@aexol/spectral 0.9.263 → 0.9.266
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/extensions/dataset-uploader/exporter.d.ts +25 -4
- package/dist/extensions/dataset-uploader/exporter.d.ts.map +1 -1
- package/dist/extensions/dataset-uploader/exporter.js +37 -6
- package/dist/extensions/dataset-uploader/upload.d.ts.map +1 -1
- package/dist/extensions/dataset-uploader/upload.js +12 -4
- package/dist/generated/zeus/const.d.ts.map +1 -1
- package/dist/generated/zeus/const.js +119 -2
- package/dist/generated/zeus/index.d.ts +825 -0
- package/dist/generated/zeus/index.d.ts.map +1 -1
- package/dist/generated/zeus/index.js +18 -0
- package/dist/mcp/config.d.ts.map +1 -1
- package/dist/mcp/config.js +23 -4
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +31 -3
- package/dist/mcp/state-getter.d.ts +50 -5
- package/dist/mcp/state-getter.d.ts.map +1 -1
- package/dist/mcp/state-getter.js +78 -7
- package/dist/relay/routing.d.ts.map +1 -1
- package/dist/relay/routing.js +18 -8
- package/dist/server/agent-bridge.d.ts +7 -0
- package/dist/server/agent-bridge.d.ts.map +1 -1
- package/dist/server/agent-bridge.js +20 -1
- package/dist/server/handlers/mcp-reload.d.ts +26 -3
- package/dist/server/handlers/mcp-reload.d.ts.map +1 -1
- package/dist/server/handlers/mcp-reload.js +69 -5
- package/dist/server/handlers/mcp-status.d.ts +14 -0
- package/dist/server/handlers/mcp-status.d.ts.map +1 -1
- package/dist/server/handlers/mcp-status.js +31 -0
- package/package.json +1 -1
|
@@ -12,7 +12,13 @@
|
|
|
12
12
|
* matching tool_result → { from: "observation",
|
|
13
13
|
* value: text of result.content,
|
|
14
14
|
* "[ERROR] " prefix when isError }
|
|
15
|
-
*
|
|
15
|
+
* thinking_delta text → { from: "gpt", value:
|
|
16
|
+
* " think\n...\n/think" }
|
|
17
|
+
* (INCLUDED by default;
|
|
18
|
+
* includeThinking: "drop"
|
|
19
|
+
* restores the old
|
|
20
|
+
* non-thinking-target
|
|
21
|
+
* discard behavior)
|
|
16
22
|
*
|
|
17
23
|
* Per-turn expansion: each assistant message row that produces at least one
|
|
18
24
|
* entry becomes one sample — `{ conversations: [all entries up to and
|
|
@@ -70,6 +76,15 @@ export interface ExportSessionsOptions {
|
|
|
70
76
|
* intact). Default false → observations capped at MAX_OBSERVATION_CHARS.
|
|
71
77
|
*/
|
|
72
78
|
includeSubagents?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* How assistant thinking (reasoning) events are exported. "tags"
|
|
81
|
+
* (default): the concatenated thinking_delta text of each thinking
|
|
82
|
+
* block is emitted as a gpt entry wrapped in think tags
|
|
83
|
+
* (` think\n...\n/think`), flushed at the earliest of thinking_end,
|
|
84
|
+
* first text_delta, tool_call, or tool_result. "drop": thinking events
|
|
85
|
+
* are discarded (the old non-thinking-target behavior).
|
|
86
|
+
*/
|
|
87
|
+
includeThinking?: "tags" | "drop";
|
|
73
88
|
/** Output JSONL path. Default: `<configDir>/datasets/export-<timestamp>.jsonl`. */
|
|
74
89
|
outputPath?: string;
|
|
75
90
|
/**
|
|
@@ -132,10 +147,16 @@ export interface ParsedAssistantTurn {
|
|
|
132
147
|
export declare function extractResultText(result: AssistantEvent["result"]): string;
|
|
133
148
|
/**
|
|
134
149
|
* Parse an assistant row's events_jsonl into sharegpt entries, in event
|
|
135
|
-
* order.
|
|
136
|
-
*
|
|
150
|
+
* order. When `includeThinking` is "tags" (default), the concatenated
|
|
151
|
+
* thinking_delta text of each thinking block is flushed as a gpt entry
|
|
152
|
+
* wrapped in think tags (` think\n...\n/think`) at the earliest of
|
|
153
|
+
* thinking_end, first text_delta, tool_call, or tool_result (which also
|
|
154
|
+
* handles the rare mid-row text→thinking→text case). "drop" discards
|
|
155
|
+
* thinking events entirely (byte-identical to the old non-thinking-target
|
|
156
|
+
* behavior). When `capChars` is non-null, observation values are
|
|
157
|
+
* truncated to it + OBSERVATION_TRUNCATION_MARKER.
|
|
137
158
|
*/
|
|
138
|
-
export declare function parseAssistantEvents(eventsJsonl: string, capChars?: number | null): ParsedAssistantTurn;
|
|
159
|
+
export declare function parseAssistantEvents(eventsJsonl: string, capChars?: number | null, includeThinking?: "tags" | "drop"): ParsedAssistantTurn;
|
|
139
160
|
/**
|
|
140
161
|
* Export sessions from the local sessions DB to a sharegpt JSONL file.
|
|
141
162
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/extensions/dataset-uploader/exporter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/extensions/dataset-uploader/exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAkBH,UAAU,iBAAiB;IACzB,GAAG,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;CACtC;AAED,UAAU,UAAU;IAClB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACxC,KAAK,IAAI,IAAI,CAAC;CACf;AAiCD,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAiB3D;AAMD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,GAAG,KAAK,GAAG,eAAe,GAAG,aAAa,CAAC;IACxD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,2EAA2E;AAC3E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,aAAa,EAAE,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U,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,qBAAqB,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,qEAAqE;IACrE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,MAAM,CAO1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,QAAQ,GAAE,MAAM,GAAG,IAAW,EAC9B,eAAe,GAAE,MAAM,GAAG,MAAe,GACxC,mBAAmB,CA4ErB;AA8CD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,oBAAoB,CA4GxF"}
|
|
@@ -12,7 +12,13 @@
|
|
|
12
12
|
* matching tool_result → { from: "observation",
|
|
13
13
|
* value: text of result.content,
|
|
14
14
|
* "[ERROR] " prefix when isError }
|
|
15
|
-
*
|
|
15
|
+
* thinking_delta text → { from: "gpt", value:
|
|
16
|
+
* " think\n...\n/think" }
|
|
17
|
+
* (INCLUDED by default;
|
|
18
|
+
* includeThinking: "drop"
|
|
19
|
+
* restores the old
|
|
20
|
+
* non-thinking-target
|
|
21
|
+
* discard behavior)
|
|
16
22
|
*
|
|
17
23
|
* Per-turn expansion: each assistant message row that produces at least one
|
|
18
24
|
* entry becomes one sample — `{ conversations: [all entries up to and
|
|
@@ -107,20 +113,33 @@ export function extractResultText(result) {
|
|
|
107
113
|
}
|
|
108
114
|
/**
|
|
109
115
|
* Parse an assistant row's events_jsonl into sharegpt entries, in event
|
|
110
|
-
* order.
|
|
111
|
-
*
|
|
116
|
+
* order. When `includeThinking` is "tags" (default), the concatenated
|
|
117
|
+
* thinking_delta text of each thinking block is flushed as a gpt entry
|
|
118
|
+
* wrapped in think tags (` think\n...\n/think`) at the earliest of
|
|
119
|
+
* thinking_end, first text_delta, tool_call, or tool_result (which also
|
|
120
|
+
* handles the rare mid-row text→thinking→text case). "drop" discards
|
|
121
|
+
* thinking events entirely (byte-identical to the old non-thinking-target
|
|
122
|
+
* behavior). When `capChars` is non-null, observation values are
|
|
123
|
+
* truncated to it + OBSERVATION_TRUNCATION_MARKER.
|
|
112
124
|
*/
|
|
113
|
-
export function parseAssistantEvents(eventsJsonl, capChars = null) {
|
|
125
|
+
export function parseAssistantEvents(eventsJsonl, capChars = null, includeThinking = "tags") {
|
|
114
126
|
const entries = [];
|
|
115
127
|
const toolNames = [];
|
|
116
128
|
const pendingCallIds = new Set();
|
|
117
129
|
let textBuffer = "";
|
|
130
|
+
let thinkingBuffer = "";
|
|
118
131
|
const flushText = () => {
|
|
119
132
|
if (textBuffer.length > 0) {
|
|
120
133
|
entries.push({ from: "gpt", value: textBuffer });
|
|
121
134
|
textBuffer = "";
|
|
122
135
|
}
|
|
123
136
|
};
|
|
137
|
+
const flushThinking = () => {
|
|
138
|
+
if (thinkingBuffer.length > 0) {
|
|
139
|
+
entries.push({ from: "gpt", value: ` think\n${thinkingBuffer}\n/think` });
|
|
140
|
+
thinkingBuffer = "";
|
|
141
|
+
}
|
|
142
|
+
};
|
|
124
143
|
for (const line of eventsJsonl.split("\n")) {
|
|
125
144
|
const trimmed = line.trim();
|
|
126
145
|
if (!trimmed)
|
|
@@ -134,9 +153,19 @@ export function parseAssistantEvents(eventsJsonl, capChars = null) {
|
|
|
134
153
|
}
|
|
135
154
|
switch (event.type) {
|
|
136
155
|
case "text_delta":
|
|
156
|
+
// First visible text ends the current thinking block.
|
|
157
|
+
flushThinking();
|
|
137
158
|
textBuffer += event.delta ?? "";
|
|
138
159
|
break;
|
|
160
|
+
case "thinking_delta":
|
|
161
|
+
if (includeThinking !== "drop")
|
|
162
|
+
thinkingBuffer += event.delta ?? "";
|
|
163
|
+
break;
|
|
164
|
+
case "thinking_end":
|
|
165
|
+
flushThinking();
|
|
166
|
+
break;
|
|
139
167
|
case "tool_call":
|
|
168
|
+
flushThinking();
|
|
140
169
|
flushText();
|
|
141
170
|
if (typeof event.name === "string" && event.name.length > 0) {
|
|
142
171
|
entries.push({
|
|
@@ -149,6 +178,7 @@ export function parseAssistantEvents(eventsJsonl, capChars = null) {
|
|
|
149
178
|
}
|
|
150
179
|
break;
|
|
151
180
|
case "tool_result": {
|
|
181
|
+
flushThinking();
|
|
152
182
|
flushText();
|
|
153
183
|
// Only emit observations that match a tool_call from this turn.
|
|
154
184
|
if (typeof event.id !== "string" || !pendingCallIds.has(event.id))
|
|
@@ -164,10 +194,11 @@ export function parseAssistantEvents(eventsJsonl, capChars = null) {
|
|
|
164
194
|
break;
|
|
165
195
|
}
|
|
166
196
|
default:
|
|
167
|
-
//
|
|
197
|
+
// message_*, token_usage, subagent_* → discarded
|
|
168
198
|
break;
|
|
169
199
|
}
|
|
170
200
|
}
|
|
201
|
+
flushThinking();
|
|
171
202
|
flushText();
|
|
172
203
|
return { entries, toolNames };
|
|
173
204
|
}
|
|
@@ -276,7 +307,7 @@ export function exportSessions(options = {}) {
|
|
|
276
307
|
}
|
|
277
308
|
if (row.role !== "assistant")
|
|
278
309
|
continue; // system rows are not part of SFT samples
|
|
279
|
-
const turn = parseAssistantEvents(row.events_jsonl, cap);
|
|
310
|
+
const turn = parseAssistantEvents(row.events_jsonl, cap, options.includeThinking);
|
|
280
311
|
if (turn.entries.length === 0)
|
|
281
312
|
continue;
|
|
282
313
|
for (const name of turn.toolNames) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot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gB,4BAA4B,CAAC,EAAE,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAE7E;AAmFD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CA2H9B;AAMD,mEAAmE;AACnE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CA2CxE"}
|
|
@@ -192,10 +192,18 @@ export async function uploadDataset(options) {
|
|
|
192
192
|
if (projectId)
|
|
193
193
|
args.projectId = projectId;
|
|
194
194
|
const payload = await call(BACKEND_UPLOAD_TOOL, args);
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
const wrapper = (payload && typeof payload === "object" ? payload : {});
|
|
196
|
+
// The backend wraps tool results as `{ ok, result: {...} }`; the
|
|
197
|
+
// DatasetUploadResult counters ({accepted, duplicates, rejected}) live
|
|
198
|
+
// under `result`. Unwrap when present; otherwise fall back to the wrapper
|
|
199
|
+
// itself so older/mock shapes (counters at the top level) and unexpected
|
|
200
|
+
// shapes degrade safely to zero without throwing.
|
|
201
|
+
const resultSource = wrapper.result && typeof wrapper.result === "object"
|
|
202
|
+
? wrapper.result
|
|
203
|
+
: wrapper;
|
|
204
|
+
const accepted = toInt(resultSource.accepted, 0);
|
|
205
|
+
const duplicates = toInt(resultSource.duplicates, 0);
|
|
206
|
+
const rejected = toInt(resultSource.rejected, 0);
|
|
199
207
|
batches.push({ projectId, sent: chunk.length, accepted, duplicates, rejected });
|
|
200
208
|
totals.accepted += accepted;
|
|
201
209
|
totals.duplicates += duplicates;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/generated/zeus/const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/generated/zeus/const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,CAq+B5C,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,CAg/C1C,CAAA;AAED,eAAO,MAAM,GAAG;;;;CAIf,CAAA"}
|
|
@@ -124,6 +124,7 @@ export const AllTypesProps = {
|
|
|
124
124
|
projectUsage: {
|
|
125
125
|
filter: "TeamUsageFilterInput"
|
|
126
126
|
},
|
|
127
|
+
sharedFile: {},
|
|
127
128
|
fromTask: {},
|
|
128
129
|
fromTasks: {},
|
|
129
130
|
presets: {
|
|
@@ -229,7 +230,9 @@ export const AllTypesProps = {
|
|
|
229
230
|
query: "AdminVastAiOfferQueryInput"
|
|
230
231
|
},
|
|
231
232
|
adminRunPodPods: {},
|
|
232
|
-
adminDeployConfig: {}
|
|
233
|
+
adminDeployConfig: {},
|
|
234
|
+
adminColdStartRuns: {},
|
|
235
|
+
adminColdStartRun: {}
|
|
233
236
|
},
|
|
234
237
|
Mutation: {
|
|
235
238
|
register: {
|
|
@@ -315,6 +318,8 @@ export const AllTypesProps = {
|
|
|
315
318
|
input: "UpdateProjectFileInput"
|
|
316
319
|
},
|
|
317
320
|
deleteProjectFile: {},
|
|
321
|
+
shareProjectFile: {},
|
|
322
|
+
unshareProjectFile: {},
|
|
318
323
|
generateAexolFromText: {
|
|
319
324
|
input: "GenerateAexolFromTextInput"
|
|
320
325
|
},
|
|
@@ -396,6 +401,18 @@ export const AllTypesProps = {
|
|
|
396
401
|
input: "AdminUpdateDeployConfigInput"
|
|
397
402
|
},
|
|
398
403
|
adminDeleteDeployConfig: {},
|
|
404
|
+
adminCreateColdStartProfile: {
|
|
405
|
+
input: "AdminColdStartProfileInput"
|
|
406
|
+
},
|
|
407
|
+
adminUpdateColdStartProfile: {
|
|
408
|
+
input: "AdminUpdateColdStartProfileInput"
|
|
409
|
+
},
|
|
410
|
+
adminDeleteColdStartProfile: {},
|
|
411
|
+
adminStartColdStartRun: {},
|
|
412
|
+
adminStopColdStartRun: {
|
|
413
|
+
mode: "ColdStartStopMode"
|
|
414
|
+
},
|
|
415
|
+
adminPollColdStartRun: {},
|
|
399
416
|
adminCreateBuiltInModel: {
|
|
400
417
|
input: "CreateBuiltInModelInput"
|
|
401
418
|
},
|
|
@@ -570,6 +587,10 @@ export const AllTypesProps = {
|
|
|
570
587
|
},
|
|
571
588
|
AdminCreateDeployConfigInput: {},
|
|
572
589
|
AdminUpdateDeployConfigInput: {},
|
|
590
|
+
ColdStartRunStatus: "enum",
|
|
591
|
+
AdminColdStartProfileInput: {},
|
|
592
|
+
AdminUpdateColdStartProfileInput: {},
|
|
593
|
+
ColdStartStopMode: "enum",
|
|
573
594
|
BaseModelUpdateInput: {},
|
|
574
595
|
BaseModelCreateInput: {
|
|
575
596
|
capabilities: "JSON"
|
|
@@ -840,6 +861,15 @@ export const ReturnTypes = {
|
|
|
840
861
|
createdAt: "DateTime",
|
|
841
862
|
updatedAt: "DateTime"
|
|
842
863
|
},
|
|
864
|
+
SharedProjectFile: {
|
|
865
|
+
name: "String",
|
|
866
|
+
content: "String",
|
|
867
|
+
updatedAt: "DateTime"
|
|
868
|
+
},
|
|
869
|
+
ShareProjectFileResult: {
|
|
870
|
+
fileId: "ID",
|
|
871
|
+
token: "String"
|
|
872
|
+
},
|
|
843
873
|
PresetFollowUpMessage: {
|
|
844
874
|
content: "String",
|
|
845
875
|
mode: "FollowUpMode"
|
|
@@ -1070,6 +1100,7 @@ export const ReturnTypes = {
|
|
|
1070
1100
|
project: "Project",
|
|
1071
1101
|
projects: "Project",
|
|
1072
1102
|
projectUsage: "ProjectUsage",
|
|
1103
|
+
sharedFile: "SharedProjectFile",
|
|
1073
1104
|
fromTask: "FromTask",
|
|
1074
1105
|
fromTasks: "FromTask",
|
|
1075
1106
|
presets: "Preset",
|
|
@@ -1153,7 +1184,10 @@ export const ReturnTypes = {
|
|
|
1153
1184
|
adminRunPodPods: "AdminRunPodPod",
|
|
1154
1185
|
adminRunPodGpuTypes: "AdminRunPodGpuType",
|
|
1155
1186
|
adminDeployConfigs: "AdminDeployConfig",
|
|
1156
|
-
adminDeployConfig: "AdminDeployConfig"
|
|
1187
|
+
adminDeployConfig: "AdminDeployConfig",
|
|
1188
|
+
adminColdStartProfiles: "AdminColdStartProfile",
|
|
1189
|
+
adminColdStartRuns: "ColdStartRun",
|
|
1190
|
+
adminColdStartRun: "ColdStartRun"
|
|
1157
1191
|
},
|
|
1158
1192
|
Mutation: {
|
|
1159
1193
|
register: "AuthPayload",
|
|
@@ -1202,6 +1236,8 @@ export const ReturnTypes = {
|
|
|
1202
1236
|
createProjectFile: "ProjectFile",
|
|
1203
1237
|
updateProjectFile: "ProjectFile",
|
|
1204
1238
|
deleteProjectFile: "Boolean",
|
|
1239
|
+
shareProjectFile: "ShareProjectFileResult",
|
|
1240
|
+
unshareProjectFile: "Boolean",
|
|
1205
1241
|
generateAexolFromText: "FromTask",
|
|
1206
1242
|
cancelFromTask: "Boolean",
|
|
1207
1243
|
requestCloudDocumentUpload: "CloudDocumentUpload",
|
|
@@ -1245,6 +1281,13 @@ export const ReturnTypes = {
|
|
|
1245
1281
|
adminCreateDeployConfig: "AdminDeployConfig",
|
|
1246
1282
|
adminUpdateDeployConfig: "AdminDeployConfig",
|
|
1247
1283
|
adminDeleteDeployConfig: "Boolean",
|
|
1284
|
+
adminCreateColdStartProfile: "AdminColdStartProfile",
|
|
1285
|
+
adminUpdateColdStartProfile: "AdminColdStartProfile",
|
|
1286
|
+
adminDeleteColdStartProfile: "Boolean",
|
|
1287
|
+
adminStartColdStartRun: "StartColdStartResult",
|
|
1288
|
+
adminStopColdStartRun: "ColdStartRun",
|
|
1289
|
+
adminPollColdStartRun: "ColdStartRun",
|
|
1290
|
+
adminReconcileColdStartRuns: "ReconcileColdStartRunsResult",
|
|
1248
1291
|
adminCreateBuiltInModel: "UserModel",
|
|
1249
1292
|
adminUpdateBuiltInModel: "UserModel",
|
|
1250
1293
|
adminDeleteBuiltInModel: "Boolean",
|
|
@@ -1347,6 +1390,7 @@ export const ReturnTypes = {
|
|
|
1347
1390
|
subscriptionConnectable: "Boolean",
|
|
1348
1391
|
upstreamApiFormat: "ModelApiFormat",
|
|
1349
1392
|
restrictedToTeams: "Boolean",
|
|
1393
|
+
coldStartEnabled: "Boolean",
|
|
1350
1394
|
allowedTeamIds: "ID",
|
|
1351
1395
|
defaultThinkingLevel: "String",
|
|
1352
1396
|
contextWindow: "Int",
|
|
@@ -1911,6 +1955,79 @@ export const ReturnTypes = {
|
|
|
1911
1955
|
createdAt: "DateTime",
|
|
1912
1956
|
updatedAt: "DateTime"
|
|
1913
1957
|
},
|
|
1958
|
+
AdminColdStartProfile: {
|
|
1959
|
+
id: "String",
|
|
1960
|
+
name: "String",
|
|
1961
|
+
description: "String",
|
|
1962
|
+
targetUserModelSlug: "String",
|
|
1963
|
+
servedModelName: "String",
|
|
1964
|
+
hfModel: "String",
|
|
1965
|
+
gpuNames: "String",
|
|
1966
|
+
minGpus: "Int",
|
|
1967
|
+
minVramGb: "Int",
|
|
1968
|
+
maxPricePerHourUsd: "Float",
|
|
1969
|
+
minReliability: "Float",
|
|
1970
|
+
verifiedOnly: "Boolean",
|
|
1971
|
+
datacenterOnly: "Boolean",
|
|
1972
|
+
geolocations: "String",
|
|
1973
|
+
dockerImage: "String",
|
|
1974
|
+
startCommand: "String",
|
|
1975
|
+
diskGb: "Int",
|
|
1976
|
+
exposedPorts: "String",
|
|
1977
|
+
useVolume: "Boolean",
|
|
1978
|
+
volumeSizeGb: "Int",
|
|
1979
|
+
volumeMountPath: "String",
|
|
1980
|
+
reuseExistingVolume: "Boolean",
|
|
1981
|
+
lastVolumeMachineId: "String",
|
|
1982
|
+
lastVolumeName: "String",
|
|
1983
|
+
pollIntervalSec: "Int",
|
|
1984
|
+
readyTimeoutSec: "Int",
|
|
1985
|
+
healthProbePath: "String",
|
|
1986
|
+
maxRuntimeHours: "Int",
|
|
1987
|
+
autoDestroyOnFailure: "Boolean",
|
|
1988
|
+
autoStartOnRequest: "Boolean",
|
|
1989
|
+
enabled: "Boolean",
|
|
1990
|
+
createdAt: "DateTime",
|
|
1991
|
+
updatedAt: "DateTime"
|
|
1992
|
+
},
|
|
1993
|
+
ColdStartRun: {
|
|
1994
|
+
id: "String",
|
|
1995
|
+
profileId: "String",
|
|
1996
|
+
userModelId: "String",
|
|
1997
|
+
status: "ColdStartRunStatus",
|
|
1998
|
+
offerId: "String",
|
|
1999
|
+
machineId: "String",
|
|
2000
|
+
instanceId: "String",
|
|
2001
|
+
publicIp: "String",
|
|
2002
|
+
hostPort: "Int",
|
|
2003
|
+
gpuName: "String",
|
|
2004
|
+
numGpus: "Int",
|
|
2005
|
+
pricePerHourUsd: "Float",
|
|
2006
|
+
volumeId: "String",
|
|
2007
|
+
discoveredUrl: "String",
|
|
2008
|
+
servedModelName: "String",
|
|
2009
|
+
previousCustomBaseUrl: "String",
|
|
2010
|
+
previousBaseModel: "String",
|
|
2011
|
+
volumeName: "String",
|
|
2012
|
+
error: "String",
|
|
2013
|
+
onstartScript: "String",
|
|
2014
|
+
attemptedOfferIds: "String",
|
|
2015
|
+
needsManualAction: "Boolean",
|
|
2016
|
+
startedAt: "DateTime",
|
|
2017
|
+
readyAt: "DateTime",
|
|
2018
|
+
finishedAt: "DateTime",
|
|
2019
|
+
createdAt: "DateTime",
|
|
2020
|
+
updatedAt: "DateTime"
|
|
2021
|
+
},
|
|
2022
|
+
StartColdStartResult: {
|
|
2023
|
+
run: "ColdStartRun",
|
|
2024
|
+
created: "Boolean"
|
|
2025
|
+
},
|
|
2026
|
+
ReconcileColdStartRunsResult: {
|
|
2027
|
+
resumed: "Int",
|
|
2028
|
+
failed: "Int",
|
|
2029
|
+
swept: "Int"
|
|
2030
|
+
},
|
|
1914
2031
|
OpenRouterModelProvider: {
|
|
1915
2032
|
name: "String",
|
|
1916
2033
|
label: "String"
|