@wrongstack/core 0.298.1 → 0.298.2

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.
@@ -28279,7 +28279,7 @@ import * as fs11 from "node:fs/promises";
28279
28279
  import * as path33 from "node:path";
28280
28280
  var DEFAULT_URL = "https://models.dev/api.json";
28281
28281
  var ENV_URL_KEY = "WRONGSTACK_MODELS_DEV_URL";
28282
- var DEFAULT_TTL_SECONDS = 24 * 3600;
28282
+ var DEFAULT_TTL_SECONDS = 3 * 3600;
28283
28283
  var DEFAULT_REFRESH_TIMEOUT_MS = 15e3;
28284
28284
  var FAMILY_BY_NPM = {
28285
28285
  "@ai-sdk/anthropic": "anthropic",
@@ -32085,13 +32085,32 @@ function inlineDefinition(model) {
32085
32085
  if (maxOutput !== void 0) definition.maxOutput = maxOutput;
32086
32086
  const capabilities = readCapabilities(model);
32087
32087
  if (capabilities) definition.capabilities = capabilities;
32088
+ const { id: _id, ...rest } = model;
32089
+ if (Object.keys(rest).length > 0) {
32090
+ definition.modelsDev = rest;
32091
+ }
32088
32092
  return definition;
32089
32093
  }
32090
32094
  function mergeDefinitions(base, patch) {
32095
+ const mergedModelsDev = (() => {
32096
+ if (!base?.modelsDev && !patch.modelsDev) return void 0;
32097
+ const baseMd = base?.modelsDev ?? {};
32098
+ const patchMd = patch.modelsDev ?? {};
32099
+ const result = { ...baseMd, ...patchMd };
32100
+ for (const nestedKey of ["limit", "cost", "modalities"]) {
32101
+ const bn = baseMd?.[nestedKey];
32102
+ const pn = patchMd?.[nestedKey];
32103
+ if (bn || pn) {
32104
+ result[nestedKey] = { ...bn ?? {}, ...pn ?? {} };
32105
+ }
32106
+ }
32107
+ return result;
32108
+ })();
32091
32109
  return {
32092
32110
  ...base,
32093
32111
  ...patch,
32094
- ...base?.capabilities || patch.capabilities ? { capabilities: { ...base?.capabilities, ...patch.capabilities } } : {}
32112
+ ...base?.capabilities || patch.capabilities ? { capabilities: { ...base?.capabilities, ...patch.capabilities } } : {},
32113
+ ...mergedModelsDev ? { modelsDev: mergedModelsDev } : {}
32095
32114
  };
32096
32115
  }
32097
32116
  function normalizeInlineProviderModels(config, warn) {