Skip to content

fix: disable thinking mode for LLM language detection#13565

Merged
EurFelux merged 1 commit intomainfrom
fix/disable-lang-detect-reasoning
Mar 18, 2026
Merged

fix: disable thinking mode for LLM language detection#13565
EurFelux merged 1 commit intomainfrom
fix/disable-lang-detect-reasoning

Conversation

@EurFelux
Copy link
Copy Markdown
Collaborator

What this PR does

Before this PR:
Language detection via LLM used getQuickModel() || getDefaultModel() without validating model availability, and did not disable thinking/reasoning mode. This caused issues when most modern models default to thinking mode, making model selection difficult for language detection.

After this PR:

  • Only uses the quick model (falls back to error if unavailable) and validates it exists via hasModel()
  • Sets reasoning_effort: 'none' to explicitly disable thinking mode for language detection
  • Removes unused getDefaultModel import

Fixes #13562

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Removed the getDefaultModel() fallback — language detection should only use the explicitly configured quick model, not silently fall back to the default model which may be slow/expensive.

The following alternatives were considered:

  • Passing thinking mode parameters at the API level — rejected because reasoning_effort: 'none' in assistant settings is the existing pattern used elsewhere in the codebase.

Breaking changes

None.

Special notes for your reviewer

Small, focused fix. Only modifies src/renderer/src/utils/translate.ts.

Checklist

Release note

fix: Disable thinking/reasoning mode for LLM-based language detection to improve compatibility with modern models that default to thinking mode

- Validate model exists before using it for language detection
- Set reasoning_effort to 'none' for language detection to improve
  performance
- Remove unused import of getDefaultModel
@EurFelux EurFelux merged commit 5602d82 into main Mar 18, 2026
9 checks passed
@EurFelux EurFelux deleted the fix/disable-lang-detect-reasoning branch March 18, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Fast models should disable thinking mode by default

3 participants