Skip to content

feat: add configurable model for git text generation#1171

Merged
juliusmarminge merged 7 commits intopingdotgg:mainfrom
seifalmotaz:fix/git-text-generation-model
Mar 17, 2026
Merged

feat: add configurable model for git text generation#1171
juliusmarminge merged 7 commits intopingdotgg:mainfrom
seifalmotaz:fix/git-text-generation-model

Conversation

@seifalmotaz
Copy link
Copy Markdown
Contributor

@seifalmotaz seifalmotaz commented Mar 17, 2026

  • Add gitTextGenerationModel setting to AppSettingsSchema with gpt-5.4-mini as default
  • Add UI in settings page to select git text generation model
  • Propagate model parameter from settings through to CodexTextGeneration layer
  • Add DEFAULT_GIT_TEXT_GENERATION_MODEL constant (gpt-5.4-mini)
  • Add gpt-5.4-mini to MODEL_OPTIONS_BY_PROVIDER.codex

What Changed

Added a configurable model setting for git text generation (commit messages, PR descriptions, branch names). Previously, git text generation used a hardcoded default. Now users can select a specific model in settings.

Changes:

  • packages/contracts/src/model.ts: Added gpt-5.4-mini to model options and exported DEFAULT_GIT_TEXT_GENERATION_MODEL
  • packages/shared/src/model.ts: Re-exported the default model constant
  • packages/contracts/src/git.ts: Added optional model field to GitRunStackedActionInput
  • apps/web/src/appSettings.ts: Added gitTextGenerationModel field to settings schema
  • apps/web/src/routes/_chat.settings.tsx: Added UI dropdown for model selection with "Restore default" button
  • apps/web/src/lib/gitReactQuery.ts: Pass model from settings to stacked action mutation
  • apps/web/src/components/GitActionsControl.tsx: Wire model through to mutations
  • apps/server/src/git/Services/TextGeneration.ts: Accept optional model parameter on text generation methods
  • apps/server/src/git/Layers/CodexTextGeneration.ts: Use provided model with fallback to default
  • apps/server/src/git/Layers/GitManager.ts: Pass model through git text generation pipeline
  • apps/server/src/orchestration/Layers/ProviderCommandReactor.ts: Use default for branch name generation

Why

#1165
Users running expensive reasoning models (e.g., gpt-5.2) as their main chat model shouldn't have those same heavy models used for quick git operations like generating commit messages. This decouples the chat model from the git text generation model, allowing faster/cheaper models for routine git operations while keeping the powerful model for complex conversations.

The default is set to gpt-5.4-mini as a lightweight, cost-effective option that's still capable of writing good commit messages and PR descriptions.

UI Changes

Added a new "Git Text Generation Model" setting in the Settings page with:

  • Dropdown to select from available Codex models
  • "Restore default" button to reset to gpt-5.4-mini

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Add configurable model selection for git text generation

  • Introduces DEFAULT_GIT_TEXT_GENERATION_MODEL (gpt-5.4-mini) in model.ts and threads an optional model parameter through the full git text generation pipeline (commit messages, PR content, branch names).
  • Adds a textGenerationModel field to AppSettingsSchema and a new "Git" section in the settings UI (_chat.settings.tsx) so users can select and persist their preferred model.
  • The selected model is forwarded from GitActionsControl through gitRunStackedActionMutationOptions to the runStackedAction API endpoint, which now accepts textGenerationModel in its contract input schema.
  • Adds gpt-5.4-mini to the Codex provider model options list.

Macroscope summarized bea44b5.

image
2026-03-17.22-38-48.mov

- Add gitTextGenerationModel setting to AppSettingsSchema with gpt-5.4-mini as default
- Add UI in settings page to select git text generation model
- Propagate model parameter from settings through to CodexTextGeneration layer
- Add DEFAULT_GIT_TEXT_GENERATION_MODEL constant (gpt-5.4-mini)
- Add gpt-5.4-mini to MODEL_OPTIONS_BY_PROVIDER.codex
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fe5f89f0-21e6-4426-a08a-af62b9e62f56

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 17, 2026
- Build git text generation model options via `getAppModelOptions`
- Show the selected model's display name in the select trigger
- Improve settings row layout for better responsiveness
@juliusmarminge
Copy link
Copy Markdown
Member

5.4 mini feels so much better jesus!

@juliusmarminge juliusmarminge merged commit 579a69e into pingdotgg:main Mar 17, 2026
9 checks passed
ashvinnihalani referenced this pull request in ashvinnihalani/t3code Mar 19, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
ashvinnihalani referenced this pull request in ashvinnihalani/t3code Mar 19, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
gabrielMalonso pushed a commit to gabrielMalonso/t3code that referenced this pull request Mar 19, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
apexsloth pushed a commit to apexslothforks/t3code that referenced this pull request Mar 26, 2026
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants