@standardagents/builder 0.17.0-next.1e58032 → 0.17.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/built-in-routes.js +3643 -2135
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/ApiKeysView.js +1 -1
- package/dist/client/CompositionView.js +5 -5
- package/dist/client/CopyButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/DataTable.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/MarketplaceView.js +1 -0
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/client/ThreadsView.js +1 -1
- package/dist/client/ToolsView.js +1 -1
- package/dist/client/assets/MarketplaceView.css +1 -0
- package/dist/client/assets/index.css +1 -1
- package/dist/client/copy.js +1 -0
- package/dist/client/index.js +3 -3
- package/dist/client/package.js +1 -0
- package/dist/client/timeAgo.js +1 -0
- package/dist/client/vendor.js +46 -44
- package/dist/client/vue.js +1 -1
- package/dist/index.js +40 -1
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +7 -0
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.js +33 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -204,6 +204,16 @@ function getGoogleFallbackPricing(modelId) {
|
|
|
204
204
|
if (prefixMatch) return { ...prefixMatch.pricing, source: "google-static" };
|
|
205
205
|
return null;
|
|
206
206
|
}
|
|
207
|
+
function getAnthropicFallbackPricing(modelId) {
|
|
208
|
+
const normalized = normalizeModelId(modelId);
|
|
209
|
+
let best = null;
|
|
210
|
+
for (const entry of ANTHROPIC_MODEL_PRICING_PREFIXES) {
|
|
211
|
+
if (normalized.startsWith(entry.prefix) && (!best || entry.prefix.length > best.prefix.length)) {
|
|
212
|
+
best = entry;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return best ? { ...best.pricing, source: "anthropic-static" } : null;
|
|
216
|
+
}
|
|
207
217
|
function getGroqFallbackPricing(modelId) {
|
|
208
218
|
const pricing = GROQ_MODEL_PRICING[normalizeModelId(modelId)];
|
|
209
219
|
return pricing ? { ...pricing, source: "groq-static" } : null;
|
|
@@ -234,6 +244,9 @@ function resolveModelPricing(modelDef, providerName) {
|
|
|
234
244
|
source: "model"
|
|
235
245
|
};
|
|
236
246
|
}
|
|
247
|
+
if (providerName === "anthropic") {
|
|
248
|
+
return getAnthropicFallbackPricing(modelDef.model);
|
|
249
|
+
}
|
|
237
250
|
if (providerName === "cerebras") {
|
|
238
251
|
return getCerebrasFallbackPricing(modelDef.model);
|
|
239
252
|
}
|
|
@@ -269,10 +282,29 @@ function calculateUsageCost(usage, pricing) {
|
|
|
269
282
|
costTotal: roundCost(costInput + costOutput)
|
|
270
283
|
};
|
|
271
284
|
}
|
|
272
|
-
var TOKENS_PER_MILLION, CEREBRAS_MODEL_PRICING, GOOGLE_MODEL_PRICING, GOOGLE_MODEL_PRICING_PREFIXES, GROQ_MODEL_PRICING, XAI_MODEL_PRICING;
|
|
285
|
+
var TOKENS_PER_MILLION, ANTHROPIC_MODEL_PRICING_PREFIXES, CEREBRAS_MODEL_PRICING, GOOGLE_MODEL_PRICING, GOOGLE_MODEL_PRICING_PREFIXES, GROQ_MODEL_PRICING, XAI_MODEL_PRICING;
|
|
273
286
|
var init_pricing = __esm({
|
|
274
287
|
"src/agents/pricing.ts"() {
|
|
275
288
|
TOKENS_PER_MILLION = 1e6;
|
|
289
|
+
ANTHROPIC_MODEL_PRICING_PREFIXES = [
|
|
290
|
+
{ prefix: "claude-fable-5", pricing: { inputPrice: 10, outputPrice: 50, cachedPrice: 1 } },
|
|
291
|
+
{ prefix: "claude-mythos", pricing: { inputPrice: 10, outputPrice: 50, cachedPrice: 1 } },
|
|
292
|
+
{ prefix: "claude-opus-4-8", pricing: { inputPrice: 5, outputPrice: 25, cachedPrice: 0.5 } },
|
|
293
|
+
{ prefix: "claude-opus-4-7", pricing: { inputPrice: 5, outputPrice: 25, cachedPrice: 0.5 } },
|
|
294
|
+
{ prefix: "claude-opus-4-6", pricing: { inputPrice: 5, outputPrice: 25, cachedPrice: 0.5 } },
|
|
295
|
+
{ prefix: "claude-opus-4-5", pricing: { inputPrice: 5, outputPrice: 25, cachedPrice: 0.5 } },
|
|
296
|
+
{ prefix: "claude-opus-4-1", pricing: { inputPrice: 15, outputPrice: 75, cachedPrice: 1.5 } },
|
|
297
|
+
{ prefix: "claude-opus-4", pricing: { inputPrice: 15, outputPrice: 75, cachedPrice: 1.5 } },
|
|
298
|
+
{ prefix: "claude-sonnet-4-6", pricing: { inputPrice: 3, outputPrice: 15, cachedPrice: 0.3 } },
|
|
299
|
+
{ prefix: "claude-sonnet-4-5", pricing: { inputPrice: 3, outputPrice: 15, cachedPrice: 0.3 } },
|
|
300
|
+
{ prefix: "claude-sonnet-4", pricing: { inputPrice: 3, outputPrice: 15, cachedPrice: 0.3 } },
|
|
301
|
+
{ prefix: "claude-haiku-4-5", pricing: { inputPrice: 1, outputPrice: 5, cachedPrice: 0.1 } },
|
|
302
|
+
{ prefix: "claude-3-7-sonnet", pricing: { inputPrice: 3, outputPrice: 15, cachedPrice: 0.3 } },
|
|
303
|
+
{ prefix: "claude-3-5-sonnet", pricing: { inputPrice: 3, outputPrice: 15, cachedPrice: 0.3 } },
|
|
304
|
+
{ prefix: "claude-3-5-haiku", pricing: { inputPrice: 0.8, outputPrice: 4, cachedPrice: 0.08 } },
|
|
305
|
+
{ prefix: "claude-3-opus", pricing: { inputPrice: 15, outputPrice: 75, cachedPrice: 1.5 } },
|
|
306
|
+
{ prefix: "claude-3-haiku", pricing: { inputPrice: 0.25, outputPrice: 1.25, cachedPrice: 0.03 } }
|
|
307
|
+
];
|
|
276
308
|
CEREBRAS_MODEL_PRICING = {
|
|
277
309
|
"zai-glm-4.7": {
|
|
278
310
|
inputPrice: 2.25,
|
|
@@ -13131,6 +13163,12 @@ function needsRegeneration(config) {
|
|
|
13131
13163
|
|
|
13132
13164
|
// src/providers/catalog.ts
|
|
13133
13165
|
var FIRST_PARTY_PROVIDERS = [
|
|
13166
|
+
{
|
|
13167
|
+
name: "anthropic",
|
|
13168
|
+
package: "@standardagents/anthropic",
|
|
13169
|
+
label: "Anthropic",
|
|
13170
|
+
envKeys: ["ANTHROPIC_API_KEY"]
|
|
13171
|
+
},
|
|
13134
13172
|
{
|
|
13135
13173
|
name: "cloudflare",
|
|
13136
13174
|
package: "@standardagents/cloudflare",
|
|
@@ -19948,6 +19986,7 @@ var depsToInclude = [
|
|
|
19948
19986
|
"zod/v4",
|
|
19949
19987
|
"zod/v4/core",
|
|
19950
19988
|
"openai",
|
|
19989
|
+
"@anthropic-ai/sdk",
|
|
19951
19990
|
"magic-string",
|
|
19952
19991
|
"@standardagents/spec"
|
|
19953
19992
|
];
|