Repository navigation
Conversation
One-shot commit, PR, branch, and title generation sent claude-haiku-4-5 whenever the stored provider was disabled, even when that instance's custom model was the slug the backend would accept. The product text-generation slug still applies when no custom model is configured, and a built-in thread default does not replace it. Co-authored-by: maco <macodev00@users.noreply.github.com>
cursor
Bot
changed the base branch from
main
to
cursor/upstream-main-base-804d
October 1, 2026 08:37
The product slug stays in place for built-in thread defaults. A custom model replaces it only when that slug is not one of the instance's configured models. Co-authored-by: maco <macodev00@users.noreply.github.com>
Owner
Author
|
Opened upstream. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
One-shot text generation (commit, PR, branch, and title) ignores a provider instance's configured custom model when
textGenerationModelSelectionis unset and the stored instance is disabled. Fallback then sends the product slugclaude-haiku-4-5, which some backends (OpenRouter guardrails that block Anthropic models) refuse.Fixes pingdotgg#12651. Supersedes pingdotgg#12905, which Macroscope re-verdicted Not approved on 2026-10-01 because it applied every configured default, including built-in chat models, to those flows.
The branch is cut from upstream
pingdotgg/t3codemain148e6deea. This fork PR uses that same commit as its base so the diff is only the fix. Open the upstream PR fromcursor/text-gen-fallback-model-redo1-804dagainstpingdotgg/t3codemain.Change
fallbackTextGenerationProviderstill picks the first enabled instance. The model on that instance is now:DEFAULT_TEXT_GENERATION_MODEL_BY_PROVIDER, Claude'sclaude-haiku-4-5) when the instance has no custom model, when that slug is itself one of the custom models, or whendefaultModelSelectionfor this instance is a built-in slug. Title, branch, and commit generation keep the cheap product default for users who only picked a chat model.defaultModelSelectionwhose model is one of the instance's custom models (options included), otherwise the first custom slug fromproviderInstances[id].config.customModelsor the legacyproviders[driver].customModelslist.An already-enabled
textGenerationModelSelectionis left unchanged.Scope and approval
Maintainer triage on pingdotgg#12651 accepted the bug and the intended behavior: do not emit a hardcoded slug the instance is not configured to call; a cheap default is fine when that slug is actually the product fallback. This redo keeps that product slug in every case pingdotgg#12905 changed for built-in thread defaults, and only substitutes a custom model on the fallback path those backends refuse.
Verification
From
apps/serverat148eaf0e9, Node v24.13.1:Result: exit 0. The compiler printed existing suggestion diagnostics and no
error TSlines.Result: finished on the touched files with no further edits.
Result: 1 file passed, 55 tests passed (4.63s). Coverage includes the unconfigured fallback still using the Claude product slug, a built-in thread default (even alongside a custom model) staying on that slug, a custom thread default with options, an instance
customModelsentry, and a legacyproviders.claudeAgent.customModelsentry.Limitations: Linux only. The fallback choice is covered by settings tests; a live one-shot CLI spawn was not run.
Grok 4.7 via Cursor cloud agent.