Vercel AI SDK Provider (v3.0.0)
Major Release
Migrated to Vercel AI SDK v6 (LanguageModelV3 / ProviderV3) and the Mem0 v3 API.
Breaking Changes
AI SDK v6
-
Upgraded from AI SDK v5 (LanguageModelV2) to AI SDK v6 (LanguageModelV3).
-
Users must upgrade:
ai→^6.0.199- All
@ai-sdk/*provider packages →^3.x
Mem0 v3 API
-
Memory endpoints migrated:
/v1/memories/→/v3/memories/add//v2/memories/search→/v3/memories/search/
-
Entity IDs (
user_id,agent_id,run_id) must now be provided inside thefiltersobject for search requests.
Graph Memory Removed
-
Removed:
enable_graph- Graph prompts
- Relation extraction code
-
Graph memory is now configured as a project-level setting in the Platform.
Deprecated Parameters Removed
The following fields have been removed from Mem0ConfigSettings:
org_idproject_idorg_nameproject_nameoutput_formatfilter_memoriesasync_modeenable_graphversionapi_version
New Features
V3 Provider Contract
specificationVersion: "v3"supportedUrlsproperty- V3 content arrays in
doGenerate - V3 stream lifecycle events in
doStream
Mem0 Source in Responses
-
Memories are attached as a
sourceingenerateTextandstreamTextresponses. -
Programmatic access is available via:
providerMetadata.mem0.memories
Bug Fixes
Async Memory Storage
addMemoriesis now properly awaited.- Memories no longer silently fail to store.
Prompt Mutation
- Prompt arrays are now cloned before memory context injection.
- Prevents side effects on the caller's array.
Null Guard on Content
doGeneratenow guards againstnullcontentvalues returned by upstream providers.
Stream Response
doStreamnow returns the completeLanguageModelV3StreamResultobject.- Preserves all V3 fields.
Response Normalization
-
getMemoriesandretrieveMemoriesnow support both response formats:[...]{ results: [...] }