fix: default Gradio model to acestep-v15-xl-turbo#1009
Conversation
The default model selection now prefers acestep-v15-xl-turbo when available, falling back to acestep-v15-turbo, then the first available model. Fixes #1008 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughTwo files updated to change default model selection logic in the Gradio UI. The logic now prioritizes Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
acestep/ui/gradio/interfaces/generation_defaults.py (1)
120-127: Consider extracting the default-model selection logic into a shared helper.This exact 7-line block is duplicated in
build_model_device_controls(lines 110–117 ingeneration_service_config_rows.py). Extracting it to a small helper reduces the risk of future divergence.♻️ Example helper in a shared module
def get_preferred_default_model(available_models: list[str]) -> str | None: """Return the preferred default model from the available list. Preference order: acestep-v15-xl-turbo → acestep-v15-turbo → first available. """ for preferred in ("acestep-v15-xl-turbo", "acestep-v15-turbo"): if preferred in available_models: return preferred return available_models[0] if available_models else NoneBoth call sites would then become:
default_model = get_preferred_default_model(available_models)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@acestep/ui/gradio/interfaces/generation_defaults.py` around lines 120 - 127, Extract the duplicated default-model selection logic into a small shared helper (e.g., get_preferred_default_model) and replace the inline 7-line selection in generation_defaults.py (the block that assigns default_model) and the identical block in build_model_device_controls in generation_service_config_rows.py with a call to that helper; ensure the helper accepts available_models: list[str] and returns the preferred model (acestep-v15-xl-turbo → acestep-v15-turbo → first available or None) so both sites simply do: default_model = get_preferred_default_model(available_models).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@acestep/ui/gradio/interfaces/generation_defaults.py`:
- Around line 120-127: Extract the duplicated default-model selection logic into
a small shared helper (e.g., get_preferred_default_model) and replace the inline
7-line selection in generation_defaults.py (the block that assigns
default_model) and the identical block in build_model_device_controls in
generation_service_config_rows.py with a call to that helper; ensure the helper
accepts available_models: list[str] and returns the preferred model
(acestep-v15-xl-turbo → acestep-v15-turbo → first available or None) so both
sites simply do: default_model = get_preferred_default_model(available_models).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0e9c8a86-b05e-48f2-9775-713a6aa35ae5
📒 Files selected for processing (2)
acestep/ui/gradio/interfaces/generation_defaults.pyacestep/ui/gradio/interfaces/generation_service_config_rows.py
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Summary
acestep-v15-xl-turbooveracestep-v15-turbogeneration_service_config_rows.pyandgeneration_defaults.pyFixes #1008
Test plan
acestep-v15-turboSummary by CodeRabbit