Run instructions don't affect assistant

I use the Assistants API with the Python library like this:

run = client.beta.threads.runs.create_and_poll(
            thread_id=thread_id,
            assistant_id=assistant_id,
            instructions=run_instructions 
 )

I have been fetching the run_instructions from an API and changing it in a way that should affect the Assistant’s response. But it seems there is no change in the Assistant’s behaviour despite me confirming the run_instructions string has in fact changed.

I also tried polling myself, in case the create_and_poll helper was the problem, but no success there either.

 run = client.beta.threads.runs.create(
            thread_id=thread_id,
            assistant_id=assistant_id,
            instructions=run_instructions
)
# do polling

I’m using openai python library version 1.56.1.

It’s also worth noting that I am using the same assistant_id and thread_id for one user. I don’t want to change the thread_id because I want to maintain conversation history.

Interesting. I moved the instructions parameter to be the first in the list, and it works:

run = client.beta.threads.runs.create_and_poll(
            instructions=run_instructions,
            thread_id=thread_id,
            assistant_id=assistant_id
 )