Skip to content

submit_tool_outputs closes a thread instead of changing it run status #1470

@rajasimon

Description

@rajasimon

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

When using the client.beta.threads.runs.submit_tool_outputs method in the Python SDK, the thread closes and exits instead of updating the run status.

To Reproduce

Steps to Reproduce
Initialize a new run using client.beta.threads.runs.create_and_poll:

run = client.beta.threads.runs.create_and_poll(
    thread_id=thread.id,
    assistant_id=business.assistant_id,
)

Submit tool outputs using client.beta.threads.runs.submit_tool_outputs:

run = client.beta.threads.runs.submit_tool_outputs(
    thread_id=thread.id,
    run_id=run.id,
    tool_outputs=[{"tool_call_id": tool_call.id, "output": output}],
)

Observe that the thread closes and exits instead of updating the run status.

Code snippets

No response

OS

Ubuntu 22.04.4 LTS

Python version

Python v3.11.3

Library version

openai v1.31.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions