# OpenAI Sublime Text plugin: two release lines decided by your editor build, and a paste that wraps itself in a code block

> A Sublime Text assistant covering OpenAI Responses, Anthropic, Gemini and any OpenAI-compatible host. Most of the interesting behaviour is in the input panel and the context commands rather than in the model list.

**yaroslavyaroslav/OpenAI-sublime-text** — First class Sublime Text AI assistant with gpt-5, Opus 4.6, Gemini 3 and ollama support!

- Repository: https://github.com/yaroslavyaroslav/OpenAI-sublime-text
- Stars: 466 · Forks: 41
- Language: Python
- License: MIT
- Published: 2026-09-14 · Updated: 2026-09-14 · Language: en
- Canonical page: https://hysenlabs.com/projects/yaroslavyaroslav-openai-sublime-text

## Your editor build decides which release line you get

The stated requirement is Sublime Text build 4205 or newer, because that is the build with a Python 3.14 plugin host. What happens below that is spelled out separately: Package Control keeps builds 4050 through 4204 on a frozen 6.1.0 release line that stays Python 3.8 compatible. The published tags are 6.3.0 and 6.2.0, both of which sit above that freeze. So the gate is the editor build number rather than anything you configure in the plugin, and a user on an older build does not receive 6.2.0 or 6.3.0 and has no setting that changes that. The repository carries a `.python-version` file, which makes the interpreter floor explicit in the checkout as well. Check your build before you spend an afternoon on a missing feature, because the answer is usually the build number rather than the install. The last push on the default branch is dated 2026-09-23, so the freeze is a policy the maintainer applies rather than a repository that stopped moving, and 6.3.0 published on 2026-08-30 is the newest tag.

## The clone target directory is named OpenAI completion, not after the repository

The manual install route asks you to open your packages folder with `Preferences: Browse Packages` and then run:

```bash
git clone https://github.com/yaroslavyaroslav/OpenAI-sublime-text.git OpenAI\ completion
```

The directory it creates is not the repository name, and it contains a space. The package layout follows the same convention, with three menu files named `Main.sublime-menu`, `Side Bar.sublime-menu` and `Tab Context.sublime-menu`, alongside `Default.sublime-commands`, `Default.sublime-keymap`, `openAI.sublime-settings`, `main.py`, `messages.json`, a `messages/` directory, `dependencies.json` and `_logging.py`. The page does not say whether the directory a clone produces and the one Package Control produces are interchangeable, so treat the two install routes as possibly divergent and check which one you have. Sublime Text is asked to install the dependencies on first open, and may ask you to restart. That restart step is why the two routes can diverge: a clone brings over whatever is in the working tree, while Package Control installs a tagged release, so a clone gives you development state and the palette install gives you 6.3.0.

## Pasting into the input panel wraps the clipboard in a code block

The input panel has a small set of behaviours worth reading before you use it. `Cmd+Enter` on macOS and `Ctrl+Enter` on Windows and Linux submit. `Esc` closes the panel and keeps the current draft. At the first row and first column, `Up` browses older submitted prompts and `Down` moves toward newer ones and eventually restores the draft you started with. Then there is the one that surprises people: pasting with `Cmd+V` or `Ctrl+V` wraps the clipboard text in a Markdown code block. So a pasted stack trace arrives fenced, which is usually what you want, and a pasted paragraph of prose also arrives fenced, which usually is not. Nothing on the page describes a way to turn that off. Two commands cover the rest of the loop. `OpenAI: Chat Model Select` opens a panel for choosing an assistant, which is where the model, API key and temperature are defined, and for choosing an output mode, either an inline `Phantom` or a chat `View` in a panel or new tab. `OpenAI: New Message` skips that panel and reuses whatever is currently selected, which is the faster path once you have settled on settings, and it also pulls in any files you have marked for context.

## Your prompt is sent to the model under a heading called Question

Chat roles are rendered as hard-bounded Markdown sections named `Question`, `Selection` and `Answer`, and which names get folded is a setting:

```json
{
    "fold_sections": ["Question", "Answer"]
}
```

Matching is case-insensitive and ignores leading Markdown hashes, and manual fold and unfold choices stay local to each chat view and survive later streaming updates. That design is what makes folding possible at all, since a transcript with no fixed structure has nothing stable to fold on. The consequence is that the transcript is not free-form Markdown: your instruction arrives under a `Question` heading and the reply under `Answer`, which the model sees as part of the document it is reading.

## Per-project history is opt-in and the path must be absolute

Separate chat history and assistant settings for a project are enabled by appending one block to the project settings file:

```json
{
    "settings": {
        "ai_assistant": {
            "cache_prefix": "/absolute/path/to/project/"
        }
    }
}
```

The nesting matters: the key sits inside `ai_assistant`, which sits inside `settings`, so it goes in a `.sublime-settings` file rather than a preferences dialog, and the value has to be an absolute path. Without it you are on one global history and one global set of assistant definitions. That makes the reset command worth checking before you run it, since `OpenAI: Reset Chat History` clears the current context and the current context might be the global one rather than a project's. `OpenAI: Refresh Chat` is the gentler option, reloading history into the panel or tab.

