Skip to content

fix: personality LLM now respects the selected refinement model#712

Open
aajinn wants to merge 1 commit into
jamiepine:mainfrom
aajinn:fix/llm-model-choice-respected
Open

fix: personality LLM now respects the selected refinement model#712
aajinn wants to merge 1 commit into
jamiepine:mainfrom
aajinn:fix/llm-model-choice-respected

Conversation

@aajinn
Copy link
Copy Markdown

@aajinn aajinn commented May 26, 2026

Bug: Personality LLM (Speak in character / Compose) always loaded Qwen3 0.6B regardless of the user's refinement model selection

  • Root cause: rewrite_as_profile and compose_as_profile were called without model_size, so they fell back to backend.model_size (default "0.6B")
  • Fix: Both call sites now read saved.llm_model from capture_settings via settings_service.get_capture_settings(db) and pass it as model_size
  • Reference the issue [Bug] Refinement model selection ignores user choice, always loads Qwen3 0.6B instead of selected 1.7B/4B

Summary by CodeRabbit

  • Bug Fixes
    • Fixed personality-based features to respect your selected LLM model configuration. The "Speak in character" rewrite and Compose action now use your chosen model instead of defaulting to a fixed option, ensuring consistent refinement model usage across all features.

Review Change Stack

The 'Speak in character' rewrite (POST /generate with personality=true)
and Compose (POST /profiles/{id}/compose) both bypassed the user's
llm_model selection from capture_settings, always loading Qwen3 0.6B
instead of the chosen 1.7B/4B model.

Both routes now read saved.llm_model from capture_settings and pass it
as model_size to the personality service functions.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9cb110d3-838c-47c1-8a51-fa82b2236868

📥 Commits

Reviewing files that changed from the base of the PR and between b35b909 and 34153e7.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • backend/routes/generations.py
  • backend/routes/profiles.py

📝 Walkthrough

Walkthrough

This PR wires personality-driven features to respect the user-configured LLM model setting. The /generate rewrite and /compose endpoints now fetch capture settings from the database and pass the selected model size to personality functions, replacing implicit defaults.

Changes

Personality LLM Model Configuration

Layer / File(s) Summary
Personality rewrite respects configured LLM model
backend/routes/generations.py
Imports settings_service and modifies the personality rewrite path in /generate to fetch capture settings and pass model_size=saved.llm_model to personality.rewrite_as_profile.
Personality compose respects configured LLM model
backend/routes/profiles.py
Imports settings_service and modifies the compose path in /profiles/{profile_id}/compose to fetch capture settings and pass model_size=saved.llm_model to personality.compose_as_profile.
Changelog documentation
CHANGELOG.md
Documents that personality LLM now respects the selected refinement model in Unreleased → Bug Fixes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit refines the character's voice,
Now honoring the model of choice,
No hardcoded defaults in sight,
Settings-aware, the rewrite runs right,
Personality speaks with precision tonight! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and accurately summarizes the main change: the personality LLM now respects the selected refinement model instead of always using a default.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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.

1 participant