budget-agent 0.4.9 → 0.5.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.
Files changed (2) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -26,7 +26,7 @@ const agent = new AgentBudget({
26
26
  });
27
27
 
28
28
  const response = await agent.step({
29
- model: 'anthropic/claude-sonnet-4-5',
29
+ model: 'anthropic/claude-opus-4-8',
30
30
  messages: [{ role: 'user', content: 'Hello' }],
31
31
  });
32
32
 
@@ -191,7 +191,7 @@ const agent = new AgentBudget({
191
191
  method: 'POST',
192
192
  headers: {
193
193
  'x-api-key': process.env.ANTHROPIC_API_KEY!,
194
- 'anthropic-version': '2023-06-01',
194
+ 'anthropic-version': '2026-01-01',
195
195
  'content-type': 'application/json',
196
196
  },
197
197
  body: JSON.stringify({
@@ -234,7 +234,7 @@ const agent = new AgentBudget({
234
234
  // Use inside a LangGraph node
235
235
  async function agentNode(state) {
236
236
  const response = await agent.step({
237
- model: 'anthropic/claude-sonnet-4-5',
237
+ model: 'anthropic/claude-opus-4-8',
238
238
  messages: state.messages,
239
239
  });
240
240
  return { messages: [...state.messages, response.choices[0].message] };
@@ -276,7 +276,7 @@ const agent = new AgentBudget({
276
276
 
277
277
  // Pricing is fetched and cached automatically
278
278
  const response = await agent.step({
279
- model: 'anthropic/claude-sonnet-4-5',
279
+ model: 'anthropic/claude-opus-4-8',
280
280
  messages: [{ role: 'user', content: 'Hello' }],
281
281
  });
282
282
  ```
@@ -326,7 +326,7 @@ const agent = new AgentBudget({
326
326
 
327
327
  // Use in CrewAI task execution
328
328
  const response = await agent.step({
329
- model: 'anthropic/claude-sonnet-4-5',
329
+ model: 'anthropic/claude-opus-4-8',
330
330
  messages: [{ role: 'user', content: taskDescription }],
331
331
  });
332
332
  ```
@@ -388,7 +388,7 @@ const agent = new AgentBudget({
388
388
  limits: { maxCostUSD: 5.00 },
389
389
  adaptiveRouting: {
390
390
  fallbackChain: [
391
- 'anthropic/claude-opus-4.8-fast',
391
+ 'anthropic/claude-opus-4-8',
392
392
  'openai/gpt-5.5',
393
393
  'openrouter/free',
394
394
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "budget-agent",
3
- "version": "0.4.9",
3
+ "version": "0.5.1",
4
4
  "description": "Track AI agent costs, tokens, runtime and spending. Prevent runaway OpenAI, Anthropic, LangGraph and OpenRouter agents from exceeding budget.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",