Skip to content

Feature Request: Allow configurable model ID for mem0_memory tool #3688

@yvpaulo

Description

@yvpaulo

🚀 The feature

Currently, the mem0_memory tool in strands-tools has a hardcoded model ID (anthropic.claude-3-5-haiku-20241022-v1:0) within its DEFAULT_CONFIG. This causes a ValidationException on AWS Bedrock when this specific model is not available for on-demand use, as it requires a provisioned throughput profile.

This makes the tool inflexible and prone to breaking if the hardcoded model is deprecated or restricted.

Describe the solution you'd like I suggest modifying the mem0_memory tool to allow the LLM model ID to be configured externally. This could be achieved by:

Allowing the Mem0ServiceClient to accept an llm_model_id during initialization.
This llm_model_id would then be passed down and used to configure the Mem0 client (either OpenSearch or FAISS backend).
The mem0_memory tool function itself should also accept this llm_model_id as an optional parameter in its TOOL_SPEC.
This would allow users to specify a model that is available in their AWS region, like anthropic.claude-3-sonnet-20240229-v1:0, either directly in the tool call or via an environment variable like STRANDS_DEFAULT_MODEL_ID.

Motivation, pitch

An error occurred (ValidationException) when calling the Converse operation:
Invocation of model ID anthropic.claude-3-5-haiku-20241022-v1:0 with on-demand throughput isn’t supported.
Retry your request with the ID or ARN of an inference profile that contains this model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions