Apply model edits to a file with an AST and model routing
I was asked this
No reports yet. Sign in to say where you were asked it.
An AI code editor lets a user ask for a change; a strong model answers with a sketch of the edit (the changed functions, with comments standing in for untouched code). Design the system that turns that sketch into an exact, reviewable edit of the file within about two seconds, and the router that decides which model (a fast small one or a frontier one) handles each request: tab completions, inline edits, chat and agent steps. Cover the apply step (structural versus model rewrite), validation, latency and cost numbers, and fallbacks when a model provider degrades.
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
