-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Description
When attempting to generate a commit message for a large commit, Fork fails with the following error:
OpenAI error: Request too large for gpt-4o in organization org-XXXXX on tokens per min (TPM):
Limit 30000, Requested 206842. The input or output tokens must be reduced in order to run successfully.
Visit https://platform.openai.com/account/rate-limits to learn more.
This prevents commit message generation entirely for commits with large diffs.

Steps to Reproduce
- Stage a large number of files (e.g. lockfiles, snapshots, generated files, etc.)
- Use AI → Generate Commit Message
- Observe error dialog.
Expected Behavior
- Fork should be able to handle large diffs gracefully.
- Possible strategies:
- Summarize only file paths (not full diffs).
- Automatically ignore large/noisy files (e.g.
package-lock.json
,*.snap
,*.min.js
, etc.). - Option to choose which files/diffs to include in AI prompt.
- Allow switching to a higher-throughput model (e.g.
gpt-4o-mini
) for commit messages.
Actual Behavior
- Fork sends the full diff to the model, exceeding OpenAI’s 30k TPM limit (my request hit ~206k).
- Error dialog appears and no commit message is generated.
Environment
- Fork version: 2.55.3
- OS: macOS 15.6 (24G84)
- OpenAI model:
gpt-4o
- Organization TPM limit: 30000
Possible Solutions
- Add configurable max token budget per request.
- Add diff summarization (e.g.
git diff --stat
instead of fullgit diff
). - Provide a model selection option in Fork settings.
- Auto-ignore common large files from AI prompts.
Metadata
Metadata
Assignees
Labels
No labels