Disable Tools (Knowledge Retrieval/Code Interpreter) via the Modify Assistant Endpoint

Hello everyone!

I am hoping to get some clarity if I am wrong here, but it seems as though it is NOT possible to disable tools (knowledge retrieval/code interpreter) via the modify assistant endpoint.

According to the official docs:

“You can enabled/disable retrieval by using the Modify Assistant endpoint.”

Though the Modify Assistant endpoint does not explicitly allow you to disable the tools (knowledge retrieval or code interpreter) , it only allows you to enable them by passing the following params:
{"type": "retrieval"}
{"type": "code_interpreter"}.

I have tried passing an empty list , an empty dict {}, and dict with an empty “type”: {"type": ""}, but neither solution seems to work.

It seems as though there should be a param that sets a bool to True or False for enabling tools or simply allow us to pass an empty dict or list directly to the modify endpoint to disable the tools functionality, assuming the tools were already enabled on the assistant.

Any assistance here would be appreciated!

FYI: There is a small typo in the official API documentation: “A list of tool enabled on the assistant.” See below.

1 Like

I think you are right. There’s seemingly only a method to add more tools.

Idea: create something like a assistant class and replace the old assistant with a newly instantiated version of the same assistant but without the tools.

1 Like

Yes, and unfortunately the issue has yet to be resolved.

I am currently doing exactly this, (essentially creating a duplicate of the assistant), but I would love a simpler solution.

Hope the OAI team can get around to this at some point!

1 Like

You could enable the tools you need only at a run level, with them being empty for the assistant. Depending on the use-case this may or not make sense.


1 Like