ts-v3.0.9

mem0ai/mem0ts-v3.0.9Jun 17, 2026by whysosaket

AI Summary

Fixes Anthropic tool choice formatting, updates default model settings, and preserves custom metadata during updates. Also bumps esbuild for security.

Key Highlights

  • Fixed Anthropic `tool_choice` format (string to object) and tool response parsing.
  • Updated default model to `claude-sonnet-4-6` and added `temperature`, `topP`, `maxTokens` to config.
  • Preserves custom metadata fields (e.g., category, priority) during `update()` operations.
  • Bumped `esbuild` to remediate upstream vulnerability.

New Features

  • Added `temperature`, `topP`, and `maxTokens` to `LLMConfig` for Anthropic configuration.

Full Release Notes

## Mem0 Node SDK (v3.0.9)

**Bug Fixes:**
- **LLMs:** Fix Anthropic `tool_choice` format — was incorrectly sent as a bare string `"auto"` (rejected by the API); now correctly sent as `{ type: "auto" }`. Also fixes tool response parsing: `tool_use` blocks are now parsed into `toolCalls` objects instead of throwing. Updated default model to `claude-sonnet-4-6` and default `max_tokens` to `2000` to match the Python provider. Added `temperature`, `topP`, and `maxTokens` to `LLMConfig` so Anthropic params can be configured ([#5537](https://github.com/mem0ai/mem0/pull/5537))
- **Memory (OSS):** Preserve custom metadata fields during `update()` — fields such as `category`, `priority`, and other user-defined keys were previously dropped on update; the existing payload is now spread before applying the new data ([#5480](https://github.com/mem0ai/mem0/pull/5480))
- **Client:** Preserve user-defined schema keys in `createMemoryExport` ([#5594](https://github.com/mem0ai/mem0/pull/5594))

**Security:**
- **Dependencies:** Bump `esbuild` to `>=0.28.1` across all npm packages via pnpm overrides to remediate upstream vulnerability ([#5563](https://github.com/mem0ai/mem0/pull/5563))