Refactor Code Completions to use Prompt Registry in all cases

Since we centralized all our features around the prompt registry in the AIGW, we should update the code completion implementation to use the prompt registry. For instance, it would help with our telemetry.

Existing Implementation

Our current code completion only uses the prompt registry if you pass in prompt_version: 2 which means you are specifying the prompt client side and passing it through. We aren't doing this for .com, this is for self-hosted.

If you don't use prompt version 2 it uses LiteLlmTextGenModel directly which does not use the prompt registry.

Historically we had to accommodate code-gecko, which only had prefix/suffix and didn't use a chat messages based API, so AFAIK the prompt registry didn't support it. code-gecko was finally removed a week or two ago so we can finally do the refactor.

Proposal

Both Fireworks and Vertex/Codestral could be updated to the prompt registry, with the FiM format being applied then passed through the agent like we do with prompt_version: 2

Storing the FiM format should be compatible with the work we're doing elsewhere for model switching

Edited by Allen Cook