@quantish/agent 0.1.7 → 0.1.8

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.
Files changed (2) hide show
  1. package/dist/index.js +36 -36
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ var schema = {
27
27
  },
28
28
  model: {
29
29
  type: "string",
30
- default: "claude-sonnet-4-5-20250929"
30
+ default: "claude-sonnet-4-20250514"
31
31
  }
32
32
  };
33
33
  var ConfigManager = class {
@@ -111,7 +111,7 @@ var ConfigManager = class {
111
111
  * Get the model to use
112
112
  */
113
113
  getModel() {
114
- return this.conf.get("model") ?? "claude-sonnet-4-5-20250929";
114
+ return this.conf.get("model") ?? "claude-sonnet-4-20250514";
115
115
  }
116
116
  /**
117
117
  * Set the model to use
@@ -2287,7 +2287,7 @@ function parseCompactedSummary(response) {
2287
2287
  }
2288
2288
  return response.trim() || null;
2289
2289
  }
2290
- async function createCompactedSummary(anthropic, history, model = "claude-sonnet-4-5-20250929", customPrompt) {
2290
+ async function createCompactedSummary(anthropic, history, model = "claude-sonnet-4-20250514", customPrompt) {
2291
2291
  const prompt2 = customPrompt || COMPACTION_PROMPT;
2292
2292
  const compactionMessages = [
2293
2293
  ...history,
@@ -2331,7 +2331,7 @@ async function compactConversation(anthropic, history, model, systemPrompt, tool
2331
2331
  const contentLength = JSON.stringify(history).length;
2332
2332
  originalTokens = Math.ceil(contentLength / 4);
2333
2333
  }
2334
- const summaryModel = "claude-sonnet-4-5-20250929";
2334
+ const summaryModel = "claude-sonnet-4-20250514";
2335
2335
  const summary = await createCompactedSummary(anthropic, history, summaryModel);
2336
2336
  const newHistory = historyFromSummary(summary);
2337
2337
  let newTokens = 0;
@@ -2357,25 +2357,25 @@ async function compactConversation(anthropic, history, model, systemPrompt, tool
2357
2357
 
2358
2358
  // src/agent/pricing.ts
2359
2359
  var MODELS = {
2360
- "claude-opus-4-5-20250929": {
2361
- id: "claude-opus-4-5-20250929",
2362
- name: "opus-4.5",
2363
- displayName: "Claude Opus 4.5",
2360
+ "claude-opus-4-20250514": {
2361
+ id: "claude-opus-4-20250514",
2362
+ name: "opus-4",
2363
+ displayName: "Claude Opus 4",
2364
2364
  pricing: {
2365
- inputPerMTok: 5,
2366
- outputPerMTok: 25,
2367
- cacheWritePerMTok: 6.25,
2365
+ inputPerMTok: 15,
2366
+ outputPerMTok: 75,
2367
+ cacheWritePerMTok: 18.75,
2368
2368
  // 1.25x input
2369
- cacheReadPerMTok: 0.5
2369
+ cacheReadPerMTok: 1.5
2370
2370
  // 0.1x input
2371
2371
  },
2372
2372
  contextWindow: 2e5,
2373
2373
  description: "Most capable model. Best for complex reasoning and creative tasks."
2374
2374
  },
2375
- "claude-sonnet-4-5-20250929": {
2376
- id: "claude-sonnet-4-5-20250929",
2377
- name: "sonnet-4.5",
2378
- displayName: "Claude Sonnet 4.5",
2375
+ "claude-sonnet-4-20250514": {
2376
+ id: "claude-sonnet-4-20250514",
2377
+ name: "sonnet-4",
2378
+ displayName: "Claude Sonnet 4",
2379
2379
  pricing: {
2380
2380
  inputPerMTok: 3,
2381
2381
  outputPerMTok: 15,
@@ -2387,30 +2387,30 @@ var MODELS = {
2387
2387
  contextWindow: 2e5,
2388
2388
  description: "Balanced performance and cost. Great for most coding and trading tasks."
2389
2389
  },
2390
- "claude-haiku-4-5-20250929": {
2391
- id: "claude-haiku-4-5-20250929",
2392
- name: "haiku-4.5",
2393
- displayName: "Claude Haiku 4.5",
2390
+ "claude-3-5-haiku-20241022": {
2391
+ id: "claude-3-5-haiku-20241022",
2392
+ name: "haiku-3.5",
2393
+ displayName: "Claude Haiku 3.5",
2394
2394
  pricing: {
2395
- inputPerMTok: 1,
2396
- outputPerMTok: 5,
2397
- cacheWritePerMTok: 1.25,
2395
+ inputPerMTok: 0.8,
2396
+ outputPerMTok: 4,
2397
+ cacheWritePerMTok: 1,
2398
2398
  // 1.25x input
2399
- cacheReadPerMTok: 0.1
2399
+ cacheReadPerMTok: 0.08
2400
2400
  // 0.1x input
2401
2401
  },
2402
2402
  contextWindow: 2e5,
2403
2403
  description: "Fastest and most economical. Good for simple tasks and high volume."
2404
2404
  }
2405
2405
  };
2406
- var DEFAULT_MODEL = "claude-sonnet-4-5-20250929";
2406
+ var DEFAULT_MODEL = "claude-sonnet-4-20250514";
2407
2407
  var MODEL_ALIASES = {
2408
- "opus": "claude-opus-4-5-20250929",
2409
- "opus-4.5": "claude-opus-4-5-20250929",
2410
- "sonnet": "claude-sonnet-4-5-20250929",
2411
- "sonnet-4.5": "claude-sonnet-4-5-20250929",
2412
- "haiku": "claude-haiku-4-5-20250929",
2413
- "haiku-4.5": "claude-haiku-4-5-20250929"
2408
+ "opus": "claude-opus-4-20250514",
2409
+ "opus-4": "claude-opus-4-20250514",
2410
+ "sonnet": "claude-sonnet-4-20250514",
2411
+ "sonnet-4": "claude-sonnet-4-20250514",
2412
+ "haiku": "claude-3-5-haiku-20241022",
2413
+ "haiku-3.5": "claude-3-5-haiku-20241022"
2414
2414
  };
2415
2415
  function resolveModelId(nameOrAlias) {
2416
2416
  const lower = nameOrAlias.toLowerCase();
@@ -3183,7 +3183,7 @@ var Agent = class {
3183
3183
  */
3184
3184
  async run(userMessage, options) {
3185
3185
  const maxIterations = this.config.maxIterations ?? 15;
3186
- const model = this.config.model ?? "claude-sonnet-4-5-20250929";
3186
+ const model = this.config.model ?? "claude-sonnet-4-20250514";
3187
3187
  const maxTokens = this.config.maxTokens ?? 8192;
3188
3188
  const systemPrompt = this.config.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;
3189
3189
  const useStreaming = this.config.streaming ?? true;
@@ -3443,7 +3443,7 @@ ${userMessage}`;
3443
3443
  * Count tokens in current conversation (uses Anthropic's token counting API)
3444
3444
  */
3445
3445
  async countTokens() {
3446
- const model = this.config.model ?? "claude-sonnet-4-5-20250929";
3446
+ const model = this.config.model ?? "claude-sonnet-4-20250514";
3447
3447
  const systemPrompt = this.config.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;
3448
3448
  const allTools = await this.getAllTools();
3449
3449
  try {
@@ -3514,7 +3514,7 @@ ${userMessage}`;
3514
3514
  * @returns Object with original/new token counts and the summary
3515
3515
  */
3516
3516
  async compactHistory() {
3517
- const model = this.config.model ?? "claude-sonnet-4-5-20250929";
3517
+ const model = this.config.model ?? "claude-sonnet-4-20250514";
3518
3518
  const systemPrompt = this.config.systemPrompt ?? DEFAULT_SYSTEM_PROMPT;
3519
3519
  const allTools = await this.getAllTools();
3520
3520
  if (this.conversationHistory.length < 2) {
@@ -4250,7 +4250,7 @@ program.command("config").description("View or edit configuration").option("-s,
4250
4250
  console.log(`QUANTISH_API_KEY=${all2.quantishApiKey}`);
4251
4251
  }
4252
4252
  console.log(`QUANTISH_MCP_URL=${all2.mcpServerUrl}`);
4253
- console.log(`QUANTISH_MODEL=${all2.model || "claude-sonnet-4-5-20250929"}`);
4253
+ console.log(`QUANTISH_MODEL=${all2.model || "claude-sonnet-4-20250514"}`);
4254
4254
  console.log();
4255
4255
  console.log(chalk3.dim("# Discovery MCP (public, read-only market data)"));
4256
4256
  console.log(`QUANTISH_DISCOVERY_URL=https://quantish.live/mcp`);
@@ -4271,7 +4271,7 @@ program.command("config").description("View or edit configuration").option("-s,
4271
4271
  tableRow("Quantish API Key", all.quantishApiKey ? `${all.quantishApiKey.slice(0, 12)}...` : chalk3.dim("Not set"));
4272
4272
  }
4273
4273
  tableRow("MCP Server URL", all.mcpServerUrl);
4274
- tableRow("Model", all.model || "claude-sonnet-4-5-20250929");
4274
+ tableRow("Model", all.model || "claude-sonnet-4-20250514");
4275
4275
  printDivider();
4276
4276
  console.log(chalk3.dim(`Config file: ${config.getConfigPath()}`));
4277
4277
  console.log();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantish/agent",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "AI-powered agent for building trading bots on Polymarket",
5
5
  "type": "module",
6
6
  "bin": {