Feature Request: Allow configurable model ID for mem0_memory tool
🚀 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.
Hi, I'm a beginner interested in Python, AI/ML, and would love to work on this. Please assign it to me!
The hardcoded model ID (anthropic.claude-3-5-haiku-20241022-v1:0) in mem0_memory tool causes ValidationException in AWS Bedrock if not available for on-demand use, requiring provisioned throughput. This makes the tool inflexible and can break if the model is deprecated or unavailable for your region.
Make the LLM model ID externally configurable. Allow Mem0ServiceClient to accept an llm_model_id (from parameter or environment variable) and pass it to backend clients. This lets users set an available model for their AWS region (like anthropic.claude-3-sonnet-20240229-v1:0), improving flexibility and future-proofing.