Skip to content

fix(server): use configured model for text-generation fallback - #12

Draft
macodev00 wants to merge 6 commits into
mainfrom
cursor/fix-text-gen-configured-model-ef69
Draft

macodev00 wants to merge 6 commits into
mainfrom
cursor/fix-text-gen-configured-model-ef69

Conversation

@macodev00

@macodev00 macodev00 commented Sep 20, 2026

Copy link
Copy Markdown
Owner

What Changed

When one-shot text generation (commit / PR / branch / title) has to fall back because the stored textGenerationModelSelection instance is unusable, it now uses the enabled instance's configured model:

  1. defaultModelSelection when it belongs to that instance
  2. The instance's customModels (including the legacy per-kind bucket)
  3. The existing cheap hardcoded slug only if nothing is configured

Why

With default settings, decode still materializes Codex + gpt-5.6-luna. If that instance is disabled, fallback previously rewrote the selection to claude-haiku-4-5 even when the Claude instance had a working custom / default model. Guardrailed backends that refuse Anthropic slugs then fail every commit/title spawn.

Fixes pingdotgg#12651

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
Open in Web Open in Cursor 

macodev00 and others added 6 commits September 20, 2026 09:29
When the default Codex text-generation selection is unusable, fall back
to the enabled instance's defaultModelSelection or custom model instead
of a hardcoded slug like claude-haiku-4-5.

Co-authored-by: maco <macodev00@users.noreply.github.com>
Use the same inline settings.json strings as the rest of the suite so
typecheck does not flag JSON.stringify or unbranded instance ids.

Co-authored-by: maco <macodev00@users.noreply.github.com>
CodeRabbit required 80% docstring coverage on functions in this diff.

Co-authored-by: maco <macodev00@users.noreply.github.com>
Extract the enabled-instance predicate so the last undocumented
callback in the docstring coverage set has a one-line TSDoc.

Co-authored-by: maco <macodev00@users.noreply.github.com>
runClaudeJson preferred non-empty stderr on CLI failure, so credential
wrapper notices hid stdout api_error_status and result. Prefer the
structured stdout API error when present.
HTTP status codes are finite, so decode api_error_status with
Schema.Finite instead of Schema.Number.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant