AIGitCommit
AI Git Commit
AI Git Commit is a JetBrains IDE plugin that analyzes the changes selected in the Commit tool window and generates a clear commit message with the AI provider and model you configure.
Features
- Generate commit messages from selected files, unversioned files, and selected commit hunks.
- Compact large change sets automatically to stay within model context limits.
- Send only the lines that actually changed: the prompt contains a minimal unified diff, so a one-line edit in a large file is not expanded into a whole-file diff.
- Choose the output language and use editable model IDs.
- Optionally send OpenAI's
reasoning_effort(low,medium, orhigh) for OpenAI-format providers. - Tune the request timeout (1–600 seconds) and the maximum prompt size (1,000–200,000 characters) to match your provider and change-set size.
- Create, edit, and reuse multiple custom prompt templates.
- Load a project-specific prompt from
commit-prompt.txtin the project root. - Exclude generated files, lock files, build output, or custom wildcard patterns.
- Use the IDE system proxy when required.
- Review and copy the most recently used prompt.
- Stream generated text when the selected provider supports streaming.
Project prompt files must contain the {diff} placeholder and may use {language} for the selected output language.
Supported AI providers and gateways
- OrcaRouter (free models available)
- Google Gemini
- Claude (Anthropic) (official Messages API)
- DeepSeek
- OpenAI API
- OpenAI-compatible providers with a custom endpoint, API key, and model ID
- OpenRouter
- Ollama
- Alibaba Cloud Model Studio (百炼)
- SiliconFlow
- VolcEngine
- Cloudflare Workers AI
- Kimi (Moonshot AI)
The model selector is editable. Model availability and pricing are controlled by each provider and may change over time.
Installation
AI Git Commit requires a JetBrains IDE based on IntelliJ Platform 2024.1 or later.
Install it from the JetBrains Marketplace, or open Settings/Preferences > Plugins > Marketplace, search for AI Git Commit, and select Install.
Quick start
- Open Settings/Preferences > Tools > AI Git Commit.
- Select an AI provider, model, and commit-message language.
- Open the provider settings, then enter the endpoint and API key if required.
- Optionally configure the reasoning effort, request timeout, prompt size, custom prompts, file filtering, and the system proxy.
- In the Commit tool window, select the changes to include and choose Generate AI Commit Message.
Reasoning effort
Providers that use the OpenAI chat-completions format accept an optional reasoning_effort field, which trades response quality against latency and cost on reasoning models. Select low, medium, or high under Settings/Preferences > Tools > AI Git Commit > Reasoning effort; the value is forwarded verbatim in the request body.
Default (not sent) keeps the previous request shape unchanged. Only enable a level for models that support the field — unsupported models answer with the provider's own error message (for example, an unsupported-parameter 400). Gemini, Claude (Anthropic Messages API), Ollama, and Cloudflare Workers AI use different request formats, so the control is disabled for them.
Request timeout and prompt size
Large change sets and slow reasoning models can take longer than the built-in HTTP timeout, which previously was a fixed value in the plugin. Under Settings/Preferences > Tools > AI Git Commit you can now set:
- Request timeout (s) — 1 to 600 seconds (default 60). It applies to both the connection and the response read of every provider, so a slow model can finish instead of failing with
Read timed out. - Max prompt size (chars) — 1,000 to 200,000 characters (default 20,000). The commit action uses this budget to decide when to compact a change set: it keeps the full diff while the prompt fits, then falls back to compact and summary modes. Raising the limit sends more detail to the model; lowering it reduces latency and token usage.
Both values are stored in the plugin settings and are applied on the next generation request; no IDE restart is required.
Privacy
Generating a commit message sends the selected change context and prompt to the AI service you configured. Review that provider's privacy and data-retention policies before sending sensitive source code. Use Ollama if you prefer a locally hosted model.
Development
The project targets Java 17 and IntelliJ Platform 2024.1.
./gradlew check
./gradlew buildPlugin
./gradlew check also runs headless IntelliJ Platform integration tests (BasePlatformTestCase): the real IDE application services and HTTP stack are exercised against local mock endpoints, so provider behavior can be verified without API keys or a GUI.
SettingsUiScreenshotTest renders the plugin settings panel to build/ui-screenshots/settings-anthropic.png in headless mode; GitHub Actions uploads it as the ui-screenshots artifact so pull requests can link visual evidence without requiring a GUI session.
See IDE compatibility for supported IDE profiles and release verification steps.
Support
License
Licensed under the GNU General Public License v3.0.
