@shop-os/modelkit 0.3.7 → 0.4.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/CHANGELOG.md +23 -0
- package/README.md +2 -2
- package/dist/catalog.cjs +3 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.cts +12 -1
- package/dist/catalog.d.ts +12 -1
- package/dist/catalog.js +3 -1
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +118 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +118 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.d.cts
CHANGED
|
@@ -181,6 +181,8 @@ interface VideoToolSubmission {
|
|
|
181
181
|
responseUrl: string;
|
|
182
182
|
cancelUrl: string;
|
|
183
183
|
output: VideoToolOutputSpec;
|
|
184
|
+
/** Epoch ms when the kit submitted the job; the result's usage `latencyMs` is measured from it. */
|
|
185
|
+
submittedAt?: number;
|
|
184
186
|
}
|
|
185
187
|
type VideoToolStatus = "queued" | "running" | "completed";
|
|
186
188
|
interface VideoToolResult {
|
|
@@ -520,6 +522,13 @@ interface UsageEvent {
|
|
|
520
522
|
inputTokens?: number;
|
|
521
523
|
outputTokens?: number;
|
|
522
524
|
reportedCostUsd?: number;
|
|
525
|
+
/**
|
|
526
|
+
* Wall time of the kit call that produced this event, in ms: from dispatch to the
|
|
527
|
+
* provider's final answer (a video's polling included; a multi-step text call's tool
|
|
528
|
+
* steps included). Absent only where the kit never saw the start (a video tool whose
|
|
529
|
+
* submission carries no `submittedAt`).
|
|
530
|
+
*/
|
|
531
|
+
latencyMs?: number;
|
|
523
532
|
raw?: unknown;
|
|
524
533
|
}
|
|
525
534
|
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "cloudflare";
|
|
@@ -1138,7 +1147,9 @@ declare function promptConventions(row: {
|
|
|
1138
1147
|
|
|
1139
1148
|
/** Provider body or the lifted detail (Gemini blockReason, fal body.detail). */
|
|
1140
1149
|
type ProviderErrorBody = string | JsonValue;
|
|
1141
|
-
type ModelKitErrorCode = "unknown_model" | "unsupported_option" | "missing_input" | "content_blocked" | "provider_rejected"
|
|
1150
|
+
type ModelKitErrorCode = "unknown_model" | "unsupported_option" | "missing_input" | "content_blocked" | "provider_rejected"
|
|
1151
|
+
/** The provider account is out of credit or quota (HTTP 402 and its body spellings). Never retried. */
|
|
1152
|
+
| "provider_billing" | "timeout" | "auth" | "network" | "rate_limited";
|
|
1142
1153
|
interface ModelKitErrorInit {
|
|
1143
1154
|
code: ModelKitErrorCode;
|
|
1144
1155
|
message: string;
|
package/dist/catalog.d.ts
CHANGED
|
@@ -181,6 +181,8 @@ interface VideoToolSubmission {
|
|
|
181
181
|
responseUrl: string;
|
|
182
182
|
cancelUrl: string;
|
|
183
183
|
output: VideoToolOutputSpec;
|
|
184
|
+
/** Epoch ms when the kit submitted the job; the result's usage `latencyMs` is measured from it. */
|
|
185
|
+
submittedAt?: number;
|
|
184
186
|
}
|
|
185
187
|
type VideoToolStatus = "queued" | "running" | "completed";
|
|
186
188
|
interface VideoToolResult {
|
|
@@ -520,6 +522,13 @@ interface UsageEvent {
|
|
|
520
522
|
inputTokens?: number;
|
|
521
523
|
outputTokens?: number;
|
|
522
524
|
reportedCostUsd?: number;
|
|
525
|
+
/**
|
|
526
|
+
* Wall time of the kit call that produced this event, in ms: from dispatch to the
|
|
527
|
+
* provider's final answer (a video's polling included; a multi-step text call's tool
|
|
528
|
+
* steps included). Absent only where the kit never saw the start (a video tool whose
|
|
529
|
+
* submission carries no `submittedAt`).
|
|
530
|
+
*/
|
|
531
|
+
latencyMs?: number;
|
|
523
532
|
raw?: unknown;
|
|
524
533
|
}
|
|
525
534
|
type ProviderKeyName = "openai" | "anthropic" | "google" | "xai" | "perplexity" | "deepseek" | "moonshot" | "minimax" | "ark" | "fal" | "replicate" | "prodia" | "higgsfield" | "cloudflare";
|
|
@@ -1138,7 +1147,9 @@ declare function promptConventions(row: {
|
|
|
1138
1147
|
|
|
1139
1148
|
/** Provider body or the lifted detail (Gemini blockReason, fal body.detail). */
|
|
1140
1149
|
type ProviderErrorBody = string | JsonValue;
|
|
1141
|
-
type ModelKitErrorCode = "unknown_model" | "unsupported_option" | "missing_input" | "content_blocked" | "provider_rejected"
|
|
1150
|
+
type ModelKitErrorCode = "unknown_model" | "unsupported_option" | "missing_input" | "content_blocked" | "provider_rejected"
|
|
1151
|
+
/** The provider account is out of credit or quota (HTTP 402 and its body spellings). Never retried. */
|
|
1152
|
+
| "provider_billing" | "timeout" | "auth" | "network" | "rate_limited";
|
|
1142
1153
|
interface ModelKitErrorInit {
|
|
1143
1154
|
code: ModelKitErrorCode;
|
|
1144
1155
|
message: string;
|
package/dist/catalog.js
CHANGED
|
@@ -799,7 +799,9 @@ var OTHER_MODELS = [
|
|
|
799
799
|
},
|
|
800
800
|
{
|
|
801
801
|
id: "bg-remove",
|
|
802
|
-
|
|
802
|
+
// Task ids the two emitters report on usage events (trigger-workflows,
|
|
803
|
+
// vibe-triggers); the usage price lookup resolves them to this row.
|
|
804
|
+
aliases: ["prodia-background-remover", "prodia-remove-background"],
|
|
803
805
|
label: "Background Remover",
|
|
804
806
|
type: "bg-remove",
|
|
805
807
|
adapter: "prodia",
|