Anyone experiences no message response using assistants API?

Hi, I just encountered very strange behavior with assistants API.

I am using assistants API to upload a file and ask question about the file, at most time I can get two run steps whose types are tool_calls(retrieval) and message_creation respectively.

However from yesterday I found that sometimes, the message_creation run step can be missing and result in the run stopped at tool_call(retrieval) . No message is added to the thread.

In this case, I have to add another user message like “what’s your response?” to force message_creation to be executed.

I am wondering if this is a bug that supposed to be fixed in the future? And if there is a way to avoid this behavior?

2 Likes

Experiencing the same situation here. The run is complete, there’s a tool_calls for retrieval tool, which is completed, but no message added to the thread.

2 Likes

The same event has occurred, and the following things have been identified:

  • It happens when trying to output images with CodeInterpreter.
  • It does not happen when trying to output Word files.
  • A ThreadMessage with empty content is added to the list of ThreadMessages.
    • ThreadMessage(id='msg_QvyFx1En6dEuFqWU48OcnamE', assistant_id='asst_Xgn4Cvd7a4wjj7ZND1yaoLGY', content=[], created_at=1709185552, file_ids=[], metadata={}, object='thread.message', role='assistant', run_id='run_y2l1RB3rcfpvr04tvOepTkcv', thread_id='thread_sOkANpAkgI8ZWIPN9epiEIEy')
  • message_creation is added to the list of RunSteps, but it is linked to the ThreadMessage with empty content.
    • RunStep(id='step_hiyemqr7jqkviE2NFuk9jw1D', assistant_id='asst_Xgn4Cvd7a4wjj7ZND1yaoLGY', cancelled_at=None, completed_at=1709185552, created_at=1709185552, expired_at=None, failed_at=None, last_error=None, metadata=None, object='thread.run.step', run_id='run_y2l1RB3rcfpvr04tvOepTkcv', status='completed', step_details=MessageCreationStepDetails(message_creation=MessageCreation(message_id='msg_QvyFx1En6dEuFqWU48OcnamE'), type='message_creation'), thread_id='thread_sOkANpAkgI8ZWIPN9epiEIEy', type='message_creation', usage=Usage(completion_tokens=62, prompt_tokens=608, total_tokens=670), expires_at=None)], object='list', first_id='step_D1pju8MpgrOoSthq9TYok9h3', last_id='step_hiyemqr7jqkviE2NFuk9jw1D', has_more=False)
1 Like