@hiper2d/ai-agents 0.3.1 → 0.4.1

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/index.js CHANGED
@@ -58,7 +58,9 @@ __export(index_exports, {
58
58
  KimiAgent: () => KimiAgent,
59
59
  LLM_CONSTANTS: () => LLM_CONSTANTS,
60
60
  MESSAGE_ROLE: () => MESSAGE_ROLE,
61
+ META_REASONING_EFFORTS: () => META_REASONING_EFFORTS,
61
62
  MODEL_PRICING: () => MODEL_PRICING,
63
+ MetaAgent: () => MetaAgent,
62
64
  MiniMaxAgent: () => MiniMaxAgent,
63
65
  MistralAgent: () => MistralAgent,
64
66
  ModelAuthenticationError: () => ModelAuthenticationError,
@@ -91,6 +93,7 @@ __export(index_exports, {
91
93
  calculateGoogleCost: () => calculateGoogleCost,
92
94
  calculateGrokCost: () => calculateGrokCost,
93
95
  calculateKimiCost: () => calculateKimiCost,
96
+ calculateMetaCost: () => calculateMetaCost,
94
97
  calculateMistralCost: () => calculateMistralCost,
95
98
  calculateModelCost: () => calculateModelCost,
96
99
  calculateOpenAICost: () => calculateOpenAICost,
@@ -102,18 +105,20 @@ __export(index_exports, {
102
105
  createVoiceAgent: () => createVoiceAgent,
103
106
  evaluateBudget: () => evaluateBudget,
104
107
  extractAnthropicTokenUsage: () => extractAnthropicTokenUsage,
105
- extractAnthropicTokenUsageFromResponse: () => extractTokenUsageFromResponse5,
108
+ extractAnthropicTokenUsageFromResponse: () => extractTokenUsageFromResponse6,
106
109
  extractDeepSeekTokenUsage: () => extractDeepSeekTokenUsage,
107
110
  extractDeepSeekTokenUsageFromResponse: () => extractTokenUsageFromResponse2,
108
111
  extractFirstJsonObject: () => extractFirstJsonObject,
109
112
  extractGoogleTokenUsage: () => extractGoogleTokenUsage,
110
- extractGoogleTokenUsageFromResponse: () => extractTokenUsageFromResponse6,
113
+ extractGoogleTokenUsageFromResponse: () => extractTokenUsageFromResponse7,
111
114
  extractGrokTokenUsage: () => extractGrokTokenUsage,
112
115
  extractGrokTokenUsageFromResponse: () => extractTokenUsageFromResponse4,
113
116
  extractKimiTokenUsage: () => extractKimiTokenUsage,
114
117
  extractKimiTokenUsageFromResponse: () => extractTokenUsageFromResponse3,
118
+ extractMetaTokenUsage: () => extractMetaTokenUsage,
119
+ extractMetaTokenUsageFromResponse: () => extractTokenUsageFromResponse5,
115
120
  extractMistralTokenUsage: () => extractMistralTokenUsage,
116
- extractMistralTokenUsageFromResponse: () => extractTokenUsageFromResponse7,
121
+ extractMistralTokenUsageFromResponse: () => extractTokenUsageFromResponse8,
117
122
  extractOpenAITokenUsage: () => extractOpenAITokenUsage,
118
123
  extractOpenAITokenUsageFromResponse: () => extractTokenUsageFromResponse,
119
124
  extractTokenUsage: () => extractTokenUsage,
@@ -153,6 +158,7 @@ __export(index_exports, {
153
158
  toFuguEffort: () => toFuguEffort,
154
159
  toGeminiEffort: () => toGeminiEffort,
155
160
  toGlmEffort: () => toGlmEffort,
161
+ toMetaEffort: () => toMetaEffort,
156
162
  toOpenAIEffort: () => toOpenAIEffort,
157
163
  transcribeWithGemini: () => transcribeWithGemini,
158
164
  transcribeWithOpenAi: () => transcribeWithOpenAi,
@@ -920,7 +926,8 @@ var API_KEY_CONSTANTS = {
920
926
  Z_AI: "Z_AI_API_KEY",
921
927
  FUGU: "FUGU_API_KEY",
922
928
  QWEN: "QWEN_API_KEY",
923
- MINIMAX: "MINIMAX_API_KEY"
929
+ MINIMAX: "MINIMAX_API_KEY",
930
+ META: "META_API_KEY"
924
931
  };
925
932
  var SupportedAiKeyNames = {
926
933
  [API_KEY_CONSTANTS.OPENAI]: "OpenAI",
@@ -933,7 +940,8 @@ var SupportedAiKeyNames = {
933
940
  [API_KEY_CONSTANTS.Z_AI]: "Z.AI",
934
941
  [API_KEY_CONSTANTS.FUGU]: "Sakana Fugu",
935
942
  [API_KEY_CONSTANTS.QWEN]: "Qwen",
936
- [API_KEY_CONSTANTS.MINIMAX]: "MiniMax"
943
+ [API_KEY_CONSTANTS.MINIMAX]: "MiniMax",
944
+ [API_KEY_CONSTANTS.META]: "Meta"
937
945
  };
938
946
  var LLM_CONSTANTS = {
939
947
  // Thinking-only catalog since 2026-08-05: models whose API offers a thinking toggle used to
@@ -970,7 +978,9 @@ var LLM_CONSTANTS = {
970
978
  QWEN_MAX: "qwen-max",
971
979
  QWEN_FLASH: "qwen-flash",
972
980
  // MiniMax. Single M3 entry; stable id without the version for the same repoint reason.
973
- MINIMAX: "minimax"
981
+ MINIMAX: "minimax",
982
+ // Meta Model API (api.meta.ai). Muse Spark; version-free id so a 1.3 → 1.4 repoint is entry-only.
983
+ MUSE_SPARK: "muse-spark"
974
984
  };
975
985
  var DEFAULT_MAX_OUTPUT_TOKENS = 8192;
976
986
  var SupportedAiModels = {
@@ -1255,6 +1265,26 @@ var SupportedAiModels = {
1255
1265
  hasThinking: true,
1256
1266
  temperature: 1,
1257
1267
  tags: ["very-slow", "cheap"]
1268
+ },
1269
+ // Meta Muse Spark 1.3 (added 2026-09-12) on Meta's own Model API — Standard tier, i.e.
1270
+ // the private model id (the `-contributor` id is a quarter of the price but Meta trains
1271
+ // on the prompts). Always-on reasoning with an effort dial (minimal … max, "none" is
1272
+ // rejected); the chain of thought is never returned, only an optional summary, plus
1273
+ // encrypted reasoning items replayed across turns like Grok. 'medium' is pinned as the
1274
+ // game default: turns are short and every reasoning token bills as output.
1275
+ // Temperature: Meta documents the model as tuned to its 1.0 default.
1276
+ // Speed: measured 2026-09-12 at medium effort — 9.6s on a full-context day-2 vote, 4-8s on
1277
+ // short turns (reasoning ≈ 90% of output tokens). That is the untagged middle band by the
1278
+ // grading above; tagged 'slow' anyway by decision so players expect a wait. Price-wise it
1279
+ // is neither cheap nor expensive.
1280
+ [LLM_CONSTANTS.MUSE_SPARK]: {
1281
+ displayName: "Muse Spark 1.3",
1282
+ modelApiName: "muse-spark-1.3",
1283
+ apiKeyName: API_KEY_CONSTANTS.META,
1284
+ hasThinking: true,
1285
+ temperature: 1,
1286
+ reasoningEffort: "medium",
1287
+ tags: ["slow"]
1258
1288
  }
1259
1289
  };
1260
1290
  function createCatalog(overrides = {}) {
@@ -1522,6 +1552,14 @@ var MODEL_PRICING = {
1522
1552
  extendedContextOutputPrice: 2.4,
1523
1553
  extendedContextCacheHitPrice: 0.12,
1524
1554
  extendedContextThresholdTokens: 512e3
1555
+ },
1556
+ // Meta Muse Spark 1.3, Standard tier. Rates from ai.developer.meta.com/docs/pricing-rate-limits
1557
+ // (2026-09-12): no long-context premium at any point of the 1M window; reasoning tokens bill
1558
+ // as output; caching is automatic, hits reported in input_tokens_details.cached_tokens.
1559
+ [SupportedAiModels[LLM_CONSTANTS.MUSE_SPARK].modelApiName]: {
1560
+ inputPrice: 1.25,
1561
+ outputPrice: 4.25,
1562
+ cacheHitPrice: 0.15
1525
1563
  }
1526
1564
  };
1527
1565
  var HYBRID_THINKING_API_NAMES = /* @__PURE__ */ new Set([
@@ -1585,6 +1623,9 @@ function getProviderSignatureFields(aiType, signature) {
1585
1623
  if (aiType.startsWith("grok")) {
1586
1624
  return { grokEncryptedReasoning: signature };
1587
1625
  }
1626
+ if (aiType.startsWith("muse-")) {
1627
+ return { metaEncryptedReasoning: signature };
1628
+ }
1588
1629
  return {};
1589
1630
  }
1590
1631
 
@@ -1596,6 +1637,7 @@ var GEMINI_REASONING_EFFORTS = ["minimal", "low", "medium", "high"];
1596
1637
  var GLM_REASONING_EFFORTS = ["low", "high", "max"];
1597
1638
  var DEEPSEEK_REASONING_EFFORTS = ["low", "high", "max"];
1598
1639
  var FUGU_REASONING_EFFORTS = ["high", "xhigh"];
1640
+ var META_REASONING_EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"];
1599
1641
  function clampReasoningEffort(effort, allowed) {
1600
1642
  const rank = REASONING_EFFORT_SCALE.indexOf(effort);
1601
1643
  let best = allowed[0];
@@ -1614,6 +1656,7 @@ var toAnthropicEffort = (effort) => clampReasoningEffort(effort, ANTHROPIC_REASO
1614
1656
  var toGeminiEffort = (effort) => clampReasoningEffort(effort, GEMINI_REASONING_EFFORTS);
1615
1657
  var toGlmEffort = (effort) => clampReasoningEffort(effort, GLM_REASONING_EFFORTS);
1616
1658
  var toDeepSeekEffort = (effort) => clampReasoningEffort(effort, DEEPSEEK_REASONING_EFFORTS);
1659
+ var toMetaEffort = (effort) => clampReasoningEffort(effort, META_REASONING_EFFORTS);
1617
1660
  var toFuguEffort = (effort) => clampReasoningEffort(effort, FUGU_REASONING_EFFORTS);
1618
1661
 
1619
1662
  // src/pricing/token-usage-utils.ts
@@ -1668,6 +1711,9 @@ function extractKimiTokenUsage(response) {
1668
1711
  function extractGrokTokenUsage(response) {
1669
1712
  return extractTokenUsage(response);
1670
1713
  }
1714
+ function extractMetaTokenUsage(response) {
1715
+ return extractTokenUsage(response);
1716
+ }
1671
1717
  function extractAnthropicTokenUsage(response) {
1672
1718
  if (!response?.usage) {
1673
1719
  return null;
@@ -1756,11 +1802,19 @@ function extractTokenUsageFromResponse4(response) {
1756
1802
  return extractGrokTokenUsage(response);
1757
1803
  }
1758
1804
 
1805
+ // src/pricing/meta-pricing.ts
1806
+ function calculateMetaCost(model, inputTokens, outputTokens, cacheHitTokens = 0) {
1807
+ return calculateCost(model, inputTokens, outputTokens, { cacheHitTokens });
1808
+ }
1809
+ function extractTokenUsageFromResponse5(response) {
1810
+ return extractMetaTokenUsage(response);
1811
+ }
1812
+
1759
1813
  // src/pricing/anthropic-pricing.ts
1760
1814
  function calculateAnthropicCost(model, inputTokens, outputTokens, cacheHitTokens = 0) {
1761
1815
  return calculateCost(model, inputTokens, outputTokens, { cacheHitTokens });
1762
1816
  }
1763
- function extractTokenUsageFromResponse5(response) {
1817
+ function extractTokenUsageFromResponse6(response) {
1764
1818
  return extractAnthropicTokenUsage(response);
1765
1819
  }
1766
1820
 
@@ -1768,7 +1822,7 @@ function extractTokenUsageFromResponse5(response) {
1768
1822
  function calculateGoogleCost(model, inputTokens, outputTokens, options = {}) {
1769
1823
  return calculateCost(model, inputTokens, outputTokens, options);
1770
1824
  }
1771
- function extractTokenUsageFromResponse6(response) {
1825
+ function extractTokenUsageFromResponse7(response) {
1772
1826
  return extractGoogleTokenUsage(response);
1773
1827
  }
1774
1828
 
@@ -1776,7 +1830,7 @@ function extractTokenUsageFromResponse6(response) {
1776
1830
  function calculateMistralCost(model, inputTokens, outputTokens, cacheHitTokens = 0) {
1777
1831
  return calculateCost(model, inputTokens, outputTokens, { cacheHitTokens });
1778
1832
  }
1779
- function extractTokenUsageFromResponse7(response) {
1833
+ function extractTokenUsageFromResponse8(response) {
1780
1834
  return extractMistralTokenUsage(response);
1781
1835
  }
1782
1836
 
@@ -4846,6 +4900,221 @@ ${openAIMessages[0].content}`;
4846
4900
  }
4847
4901
  };
4848
4902
 
4903
+ // src/agents/meta-agent.ts
4904
+ var import_openai11 = require("openai");
4905
+ var MetaAgent = class extends AbstractAgent {
4906
+ client;
4907
+ promptCacheKey;
4908
+ // Log message templates
4909
+ logTemplates = {
4910
+ error: (name, error) => `Error in ${name} agent: ${error}`
4911
+ };
4912
+ // Error message templates
4913
+ errorMessages = {
4914
+ emptyResponse: "Empty or undefined response from Meta API",
4915
+ invalidFormat: "Invalid response format from Meta API",
4916
+ apiError: (error) => `Failed to get response from Meta API: ${error instanceof Error ? error.message : String(error)}`
4917
+ };
4918
+ constructor(name, instruction, model, apiKey, temperature, enableThinking = false, agentLoggingConfig = DEFAULT_LOGGING_CONFIG.agents) {
4919
+ super(name, instruction, model, temperature, enableThinking, agentLoggingConfig);
4920
+ this.promptCacheKey = stableHashHex(`${name}
4921
+ ${instruction}`);
4922
+ this.client = new import_openai11.OpenAI({
4923
+ apiKey,
4924
+ baseURL: "https://api.meta.ai/v1",
4925
+ timeout: 12e5
4926
+ });
4927
+ }
4928
+ /**
4929
+ * Structured output: json_schema format on the Responses API plus the schema described
4930
+ * in the prompt, parsed leniently and validated with Zod.
4931
+ */
4932
+ async doAskWithZodSchema(zodSchema, messages) {
4933
+ try {
4934
+ const schemaDescription = ZodSchemaConverter.toPromptDescription(zodSchema);
4935
+ const input = this.buildResponsesInput(this.prepareMessages(messages));
4936
+ const lastMessage = input[input.length - 1];
4937
+ if (lastMessage && typeof lastMessage.content === "string") {
4938
+ lastMessage.content += `
4939
+
4940
+ Your response must be a valid JSON object matching this schema:
4941
+ ${schemaDescription}`;
4942
+ }
4943
+ this.logAsking(messages);
4944
+ this.logMessages(messages);
4945
+ const response = await this.createResponse(input, zodSchema);
4946
+ const { text, reasoningSummary, encryptedReasoning } = this.extractResponseParts(response);
4947
+ if (!text) {
4948
+ throw new Error(this.errorMessages.emptyResponse);
4949
+ }
4950
+ this.logger(`Meta Agent - Found reasoning summary: ${!!reasoningSummary}, encrypted reasoning: ${!!encryptedReasoning}`);
4951
+ const parsedData = parseAndValidateLlmJson(text, zodSchema, (m) => this.logger(m));
4952
+ this.logger(`\u2705 Response validated successfully with Zod schema`);
4953
+ const tokenUsage = this.extractTokenUsage(response);
4954
+ if (parsedData) {
4955
+ this.logReply(parsedData, reasoningSummary, tokenUsage);
4956
+ }
4957
+ return [parsedData, reasoningSummary, tokenUsage, encryptedReasoning];
4958
+ } catch (error) {
4959
+ this.logger(this.logTemplates.error(this.name, error));
4960
+ throw new Error(this.errorMessages.apiError(error));
4961
+ }
4962
+ }
4963
+ /**
4964
+ * Plain-text ask: no JSON mode and no schema appended to the prompt.
4965
+ * Reasoning extraction and token accounting are identical to askWithZodSchema.
4966
+ */
4967
+ async doAskText(messages) {
4968
+ try {
4969
+ const input = this.buildResponsesInput(this.prepareMessages(messages));
4970
+ this.logAsking(messages);
4971
+ this.logMessages(messages);
4972
+ const response = await this.createResponse(input);
4973
+ const { text, reasoningSummary, encryptedReasoning } = this.extractResponseParts(response);
4974
+ if (!text) {
4975
+ throw new Error(this.errorMessages.emptyResponse);
4976
+ }
4977
+ const tokenUsage = this.extractTokenUsage(response);
4978
+ this.logReply(text, reasoningSummary, tokenUsage);
4979
+ return [text, reasoningSummary, tokenUsage, encryptedReasoning];
4980
+ } catch (error) {
4981
+ this.logger(this.logTemplates.error(this.name, error));
4982
+ throw new Error(this.errorMessages.apiError(error));
4983
+ }
4984
+ }
4985
+ createResponse(input, zodSchema) {
4986
+ return this.client.responses.create({
4987
+ model: this.model,
4988
+ temperature: this.temperature,
4989
+ input,
4990
+ // Reasoning bills against the output budget on top of the visible answer, so this
4991
+ // has to cover both. Raise it with a catalog `maxOutputTokens` override if Muse
4992
+ // ever starts truncating.
4993
+ max_output_tokens: this.maxOutputTokens,
4994
+ // Effort read at request time so a per-instance override (story generation runs
4995
+ // deeper) is honored; omitted entirely when nothing is pinned, leaving Meta's default.
4996
+ reasoning: {
4997
+ ...this.reasoningEffort ? { effort: toMetaEffort(this.reasoningEffort) } : {},
4998
+ summary: "auto"
4999
+ },
5000
+ // We manage conversation state ourselves; encrypted reasoning is only
5001
+ // returned for unstored responses.
5002
+ store: false,
5003
+ include: ["reasoning.encrypted_content"],
5004
+ prompt_cache_key: this.promptCacheKey,
5005
+ ...zodSchema ? {
5006
+ text: {
5007
+ format: {
5008
+ type: "json_schema",
5009
+ name: "response_schema",
5010
+ schema: ZodSchemaConverter.toJsonSchema(zodSchema),
5011
+ strict: false
5012
+ }
5013
+ }
5014
+ } : {}
5015
+ });
5016
+ }
5017
+ /**
5018
+ * Converts history to Responses API input items. The system instruction is merged into
5019
+ * the leading system message; assistant messages carrying stored encrypted reasoning get
5020
+ * their reasoning items replayed right before them.
5021
+ */
5022
+ buildResponsesInput(messages) {
5023
+ const input = [];
5024
+ for (const msg of messages) {
5025
+ if (msg.role === "assistant" && msg.metaEncryptedReasoning) {
5026
+ try {
5027
+ const reasoningItems = JSON.parse(msg.metaEncryptedReasoning);
5028
+ if (Array.isArray(reasoningItems)) {
5029
+ for (const item of reasoningItems) {
5030
+ if (item?.encrypted_content) {
5031
+ input.push({
5032
+ type: "reasoning",
5033
+ ...item.id ? { id: item.id } : {},
5034
+ summary: Array.isArray(item.summary) ? item.summary : [],
5035
+ encrypted_content: item.encrypted_content
5036
+ });
5037
+ }
5038
+ }
5039
+ }
5040
+ } catch {
5041
+ this.logger(`Failed to parse stored encrypted reasoning, replaying message without it`);
5042
+ }
5043
+ }
5044
+ input.push({ role: msg.role, content: msg.content });
5045
+ }
5046
+ if (input.length > 0 && input[0].role !== "system") {
5047
+ input.unshift({ role: "system", content: this.instruction });
5048
+ } else if (input.length > 0 && input[0].role === "system") {
5049
+ input[0].content = `${this.instruction}
5050
+
5051
+ ${input[0].content}`;
5052
+ }
5053
+ return input;
5054
+ }
5055
+ /**
5056
+ * Walks the response output items: reasoning items yield the human-readable summary
5057
+ * plus the encrypted items (serialized for storage/replay); message items yield text.
5058
+ */
5059
+ extractResponseParts(response) {
5060
+ const textParts = [];
5061
+ const summaryParts = [];
5062
+ const encryptedItems = [];
5063
+ for (const item of response?.output ?? []) {
5064
+ if (!item) {
5065
+ continue;
5066
+ }
5067
+ if (item.type === "reasoning") {
5068
+ for (const summary of item.summary ?? []) {
5069
+ if (typeof summary?.text === "string" && summary.text) {
5070
+ summaryParts.push(summary.text);
5071
+ }
5072
+ }
5073
+ if (item.encrypted_content) {
5074
+ encryptedItems.push(item);
5075
+ }
5076
+ } else if (item.type === "message") {
5077
+ for (const part of item.content ?? []) {
5078
+ if (part?.type === "output_text" && typeof part.text === "string") {
5079
+ textParts.push(part.text);
5080
+ }
5081
+ }
5082
+ }
5083
+ }
5084
+ return {
5085
+ text: textParts.join("\n").trim(),
5086
+ reasoningSummary: summaryParts.join("\n").trim(),
5087
+ encryptedReasoning: encryptedItems.length > 0 ? JSON.stringify(encryptedItems) : void 0
5088
+ };
5089
+ }
5090
+ extractTokenUsage(response) {
5091
+ const usage = response?.usage;
5092
+ if (!usage) {
5093
+ return void 0;
5094
+ }
5095
+ const inputTokens = usage.input_tokens || 0;
5096
+ const outputTokens = usage.output_tokens || 0;
5097
+ const reasoningTokens = usage.output_tokens_details?.reasoning_tokens || 0;
5098
+ const cachedTokens = usage.input_tokens_details?.cached_tokens || 0;
5099
+ const cost = calculateMetaCost(this.model, inputTokens, outputTokens, cachedTokens);
5100
+ if (reasoningTokens > 0) {
5101
+ this.logger(`Output breakdown: ${reasoningTokens} reasoning tokens, ${outputTokens - reasoningTokens} final answer tokens, ${outputTokens} total output tokens`);
5102
+ }
5103
+ if (cachedTokens > 0) {
5104
+ this.logger(`Input breakdown: ${cachedTokens} cached tokens of ${inputTokens} input tokens`);
5105
+ }
5106
+ return {
5107
+ inputTokens,
5108
+ outputTokens,
5109
+ totalTokens: inputTokens + outputTokens,
5110
+ costUSD: cost,
5111
+ // Omitted when zero so we never hand Firestore an undefined value.
5112
+ ...reasoningTokens > 0 ? { reasoningTokens } : {},
5113
+ ...cachedTokens > 0 ? { cachedInputTokens: cachedTokens } : {}
5114
+ };
5115
+ }
5116
+ };
5117
+
4849
5118
  // src/agents/agent-factory.ts
4850
5119
  var AgentFactory = class {
4851
5120
  static createAgent(name, instruction, llmType, apiKeys, enableThinking = false) {
@@ -4899,6 +5168,9 @@ var AgentFactory = class {
4899
5168
  // MiniMax M3 — adaptive thinking (the model decides per-request)
4900
5169
  case LLM_CONSTANTS.MINIMAX:
4901
5170
  return new MiniMaxAgent(name, instruction, model.modelApiName, key, model.temperature, shouldEnableThinking);
5171
+ // Meta Muse Spark — Responses API with encrypted reasoning replay, effort from the catalog
5172
+ case LLM_CONSTANTS.MUSE_SPARK:
5173
+ return new MetaAgent(name, instruction, model.modelApiName, key, model.temperature, shouldEnableThinking);
4902
5174
  default:
4903
5175
  throw new Error(`Unknown Key: ${modelName}`);
4904
5176
  }
@@ -4941,7 +5213,9 @@ var AgentFactory = class {
4941
5213
  KimiAgent,
4942
5214
  LLM_CONSTANTS,
4943
5215
  MESSAGE_ROLE,
5216
+ META_REASONING_EFFORTS,
4944
5217
  MODEL_PRICING,
5218
+ MetaAgent,
4945
5219
  MiniMaxAgent,
4946
5220
  MistralAgent,
4947
5221
  ModelAuthenticationError,
@@ -4974,6 +5248,7 @@ var AgentFactory = class {
4974
5248
  calculateGoogleCost,
4975
5249
  calculateGrokCost,
4976
5250
  calculateKimiCost,
5251
+ calculateMetaCost,
4977
5252
  calculateMistralCost,
4978
5253
  calculateModelCost,
4979
5254
  calculateOpenAICost,
@@ -4995,6 +5270,8 @@ var AgentFactory = class {
4995
5270
  extractGrokTokenUsageFromResponse,
4996
5271
  extractKimiTokenUsage,
4997
5272
  extractKimiTokenUsageFromResponse,
5273
+ extractMetaTokenUsage,
5274
+ extractMetaTokenUsageFromResponse,
4998
5275
  extractMistralTokenUsage,
4999
5276
  extractMistralTokenUsageFromResponse,
5000
5277
  extractOpenAITokenUsage,
@@ -5036,6 +5313,7 @@ var AgentFactory = class {
5036
5313
  toFuguEffort,
5037
5314
  toGeminiEffort,
5038
5315
  toGlmEffort,
5316
+ toMetaEffort,
5039
5317
  toOpenAIEffort,
5040
5318
  transcribeWithGemini,
5041
5319
  transcribeWithOpenAi,