## Tabs are called Sheets in one command and Files in two menus

Adding files to the request context has three entry points. `OpenAI: Add Sheets to Context` runs from the command palette and toggles the tabs you have selected, either with `Ctrl+Click` or `Cmd+Click` on tabs or by selecting files in the sidebar that get focused as tabs. The tab context menu offers `OpenAI: Add File to Context`, and the sidebar context menu offers the same command. So one action is called Sheets in the palette and File in both menus, which makes it harder to find from memory when you are looking for it. Marking a file is a toggle rather than an add, so a second invocation removes it. Remember what the toggle means for privacy: a marked file has its content sent along with the prompt on every request that includes it.

## Build and LSP output goes to the model, and the context section stops mid-word

Four commands append recent lines from Sublime Text's own diagnostic panels to the request: `OpenAI: New Message With Build Output`, `OpenAI: Chat Model Select With Build Output`, `OpenAI: New Message With LSP Output` and `OpenAI: Chat Model Select With LSP Output`. The number of lines appended is set by `build_output_limit` in `openAI.sublime-settings`, so it is a budget you control rather than a fixed dump. Responses land in the OpenAI output panel by default, or as a non-disruptive inline overlay in `Phantom` mode, and `OpenAI: Open in Tab` moves the chat to a dedicated tab. The status bar surfaces the model name, the current mode and the sent and received token counts. The context section then ends partway through a sentence, at the point where it would describe how many files are currently included, so the display side of that toggle is not on the page. The repository is set up like a maintained Python project around it, with `.ruff.toml` for linting, a `tests/` directory and a `LICENSE` file carrying MIT terms.

## Conclusion

This plugin is worth installing if your Sublime Text build is 4205 or newer and you want diagnostics and whole files sent to a model without copying them by hand, because the build and LSP commands and the per-tab context toggle do that work well. Two things to know first. Your editor build number, not your plugin version, decides which release line you get, and anything below 4205 is frozen at 6.1.0 forever. Second, review the input panel defaults before you paste anything proprietary, because pasted clipboard text is wrapped in a Markdown code block on its way out, and marked files are sent in full with every request. Check the assistant definition for API key, temperature and proxy before the first real prompt.

## FAQ

### What Sublime Text build does the yaroslavyaroslav OpenAI plugin require?

Build 4205 or newer, because that is the build with a Python 3.14 plugin host. Package Control keeps builds 4050 through 4204 on a frozen 6.1.0 release line that remains Python 3.8 compatible, and they do not receive the published 6.2.0 or 6.3.0 tags.

### How do I install the OpenAI Sublime Text plugin without Package Control?

Run `Preferences: Browse Packages` to open your packages folder, then clone into it with `git clone https://github.com/yaroslavyaroslav/OpenAI-sublime-text.git OpenAI\ completion`. Open Sublime Text so it installs the dependencies, restart if it asks, then type `OpenAI` in the command palette and press `Enter`.

### How do I keep a separate chat history per project in the OpenAI Sublime Text plugin?

Add a `cache_prefix` key inside `ai_assistant` inside `settings` in the project's settings file, with an absolute path such as `/absolute/path/to/project/`. Without it the plugin uses one global history and one global set of assistant settings.

### What happens when I paste into the OpenAI Sublime Text plugin input panel?

Pasting with `Cmd+V` or `Ctrl+V` wraps the clipboard text in a Markdown code block before it is sent. The page documents no setting to turn that wrapping off, so pasted prose arrives fenced as well as pasted code.

### How do I send Sublime Text build errors or LSP diagnostics to the model?

Use `OpenAI: New Message With Build Output`, `OpenAI: Chat Model Select With Build Output`, `OpenAI: New Message With LSP Output` or `OpenAI: Chat Model Select With LSP Output`. Those commands append recent lines from the corresponding diagnostic panel, with the line count governed by `build_output_limit` in `openAI.sublime-settings`.

### Which model providers can the OpenAI Sublime Text plugin talk to?

OpenAI Responses, Anthropic Claude and Google Gemini, plus any OpenAI-compatible host such as a llama.cpp server or ollama. Proxy support is listed among the features, and an assistant definition is where the model, API key and temperature are set.

## Sources

- [Issues](https://github.com/yaroslavyaroslav/OpenAI-sublime-text/issues)
- [License: MIT](https://github.com/yaroslavyaroslav/OpenAI-sublime-text/blob/develop/LICENSE)
- [README](https://github.com/yaroslavyaroslav/OpenAI-sublime-text/blob/develop/README.md)
- [Releases](https://github.com/yaroslavyaroslav/OpenAI-sublime-text/releases)
- [yaroslavyaroslav/OpenAI-sublime-text on GitHub](https://github.com/yaroslavyaroslav/OpenAI-sublime-text)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/yaroslavyaroslav-openai-sublime-text
