VS Code: Prompt Editor for LLMs (GPT4, Llama, Mistral, etc.)
What matters technically here is that prompt work is being treated like application configuration, not just ad hoc experimentation. By moving prompts, model choices, and runtime settings into .aiconfig files, teams can place generative AI behavior under source control, review changes, and promote the same artifacts across development workflows. That creates a clearer boundary between prompt authoring and application logic, which is especially useful when multiple engineers need to collaborate on iterative model behavior.
The architecture also highlights a practical integration pattern: the editor is not the model runtime itself, but a VS Code front end that launches a Python-backed service using the AIConfig SDK. That means the operational dependencies are split across the IDE, the local Python environment, and any registered provider or extension. For teams, the trade-off is flexibility versus environment discipline: local setup, package versions, and custom registries must remain consistent if prompts are to behave predictably across machines.
For enterprise adoption, the extensionโs value is in abstraction and extensibility. A single interface for remote and local models can reduce tooling sprawl, while support for custom parsers makes it easier to adapt to internal endpoints or specialized model workflows. At the same time, this pattern creates governance questions around credential handling, provider routing, and which model capabilities are exposed to developers in a shared workspace.
In practice, the operational win is tighter feedback loops. Prompt chaining, model swapping, and version-controlled configs can help teams test behavior before wiring it into production code. But that only works well if the surrounding process treats prompt files as first-class artifacts with review, dependency management, and clear ownership.
AIConfig Extension for Visual Studio Code
Overview
AIConfig Editor turns VS Code into a generative AI prompt IDE, allowing you to run models from any provider (OpenAI, Google, Hugging Face, your local computer…) or any modality (text, image, audio) in a single universal playground. The prompts and model settings get saved in a.aiconfig.yaml or .aiconfig.json file, which can be source controlled and used in your application code via the AIConfig SDK.
Read the full documentation for more details
Getting Started
First use
- Install the AIConfig Editor extension.
- Run the AIConfig: Welcome command (
CMD+SHIFT+P->AIConfig: Welcome), and follow the steps. - Check out some of our cookbook templates for inspiration!
Next use
- Create an untitled aiconfig using the AIConfig: Create New command (
CMD+SHIFT+P->AIConfig: Create New) to launch an Untitled aiconfig.
Key Features
- Access local and remote models in one place. Access all generative AI models in a single place, directly in your IDE. Out-of-the-box support for text, image, and audio models.
- Universal prompt engineering playground. Swap between models, chain prompts together, and create prompt templates. Use these prompts in code using the AIConfig SDK.
- Version control prompts. Manage prompts and model settings in config files that you can put in source control, right beside your code.
- Connect to your own models and endpoints. Extend AIConfig to work with any model and endpoint. See custom models section for more details.
Supported Models
This extension supports all major foundation models from major model providers. For more details, please see https://aiconfig.lastmileai.dev/docs/overview/model-parsers/.| Provider | Model | Language | Support |
|---|---|---|---|
| OpenAI | GPT3.5 | Python | โ Built-in |
| OpenAI | GPT4 | Python | โ Built-in |
| OpenAI | Dall-E 3 | Python | โ Built-in |
| Azure OpenAI | GPT3.5, GPT4 | Python | โ Built-in |
| AWS Bedrock | Claude | Python | โ Built-in |
| HuggingFace Inference Endpoints | Text Generation, Text-to-image, Text-to-speech, Summarization, Translation, Automatic Speech Recognition | Python | โ Built-in |
| PaLM 2 | Python | โ Built-in | |
| Gemini | Python | โ Built-in | |
| Meta | Llama 2 | Python | Extension |
| Meta | Llama Guard | Python | Extension |
| HuggingFace Transformer Pipelines | Text Generation | Python | Extension |
How it works
AIConfig Editor is the UI for AIConfig, which is a JSON/YAML schema for storing generative AI prompts, models and model settings as a config file.For example, check out this sample aiconfig that handles function calling and prompt chaining.On install, the extension installs the Original Postython-aiconfig/" target="_blank" rel="noreferrer noopener nofollow" shape="rect">
python-aiconfig pip package in your Python environment.
On open, when you open a *.aiconfig.yaml file in VS Code, this extension launches a Python server which is running the AIConfig SDK.
As you edit and run prompts in the editor, the server uses the AIConfig SDK to run those prompts. This provides you with a lot of flexibility, because you can install additional AIConfig Extensions in your Python environment, and use them in the editor.
Extensibility and Customization
Read How it works for some additional context.When you use the AIConfig Editor, the extension installs
python-aiconfig in your Python env. You can install additional extensions and dependencies in the same Python env, and then use them in the AIConfig Editor.
Instructions
pip3 install <extension_package>in your python env (e.g.pip3 install aiconfig-extension-hugging-facefor Hugging Face models via Transformers, Diffusers and Inference endpoints)- Run AIConfig: Create Custom Model Registry command (
CMD+SHIFT+P->AIConfig: Create Custom Model Registry) - Register the additional models from the package imported in Step 1. e.g.
-
Copy the full sample
from aiconfig_extension_hugging_face import (โฉ HuggingFaceText2ImageDiffusor,โฉ HuggingFaceTextGenerationTransformer,โฉ HuggingFaceTextSummarizationTransformer,โฉ)โฉโฉfrom aiconfig import AIConfigRuntimeโฉโฉโฉdef register_model_parsers() -> None:โฉ """Register model parsers for HuggingFace models."""โฉโฉ text_to_image = HuggingFaceText2ImageDiffusor()โฉ AIConfigRuntime.register_model_parser(text_to_image, text_to_image.id())โฉโฉ text_generation = HuggingFaceTextGenerationTransformer()โฉ AIConfigRuntime.register_model_parser(โฉ text_generation, text_generation.id()โฉ )โฉ text_summarization = HuggingFaceTextSummarizationTransformer()โฉ AIConfigRuntime.register_model_parser(โฉ text_summarization, text_summarization.id()โฉ )โฉ
- Open an
*.aiconfig.yaml(e.g.CMD+SHIFT+P->AIConfig: Create New), and now you can use the custom extension in the editor!
To define you own extensions, please see Extensibility docs.
Enjoyed this article? Sign up for our newsletter to receive regular insights and stay connected.
