My python package does'nt work anymore with V2 Assistant

I cannot understand how to do.

here is my client creation:

self.client = OpenAI(api_key=os.getenv(“API_KEY”),default_headers={“OpenAI-Beta”: “assistants=v2”})

here is where error occours (self.client.beta.threads.runs.create):

async def submit_message(self,assistant_id, thread_id, user_message):
    # when a thread is already available create message and run the query
    # - create a message
    # - run the thread
    #@ chck run sul thread
    message = self.client.beta.threads.messages.create(thread_id=thread_id, role="user", content=user_message)
    return  message.id, self.client.beta.threads.runs.create(
        thread_id=thread_id,
        assistant_id=assistant_id,
        instructions=instructions + 'Oggi è '+datetime.now().strftime("%A %d/%m/%Y")
    )

and here the error:

openai.BadRequestError: Error code: 400 - {‘error’: {‘message’: “The requested model ‘gpt-4o-2024-05-13’ cannot be used with the Assistants API in v1. Follow the migration guide to upgrade to v2: https://platform.openai.com/docs/assistants/migration.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘model’, ‘code’: ‘unsupported_model’}}

The assistant was create with UI and it works correctly in the openai platform.
My python liv version is 1.30.1