Why context matters so much
The model has no memory between calls. It only sees the messages you send. If you want it to remember the earlier part of a chat, you must send that history back every time.
This is the core trick of chatbots:
const messages = [
{ role: 'user', content: 'My name is Ada.' },
{ role: 'assistant', content: 'Nice to meet you, Ada.' },
{ role: 'user', content: 'What is my name?' }
];
Send all of this together, and the model can answer 'Ada' correctly. The memory lives in your message list, not in the model.