Skip to content

Assistants calls crashes on iOS, but not Windows. #377

Open
@cbdg-mitch

Description

@cbdg-mitch

Service

OpenAI

Describe the bug

Hey folks - been successfully using the nuget in my MAUI app for a while, but recently I'm finding on iOS that there's a bug that does not occur on windows.

Coach.razor.zip

I've attached the .CS file for the page having the issues, but basically it seems like the thread is being created fine on page load, but when the first message is sent, I get back this error:

Invalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.
[0:] FirstChanceException: System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: invalid_value)
Parameter: include[0]

Invalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.
[0:] FirstChanceException: System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: invalid_value)
Parameter: include[0]

Invalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.
[0:] FirstChanceException: System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: invalid_value)
Parameter: include[0]

Invalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.
[0:] FirstChanceException: System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: invalid_value)
Parameter: include[0]

Invalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.
2025-03-17 22:25:12.863 Xamarin.PreBuilt.iOS[35031:4178487]

Sending request to https://abtoolkitapi.azurewebsites.net/api/Chat/CreateOrUpdate with thread data: {"ThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","CreatedAt":"2025-03-18T02:25:08.208Z","UpdatedAt":"2025-03-18T02:25:12.862932Z","Messages":[{"Id":0,"ChatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","Role":"assistant","Content":"Welcome to Abby AI! How can I assist you today?","Timestamp":"2025-03-18T02:25:08.208Z"},{"Id":0,"ChatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","Role":"user","Content":"Learn about the latest Dementia caregiving techniques","Timestamp":"2025-03-18T02:25:11.466Z"},{"Id":0,"ChatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","Role":"assistant","Content":"Error: HTTP 400 (invalid_request_error: invalid_value)\nParameter: include[0]\n\nInvalid value: \u0027ste...ent\u0027. Supported values are: \u0027step_details.tool_calls[].file_search.results[].content\u0027.","Timestamp":"2025-03-18T02:25:11.574Z"}]}
2025-03-17 22:25:12.971 Xamarin.PreBuilt.iOS[35031:4178487] Received status code OK. Response content: {"threadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","createdAt":"2025-03-18T02:25:10.3358593","updatedAt":"2025-03-18T02:25:12.8912322Z","messages":[{"id":374,"chatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","role":"assistant","content":"Welcome to Abby AI! How can I assist you today?","timestamp":"2025-03-18T02:25:08.208Z"},{"id":375,"chatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","role":"user","content":"Learn about the latest Dementia caregiving techniques","timestamp":"2025-03-18T02:25:11.466Z"},{"id":376,"chatThreadId":"thread_0ZtPoV15YsGBwfYi5AWNd0SF","role":"assistant","content":"Error: HTTP 400 (invalid_request_error: invalid_value)\nParameter: include[0]\n\nInvalid value: 'ste...ent'. Supported values are: 'step_details.tool_calls[].file_search.results[].content'.","timestamp":"2025-03-18T02:25:11.574Z"}]}

Note this does not happen on Windows, same code base.

Would welcome any thoughts. I've tried both the "beta 3" (latest) and the latest stable, same result. I've also turned off the file search on this particular assistant to try and see if that would help, but it did not.

Steps to reproduce

Instantiate an existing assistant by ID, programmatically, then run it on iOS vs Windows (MAUI)

Code snippets

attached

OS

iOS

.NET version

9.x

Library version

Latest Stable or Latest Beta

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategory: Something isn't working and appears to be a defect in the client library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions