perstack 0.0.110 → 0.0.112

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.
@@ -6108,6 +6108,21 @@ function resolveModelTier(providerName, tier) {
6108
6108
  const lookupProvider = cloudProviderFallback[providerName] ?? providerName;
6109
6109
  return knownModels.find((p) => p.provider === lookupProvider)?.models.find((m) => m.tier === tier)?.name;
6110
6110
  }
6111
+ const TIER_CASCADE = [
6112
+ "high",
6113
+ "middle",
6114
+ "low"
6115
+ ];
6116
+ /**
6117
+ * Resolve a model by cascading through tiers from high to low.
6118
+ * Used as the final fallback when no explicit model or tier-specific match is found.
6119
+ */
6120
+ function resolveModelTierWithFallback(providerName) {
6121
+ for (const tier of TIER_CASCADE) {
6122
+ const model = resolveModelTier(providerName, tier);
6123
+ if (model) return model;
6124
+ }
6125
+ }
6111
6126
 
6112
6127
  //#endregion
6113
6128
  //#region ../../packages/core/src/known-models/index.ts
@@ -6291,6 +6306,29 @@ const knownModels = [
6291
6306
  maxOutputTokens: 64e3
6292
6307
  }]
6293
6308
  },
6309
+ {
6310
+ provider: "fireworks",
6311
+ models: [
6312
+ {
6313
+ name: "accounts/fireworks/models/kimi-k2p5",
6314
+ tier: "high",
6315
+ contextWindow: 262144,
6316
+ maxOutputTokens: 262144
6317
+ },
6318
+ {
6319
+ name: "accounts/fireworks/models/deepseek-v3p2",
6320
+ tier: "high",
6321
+ contextWindow: 163840,
6322
+ maxOutputTokens: 163840
6323
+ },
6324
+ {
6325
+ name: "accounts/fireworks/models/glm-5",
6326
+ tier: "high",
6327
+ contextWindow: 202752,
6328
+ maxOutputTokens: 202752
6329
+ }
6330
+ ]
6331
+ },
6294
6332
  {
6295
6333
  provider: "ollama",
6296
6334
  models: [
@@ -7039,7 +7077,8 @@ const providerNameSchema = _enum([
7039
7077
  "azure-openai",
7040
7078
  "amazon-bedrock",
7041
7079
  "google-vertex",
7042
- "deepseek"
7080
+ "deepseek",
7081
+ "fireworks"
7043
7082
  ]);
7044
7083
  const anthropicProviderConfigSchema = object({
7045
7084
  providerName: literal(providerNameSchema.enum.anthropic),
@@ -7096,6 +7135,12 @@ const deepseekProviderConfigSchema = object({
7096
7135
  baseUrl: string().optional(),
7097
7136
  headers: headersSchema$1
7098
7137
  });
7138
+ const fireworksProviderConfigSchema = object({
7139
+ providerName: literal(providerNameSchema.enum.fireworks),
7140
+ apiKey: string(),
7141
+ baseUrl: string().optional(),
7142
+ headers: headersSchema$1
7143
+ });
7099
7144
  const providerConfigSchema = discriminatedUnion("providerName", [
7100
7145
  anthropicProviderConfigSchema,
7101
7146
  googleGenerativeAiProviderConfigSchema,
@@ -7104,7 +7149,8 @@ const providerConfigSchema = discriminatedUnion("providerName", [
7104
7149
  azureOpenAiProviderConfigSchema,
7105
7150
  amazonBedrockProviderConfigSchema,
7106
7151
  googleVertexProviderConfigSchema,
7107
- deepseekProviderConfigSchema
7152
+ deepseekProviderConfigSchema,
7153
+ fireworksProviderConfigSchema
7108
7154
  ]);
7109
7155
 
7110
7156
  //#endregion
@@ -9644,5 +9690,5 @@ function createApiClient(config) {
9644
9690
  }
9645
9691
 
9646
9692
  //#endregion
9647
- export { lazy as $, runCommandInputSchema as A, PerstackError as At, resolveModelTier as B, runSettingSchema as C, safeParse$1 as Ct, stopRunByDelegate as D, normalizeParams as Dt, startRun as E, defineLazy as Et, expertSchema$1 as F, _instanceof as G, ZodIssueCode as H, isCoordinatorExpert as I, array as J, _null as K, validateDelegation as L, perstackConfigSchema as M, defaultPerstackApiBaseUrl as Mt, lockfileSchema as N, defaultTimeout as Nt, stopRunByError as O, $constructor as Ot, jobSchema$1 as P, createId as Pt, intersection as Q, checkpointSchema as R, runParamsSchema as S, parseAsync$1 as St, startGeneration as T, clone as Tt, ZodOptional as U, number as V, _enum as W, custom as X, boolean$1 as Y, discriminatedUnion as Z, parseExpertKey as _, describe$1 as _t, validateEventFilter as a, optional as at, resumeFromStop as b, $ZodType as bt, createBaseToolActivity as c, strictObject as ct, completeRun as d, union as dt, literal as et, continueToNextStep as f, unknown as ft, finishToolCall as g, toJSONSchema as gt, finishMcpTools as h, datetime as ht, createFilteredEventListener as i, object as it, startCommandInputSchema as j, defaultMaxRetries as jt, stopRunByInteractiveTool as k, NEVER as kt, createGeneralToolActivity as l, string as lt, createStreamingEvent as m, safeParseAsync as mt, parseWithFriendlyError as n, never as nt, getFilteredEnv as o, preprocess as ot, createRuntimeEvent as p, url as pt, any as q, truncateText as r, number$1 as rt, BASE_SKILL_PREFIX as s, record as st, createApiClient as t, looseObject as tt, callTools as u, tuple as ut, proceedToInteractiveTools as v, meta$1 as vt, skipDelegates as w, safeParseAsync$1 as wt, retry as x, parse$1 as xt, resolveToolResults as y, $ZodObject as yt, knownModels as z };
9648
- //# sourceMappingURL=dist-C-YhEwlg.js.map
9693
+ export { intersection as $, runCommandInputSchema as A, NEVER as At, resolveModelTier as B, runSettingSchema as C, parseAsync$1 as Ct, stopRunByDelegate as D, defineLazy as Dt, startRun as E, clone as Et, expertSchema$1 as F, createId as Ft, _enum as G, number as H, isCoordinatorExpert as I, any as J, _instanceof as K, validateDelegation as L, perstackConfigSchema as M, defaultMaxRetries as Mt, lockfileSchema as N, defaultPerstackApiBaseUrl as Nt, stopRunByError as O, normalizeParams as Ot, jobSchema$1 as P, defaultTimeout as Pt, discriminatedUnion as Q, checkpointSchema as R, runParamsSchema as S, parse$1 as St, startGeneration as T, safeParseAsync$1 as Tt, ZodIssueCode as U, resolveModelTierWithFallback as V, ZodOptional as W, boolean$1 as X, array as Y, custom as Z, parseExpertKey as _, toJSONSchema as _t, validateEventFilter as a, object as at, resumeFromStop as b, $ZodObject as bt, createBaseToolActivity as c, record as ct, completeRun as d, tuple as dt, lazy as et, continueToNextStep as f, union as ft, finishToolCall as g, datetime as gt, finishMcpTools as h, safeParseAsync as ht, createFilteredEventListener as i, number$1 as it, startCommandInputSchema as j, PerstackError as jt, stopRunByInteractiveTool as k, $constructor as kt, createGeneralToolActivity as l, strictObject as lt, createStreamingEvent as m, url as mt, parseWithFriendlyError as n, looseObject as nt, getFilteredEnv as o, optional as ot, createRuntimeEvent as p, unknown as pt, _null as q, truncateText as r, never as rt, BASE_SKILL_PREFIX as s, preprocess as st, createApiClient as t, literal as tt, callTools as u, string as ut, proceedToInteractiveTools as v, describe$1 as vt, skipDelegates as w, safeParse$1 as wt, retry as x, $ZodType as xt, resolveToolResults as y, meta$1 as yt, knownModels as z };
9694
+ //# sourceMappingURL=dist-Dbqn18AZ.js.map