System Prompt Caching
# support
r
how to clear the assistant cache after updating the prompt so the new prompt is used for calls
@Vapi Support Bot
v
To ensure your updated system prompt is used for future calls, update the assistant configuration using the PATCH API endpoint. No separate cache clearing is required—updating the prompt via the API will apply the change immediately. Here’s an example:
Copy code
bash
curl -X PATCH https://api.vapi.ai/assistant/{assistant_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": { "messages": [{ "role": "system", "content": "YOUR NEW PROMPT" }] } }'
After this, all new calls will use the updated prompt. Source: [Vapi API Reference – Update Assistant](https://docs.vapi.ai/api-reference/assistants/update)
c
Hi Ramy, There’s no admin “cache clear” step. If PATCH returns 200 and includes the updated assistant object, the new system prompt and firstMessage take effect for new calls. Common causes when you still see the old prompt: • You patched the wrong assistant ID or environment (verify assistant id). • The PATCH payload used disallowed fields (use the model.messages[] structure; do not send systemPrompt/assistantOverrides as top-level). • You updated a copy or created a new assistant but continued using the old assistant’s demo/call link. • Your client or integration is caching an assistant config—restart the service or remove any local caching of assistant JSON. • For prompt reuse across assistants, a prompt cache key can cause cached behavior; ensure you didn’t set a shared prompt cache key unintentionally. Quick checks: 1. GET /assistants/{id} after your PATCH and confirm model.messages[0].content shows the new prompt. 2. Use the exact assistant_id from that GET when calling /call or using the demo link. 3. If your integration stores assistant JSON, reload it from the API rather than reusing a previously fetched copy. If you still see old behavior, send: • assistant_id • the exact PATCH payload you used • the GET response after PATCH (or its model.messages) and I’ll inspect further.
j
I had a similar issue which took a while to troubleshoot. I found that changing model config cleared the cache. In my case, changing temperature worked. You could change temp, save, then change it back
c
Hi, Let us know if you are still facing the issue.