Open HamadaSalhab opened 2 weeks ago
When an integration tool is added to the model, and the chat endpoint is called, it returns a 500: Internal server error.
chat
500: Internal server error
To reproduce:
agent = client.agents.create(name="test agent", about="", model="gpt-4o") tool = client.agents.tools.create( agent_id=agent.id, **{ "name": "weatherx", "type": "integration", "integration": { "provider": "weather", "setup": { "openweathermap_api_key": "OPENWEATHERMAP_API_KEY" } } } ) session = client.sessions.create(agent=agent.id) session.id client.sessions.chat( session_id=session.id, messages=[ {"role": "user", "content": "What is the weather in London?"} ], recall=False )
Error log:
agents-api-multi-tenant-1 | litellm.exceptions.BadRequestError: litellm.BadRequestError: OpenAIException - Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - Error code: 400 - {\'error\': {\'message\': "Invalid type for \'tools[0].function\': expected a function definition, but got null instead.", \'type\': \'invalid_request_error\', \'param\': \'tools[0].function\', \'code\': \'invalid_type\'}}\nReceived Model Group=gpt-4o\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}
No response
π Description
When an integration tool is added to the model, and the
chat
endpoint is called, it returns a500: Internal server error
.To reproduce:
Error log:
π Reproduction steps
No response
π Have you spent some time to check if this bug has been raised before?