Skip to content

[BUG] Bedrock Marketplace model error #150

Open
@yhou-uk

Description

@yhou-uk

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

0.1.6

Python Version

3.12.10

Operating System

macOS 15.5

Installation Method

pip

Steps to Reproduce

First Install Mistral-Small-24B-Instruct-2501 model from Bedrock Marketplace.
Provide model endpoint ARN in blow code example
code example:

import asyncio
from mcp import stdio_client, StdioServerParameters
from strands import Agent
from strands.tools.mcp import MCPClient
from strands.models import BedrockModel

async def main():
    # Connect to multiple MCP servers
    google_mcp_client = MCPClient(lambda: stdio_client(
        StdioServerParameters(
                command="npx",
                args=["-y", "@modelcontextprotocol/server-google-maps"],
                env={"GOOGLE_MAPS_API_KEY": "<GOOGLE_API>"})
            )
        )
    time_mcp_client = MCPClient(lambda: stdio_client(
        StdioServerParameters(
                command="npx",
                args=["-y", "time-mcp"])
            )
        )
    
    # Set up the clients using context managers (not async)
    with google_mcp_client, time_mcp_client:
        # Get tools from both clients
        tools = google_mcp_client.list_tools_sync() + time_mcp_client.list_tools_sync()
        
        # Define the model ID directly

        model_id = "<BEDROCK_MARKETPLACE_ENDPOINT_ARN>"

        bedrock_model = BedrockModel(
            model_id=model_id,
            streaming=False
        )
        
        # Create an agent with the model ID and tools
        print(f"Creating agent with model {model_id}...")
        
        agent = Agent(model=bedrock_model, tools=tools)
        response = agent("What are the top 3 Department stores in London?")
        print(f"Response: {response}")

        response = agent("Are they open now?")
        print(f"Follow-up response: {response}")

if __name__ == "__main__":
    asyncio.run(main())

Expected Behavior

It should complete the conversation and use correct tools to answer questions.

Actual Behavior

It shows below error:

strands.types.exceptions.EventLoopException: An error occurred (ValidationException) when calling the Converse operation: This model doesn't support the status field. Remove status and try again.

Additional Context

No response

Possible Solution

No response

Related Issues

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions