Assistants previously created (using old keys) don't work once API keys refreshed from portal

GenixPRO 61 Reputation points
2025-01-29T22:50:02.83+00:00

Hi.

  1. We deployed a few Assistants using Assistants API.
  2. User interacted with these assistants over time & had several messages.
  3. Then we refreshed both keys for our OAI model using portal.azure
  4. Now the Assistants that we created using old keys don't seem to work. They're unable to retrieve past messages. what may be wrong?
  5. chatCompletions and other APIs that create() an instance "each time" work fine.
  6. Assistants API that create() once & run anywhere, seems to have problems.

Is this expected? Any ways to resolve pls. Are we expected to delete old assistant and recreate? Thanks

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,096 questions
0 comments No comments
{count} votes

Accepted answer
  1. santoshkc 12,110 Reputation points Microsoft Vendor
    2025-01-30T10:56:42.0666667+00:00

    Hi @GenixPRO,

    Thank you for reaching out to Microsoft Q&A forum!
    When API keys are refreshed, they invalidate the old keys, which is likely causing the issue you're experiencing with the Assistants previously created using the old keys. This would prevent them from retrieving past messages. The reason why APIs like chatCompletions work fine is that they create a new instance each time, while the Assistants API, which creates an instance once and runs anywhere, is more dependent on the old keys.

    To resolve this, ensure that all references to the old API keys in your application are updated with the new keys. If the Assistants were created with old keys, they may need to be re-deployed or re-configured with the new keys. You do not necessarily need to delete and recreate the assistants, but you should verify that all dependencies and configurations are aligned with the new keys.

    Hope this helps! If it doesn't work, please let us know, and we'll work on resolving the issue.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.