@tangle-network/agent-app 0.43.55 → 0.43.56

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.
@@ -2311,17 +2311,18 @@ function providerOf(slug) {
2311
2311
  return i > 0 ? slug.slice(0, i) : "other";
2312
2312
  }
2313
2313
  function toPickerModels(models, selected) {
2314
- const row = (slug, label, contextTokens) => ({
2314
+ const row = (slug, label, contextTokens, promptUsdPerMillion) => ({
2315
2315
  id: slug,
2316
2316
  name: label ?? slug,
2317
2317
  provider: providerOf(slug),
2318
2318
  supportsTools: true,
2319
2319
  supportsReasoning: false,
2320
2320
  featured: false,
2321
- ...contextTokens != null ? { contextLength: contextTokens } : {}
2321
+ ...contextTokens != null ? { contextLength: contextTokens } : {},
2322
+ ...promptUsdPerMillion != null ? { pricing: { prompt: String(promptUsdPerMillion / 1e6) } } : {}
2322
2323
  });
2323
2324
  const mapped = models.models.map(
2324
- (m) => row(m.slug, m.label, m.contextTokens)
2325
+ (m) => row(m.slug, m.label, m.contextTokens, m.promptUsdPerMillion)
2325
2326
  );
2326
2327
  for (const slug of [models.default, selected]) {
2327
2328
  if (slug && !mapped.some((m) => m.id === slug)) mapped.push(row(slug));