File search throws JsonElementWrongTypeException

I’m creating an assistant using the C# SDK and then enabling file search. When the prompt is invoked, it throws an InvalidOperationException in the method InternalRunStepFileSearchToolCallDetails.

The associated vector store contains several PDF files and one text file. In other words, there are no JSON files in the vector store, so I’m not sure why it’s trying to load a JSON document.

If I disable FileSearch, the prompt runs as expected, albeit without the additional knowledge provided by the uploaded files.

  Message: 
System.InvalidOperationException : The requested operation requires an element of type 'String', but the target element has type 'Object'.

  Stack Trace: 
ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)
JsonDocument.GetString(Int32 index, JsonTokenType expectedType)
InternalRunStepFileSearchToolCallDetails.DeserializeInternalRunStepFileSearchToolCallDetails(JsonElement element, ModelReaderWriterOptions options)
RunStepToolCall.DeserializeRunStepToolCall(JsonElement element, ModelReaderWriterOptions options)
InternalRunStepDetailsToolCallsObject.DeserializeInternalRunStepDetailsToolCallsObject(JsonElement element, ModelReaderWriterOptions options)
RunStepDetails.DeserializeRunStepDetails(JsonElement element, ModelReaderWriterOptions options)
RunStep.DeserializeRunStep(JsonElement element, ModelReaderWriterOptions options)
InternalListRunStepsResponse.DeserializeInternalListRunStepsResponse(JsonElement element, ModelReaderWriterOptions options)
InternalListRunStepsResponse>.Create(BinaryData data, ModelReaderWriterOptions options)
RunStepsPageEnumerator.GetPageFromResult(ClientResult result)
1 Like

Same issue, started maybe three weeks ago… Seems like an error in the SDK?