generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
1.14.0
Python Version
3.12.3
Operating System
Ubuntu 24.04.2 LTS
Installation Method
pip
Steps to Reproduce
class IntencaoDoUsuarioSchema(BaseModel):
intencaoDoUsuario: str
output: str
buscaBemSucedida: bool | None
gemini_model = GeminiModel(
model_id=os.getenv("GEMINI_MODEL_ID"),
params = {
"max_output_tokens": 40000
}
)
agent = Agent(
name="strands-ai-trek",
model=gemini_model,
prompt="<<PROMPT HERE>>")
agent.structured_output(IntencaoDoUsuarioSchema, "Do you have my data?")Expected Behavior
The response using the provided Pydantic schema
Actual Behavior
Error: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': "The GenerateContentRequest proto is invalid:\n * tools[0].tool_type: required one_of 'tool_type' must have one initialized field", 'status': 'INVALID_ARGUMENT'}}
Additional Context
No response
Possible Solution
No response
Related Issues
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working