obol-ai 0.2.19 → 0.2.20

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.20
2
+ - increase tool iterations to 100 and max tokens to 128K
3
+ - update changelog
4
+
1
5
  ## 0.2.19
2
6
  - add location, venue, contact, poll message support
3
7
  - update changelog
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obol-ai",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Self-evolving AI assistant that learns, remembers, and acts on its own. Persistent vector memory, self-rewriting personality, proactive heartbeats.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -120,7 +120,7 @@ function createClaude(anthropicConfig, { personality, memory, userDir = OBOL_DIR
120
120
  const toolDefs = runnableTools.map(({ run, ...def }) => def);
121
121
  const probe = await client.messages.create({
122
122
  model: activeModel,
123
- max_tokens: 4096,
123
+ max_tokens: 131072,
124
124
  system: systemPrompt,
125
125
  messages: withCacheBreakpoints([...history]),
126
126
  tools: toolDefs,
@@ -141,7 +141,7 @@ function createClaude(anthropicConfig, { personality, memory, userDir = OBOL_DIR
141
141
 
142
142
  const runner = client.beta.messages.toolRunner({
143
143
  model: activeModel,
144
- max_tokens: 4096,
144
+ max_tokens: 131072,
145
145
  system: systemPrompt,
146
146
  messages: withCacheBreakpoints([...history]),
147
147
  tools: runnableTools.length > 0 ? runnableTools : undefined,
@@ -168,7 +168,7 @@ function createClaude(anthropicConfig, { personality, memory, userDir = OBOL_DIR
168
168
  { type: 'text', text: 'You have used too many tool calls. Please provide a final response now based on what you have so far.' },
169
169
  ]);
170
170
  const bailoutResponse = await client.messages.create({
171
- model: activeModel, max_tokens: 4096, system: systemPrompt, messages: withCacheBreakpoints([...histories.get(chatId)]),
171
+ model: activeModel, max_tokens: 131072, system: systemPrompt, messages: withCacheBreakpoints([...histories.get(chatId)]),
172
172
  }, { signal: abortController.signal });
173
173
  histories.pushAssistant(chatId, bailoutResponse.content);
174
174
  trackUsage(bailoutResponse.usage);
@@ -182,7 +182,7 @@ function createClaude(anthropicConfig, { personality, memory, userDir = OBOL_DIR
182
182
  vlog('[claude] No text in final response after tool use — forcing summary');
183
183
  histories.pushUser(chatId, 'Provide a concise response to the user based on the tool results above.');
184
184
  const summaryResponse = await client.messages.create({
185
- model: activeModel, max_tokens: 4096, system: systemPrompt, messages: withCacheBreakpoints([...histories.get(chatId)]),
185
+ model: activeModel, max_tokens: 131072, system: systemPrompt, messages: withCacheBreakpoints([...histories.get(chatId)]),
186
186
  }, { signal: abortController.signal });
187
187
  histories.pushAssistant(chatId, summaryResponse.content);
188
188
  trackUsage(summaryResponse.usage);
@@ -9,12 +9,17 @@ function createAnthropicClient(anthropicConfig, { useOAuth = true } = {}) {
9
9
  authToken: anthropicConfig.oauth.accessToken,
10
10
  defaultHeaders: {
11
11
  'anthropic-dangerous-direct-browser-access': 'true',
12
- 'anthropic-beta': 'claude-code-20250219,oauth-2025-04-20',
12
+ 'anthropic-beta': 'claude-code-20250219,oauth-2025-04-20,output-128k-2025-02-19',
13
13
  },
14
14
  });
15
15
  }
16
16
  if (anthropicConfig.apiKey) {
17
- return new Anthropic({ apiKey: anthropicConfig.apiKey });
17
+ return new Anthropic({
18
+ apiKey: anthropicConfig.apiKey,
19
+ defaultHeaders: {
20
+ 'anthropic-beta': 'output-128k-2025-02-19',
21
+ },
22
+ });
18
23
  }
19
24
  throw new Error('No Anthropic credentials configured. Run: obol config');
20
25
  }
@@ -1,5 +1,5 @@
1
1
  const MAX_EXEC_TIMEOUT = 120;
2
- let MAX_TOOL_ITERATIONS = 10;
2
+ let MAX_TOOL_ITERATIONS = 100;
3
3
 
4
4
  const OPTIONAL_TOOLS = {
5
5
  text_to_speech: {