Here's the flow I've been picturing while writing code writing models. Feel free to take this idea anyone, would appreciate a heads up if it works and you publish sota before I get around to it :)
Let's give llms ide level info. As they type, if there's a function they're starting to call use a language server to get tooltip docs and put it in a comment just above the line it's writing. Put auto complete help, type docs, etc in their context while they code.
Edit
Second thought, this kind of thing feels very low in compute compared to the LLM calculations, is this the kind of thing that could be passed up to a remote service as a wasm bundle/similar, to control the streaming output?