https://retellai.com/?utm_source=discord&utm_medium=seo logo
How is the context window handled
# ❓・ai-evy-support
f
@AI Evy How is the context window handled? are functions injected and removed in the context window to preserve context?
a
Thanks for tagging me @fran.abenza. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, I can provide some information about context handling in Retell AI, though specific details about function injection and removal aren't explicitly documented. Retell AI's GPT-4.1 models offer substantial context windows - up to 1 million tokens across all tiers (GPT-4.1, GPT-4.1 Mini, and GPT-4.1 Nano) [(1) ]() . This extended context allows AI phone agents to maintain awareness throughout even the longest customer conversations, remembering details mentioned earlier in the call . The platform maintains context persistence through its transformer architecture, which enables the system to track conversation history, handle clarifications, manage topic transitions, and maintain personalization by leveraging earlier conversation elements [(2) ]() . However, the sources don't provide specific technical details about how functions are dynamically injected or removed from the context window to preserve context. The Discord discussion mentions that developers are handling long-term memory challenges by summarizing transcripts with separate agents and using token compression services [(3) ]() , but this appears to be community-driven solutions rather than built-in Retell AI features. For detailed information about context window management and function handling, I'd recommend checking the official documentation or contacting support: - Visit [Contact Sales]() - Visit [) Would you like a general answer based on my knowledge instead?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Smarter AI Phone Calls with ChatGPT-4.1 | Retell AI | Retell AI](https://www.retellai.com/blog/chatgpt-4-1-ai-phone-calling-retell) [[2] Inside Retell AI Receptionist's Large Language Model Intent Engine: 92% Accuracy and 50% Fewer Unnecessary Escalations](https://www.retellai.com/resources/retell-ai-receptionist-understands-calls-better) [[3] how to handle mid to long-term memory issues with voice and text?](https://discord.com/channels/1186424376300679209/1233603644402700351) ​