-
Notifications
You must be signed in to change notification settings - Fork 5
Remove DeepSeek v3.1 terminus model #344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughRemoved the "deepseek-v31-terminus" model, updated reasoning_off to use "deepseek-r1-0528", disabled the thinking (brain) toggle UI by hiding its render, and reduced DeepSeek badge labels in marketing. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
Comment |
Greptile SummaryThis PR successfully removes the DeepSeek V3.1 terminus model from the codebase. The model configuration has been deleted from Key Changes:
Minor Issue:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UnifiedChat
participant ModelSelector
participant LocalState
participant Marketing
Note over User,Marketing: DeepSeek V3.1 Terminus Removal Flow
User->>UnifiedChat: Selects Reasoning model
UnifiedChat->>ModelSelector: Trigger model selector
Note over ModelSelector: reasoning_off = deepseek-r1-0528<br/>(previously deepseek-v31-terminus)
ModelSelector->>LocalState: setModel(deepseek-r1-0528)
LocalState-->>UnifiedChat: Model updated
Note over UnifiedChat: Brain toggle button hidden<br/>(false && condition)
UnifiedChat-->>User: R1 model active (thinking disabled)
User->>Marketing: Views marketing page
Marketing-->>User: Shows "DeepSeek R1" badge<br/>(V3.1 label removed)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
frontend/src/state/LocalStateContext.tsx, line 68 (link)syntax: outdated comment references V3.1 which has been removed
3 files reviewed, 1 comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/components/ModelSelector.tsx (1)
106-113: Clean up logic that distinguishes between identical reasoning model mappings.Both
reasoning_onandreasoning_offnow map to the same model ID"deepseek-r1-0528", which creates dead logic paths elsewhere in this file:
- Lines 241-247: The conditional logic trying to sync the thinking toggle will never distinguish between the two since they're identical:
if (model === CATEGORY_MODELS.reasoning_on) { setThinkingEnabled(true); } else if (model === CATEGORY_MODELS.reasoning_off) { setThinkingEnabled(false); // Never reached if reasoning_on === reasoning_off }
- Line 312: The ternary expression picks between two identical values:
targetModel = thinkingEnabled ? CATEGORY_MODELS.reasoning_on : CATEGORY_MODELS.reasoning_off; // Both branches return "deepseek-r1-0528"Since the brain toggle is temporarily disabled and both reasoning modes use the same model, consider simplifying:
export const CATEGORY_MODELS = { free: "llama-3.3-70b", quick: "gpt-oss-120b", - reasoning_on: "deepseek-r1-0528", // R1 with thinking - reasoning_off: "deepseek-r1-0528", // R1 without thinking (brain toggle temporarily disabled) + reasoning: "deepseek-r1-0528", // DeepSeek R1 (thinking toggle temporarily disabled) math: "qwen3-coder-480b", image: "qwen3-vl-30b" };And update the logic at line 312:
- if (category === "reasoning") { - // Use thinking state to pick R1 vs V3.1 - targetModel = thinkingEnabled ? CATEGORY_MODELS.reasoning_on : CATEGORY_MODELS.reasoning_off; - } else if (category === "image") { + if (category === "reasoning") { + targetModel = CATEGORY_MODELS.reasoning; + } else if (category === "image") {And remove the dead sync logic at lines 241-247.
♻️ Duplicate comments (1)
frontend/src/components/UnifiedChat.tsx (1)
2807-2841: Update the temporary disabling approach and outdated comments (duplicate block).This is a duplicate of the thinking toggle logic from lines 2528-2562 with the same issues:
- Dead code pattern: Using
{false && ...}with an eslint-disable leaves unreachable code.- Outdated comment: Line 2820 references V3.1 which is being removed.
- Logic inconsistency: Both
reasoning_onandreasoning_offnow map to the same model ID, so the toggle won't actually switch models.Apply the same refactoring approach as suggested for lines 2528-2562. Consider extracting this into a shared component or function to avoid the duplication.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
frontend/src/components/Marketing.tsx(1 hunks)frontend/src/components/ModelSelector.tsx(1 hunks)frontend/src/components/UnifiedChat.tsx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Use path aliases (@/*maps to./src/*) for imports in TypeScript/React files
Use 2-space indentation, double quotes, and enforce 100-character line limit in TypeScript/React code
Maintain strict TypeScript and avoid usinganytype
Use PascalCase for component names and camelCase for variables and function names
Use functional components with React hooks instead of class components
Use React context for global state management and TanStack Query for server state management
Runjust format,just lint, andjust buildafter making TypeScript/React changes to ensure code quality and compilation
Files:
frontend/src/components/ModelSelector.tsxfrontend/src/components/Marketing.tsxfrontend/src/components/UnifiedChat.tsx
🧬 Code graph analysis (1)
frontend/src/components/UnifiedChat.tsx (1)
frontend/src/components/ModelSelector.tsx (1)
CATEGORY_MODELS(106-113)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Greptile Review
- GitHub Check: build-ios
- GitHub Check: build-macos (universal-apple-darwin)
- GitHub Check: build-linux
- GitHub Check: build-android
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
frontend/src/components/Marketing.tsx (1)
28-28: LGTM! DeepSeek v3.1 successfully removed from marketing.The reduction from two labels to a single "DeepSeek R1" label correctly removes v3.1 from the marketing materials as intended by the PR objectives.
| {/* Thinking toggle button - temporarily disabled while we remove V3.1 */} | ||
| {/* eslint-disable-next-line no-constant-binary-expression */} | ||
| {false && | ||
| (localState.model === CATEGORY_MODELS.reasoning_on || | ||
| localState.model === CATEGORY_MODELS.reasoning_off) && ( | ||
| <Button | ||
| type="button" | ||
| variant="ghost" | ||
| size="sm" | ||
| className="h-8 w-8 p-0" | ||
| onClick={() => { | ||
| const newThinkingEnabled = !localState.thinkingEnabled; | ||
| localState.setThinkingEnabled(newThinkingEnabled); | ||
| // Switch between R1 (with thinking) and V3.1 (without) | ||
| localState.setModel( | ||
| newThinkingEnabled | ||
| ? CATEGORY_MODELS.reasoning_on | ||
| : CATEGORY_MODELS.reasoning_off | ||
| ); | ||
| }} | ||
| aria-label={ | ||
| localState.thinkingEnabled | ||
| ? "text-purple-500" | ||
| : "text-muted-foreground" | ||
| }`} | ||
| /> | ||
| </Button> | ||
| )} | ||
| ? "Disable thinking mode" | ||
| : "Enable thinking mode" | ||
| } | ||
| > | ||
| <Brain | ||
| className={`h-4 w-4 ${ | ||
| localState.thinkingEnabled | ||
| ? "text-purple-500" | ||
| : "text-muted-foreground" | ||
| }`} | ||
| /> | ||
| </Button> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Update the temporary disabling approach and outdated comments.
The current approach has several issues:
-
Dead code pattern: Using
{false && ...}with an eslint-disable leaves unreachable code in the codebase. Consider either removing the entire block or using a feature flag/constant at the module level for cleaner temporary disabling. -
Outdated comment: Line 2541 references "Switch between R1 (with thinking) and V3.1 (without)" but V3.1 is being removed in this PR. The comment should be updated or removed.
-
Logic inconsistency: The condition checks for
reasoning_onvsreasoning_off, but per the ModelSelector changes, both now map to the same model ID"deepseek-r1-0528". This means the toggle logic (lines 2543-2546) will always set the same model regardless of the thinking state.
Consider one of these approaches:
Option 1: Complete removal (if truly temporary)
- {/* Thinking toggle button - temporarily disabled while we remove V3.1 */}
- {/* eslint-disable-next-line no-constant-binary-expression */}
- {false &&
- (localState.model === CATEGORY_MODELS.reasoning_on ||
- localState.model === CATEGORY_MODELS.reasoning_off) && (
- <Button
- type="button"
- variant="ghost"
- size="sm"
- className="h-8 w-8 p-0"
- onClick={() => {
- const newThinkingEnabled = !localState.thinkingEnabled;
- localState.setThinkingEnabled(newThinkingEnabled);
- // Switch between R1 (with thinking) and V3.1 (without)
- localState.setModel(
- newThinkingEnabled
- ? CATEGORY_MODELS.reasoning_on
- : CATEGORY_MODELS.reasoning_off
- );
- }}
- aria-label={
- localState.thinkingEnabled
- ? "Disable thinking mode"
- : "Enable thinking mode"
- }
- >
- <Brain
- className={`h-4 w-4 ${
- localState.thinkingEnabled
- ? "text-purple-500"
- : "text-muted-foreground"
- }`}
- />
- </Button>
- )}Option 2: Feature flag (if planning to re-enable)
+const ENABLE_THINKING_TOGGLE = false; // TODO: Re-enable after alternative model is added
+
...
- {/* Thinking toggle button - temporarily disabled while we remove V3.1 */}
- {/* eslint-disable-next-line no-constant-binary-expression */}
- {false &&
+ {ENABLE_THINKING_TOGGLE &&
(localState.model === CATEGORY_MODELS.reasoning_on ||
localState.model === CATEGORY_MODELS.reasoning_off) && (
<Button
...
- // Switch between R1 (with thinking) and V3.1 (without)
+ // Toggle thinking mode for reasoning models
localState.setModel(📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {/* Thinking toggle button - temporarily disabled while we remove V3.1 */} | |
| {/* eslint-disable-next-line no-constant-binary-expression */} | |
| {false && | |
| (localState.model === CATEGORY_MODELS.reasoning_on || | |
| localState.model === CATEGORY_MODELS.reasoning_off) && ( | |
| <Button | |
| type="button" | |
| variant="ghost" | |
| size="sm" | |
| className="h-8 w-8 p-0" | |
| onClick={() => { | |
| const newThinkingEnabled = !localState.thinkingEnabled; | |
| localState.setThinkingEnabled(newThinkingEnabled); | |
| // Switch between R1 (with thinking) and V3.1 (without) | |
| localState.setModel( | |
| newThinkingEnabled | |
| ? CATEGORY_MODELS.reasoning_on | |
| : CATEGORY_MODELS.reasoning_off | |
| ); | |
| }} | |
| aria-label={ | |
| localState.thinkingEnabled | |
| ? "text-purple-500" | |
| : "text-muted-foreground" | |
| }`} | |
| /> | |
| </Button> | |
| )} | |
| ? "Disable thinking mode" | |
| : "Enable thinking mode" | |
| } | |
| > | |
| <Brain | |
| className={`h-4 w-4 ${ | |
| localState.thinkingEnabled | |
| ? "text-purple-500" | |
| : "text-muted-foreground" | |
| }`} | |
| /> | |
| </Button> | |
| )} | |
| {/* Additional UI elements can go here */} |
🤖 Prompt for AI Agents
In frontend/src/components/UnifiedChat.tsx around lines 2528 to 2562, the
thinking-toggle block is left unreachable via `{false && ...}`, contains an
outdated comment about V3.1, and the toggle logic compares/sets model constants
that now map to the same ID so the switch is meaningless; either remove the
entire block (preferred if feature truly removed) or replace the `{false &&
...}` with a module-level feature flag constant (e.g. ENABLE_THINKING_TOGGLE)
and use that to conditionally render; if keeping the toggle, update/replace the
outdated comment and correct the toggle logic so it sets distinct model IDs for
thinking on vs off (or consult the updated CATEGORY_MODELS to use the correct
model constants), and remove the eslint-disable since the unreachable-code
pattern will be gone.
|
@TestFlight build |
|
🚀 TestFlight deployment triggered! Check the Actions tab for progress. |
|
❌ TestFlight deployment failed. Check the workflow logs for details. |
- Remove deepseek-v31-terminus from MODEL_CONFIG - Update reasoning_off category to use R1 instead of v3.1 - Temporarily disable brain toggle (will be re-enabled later) - Remove v3.1 from marketing page AI models list - Keep DeepSeek R1 model active and available Resolves #343 Co-authored-by: Anthony <AnthonyRonning@users.noreply.github.com>
13436d7 to
8314f00
Compare
Deploying maple with
|
| Latest commit: |
8314f00
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ad73a0c2.maple-ca8.pages.dev |
| Branch Preview URL: | https://claude-issue-343-20251217-18.maple-ca8.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (2)
-
frontend/src/state/LocalStateContext.tsx, line 68 (link)style: Update comment to reflect V3.1 removal
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
frontend/src/components/ModelSelector.tsx, line 311 (link)style: Update comment to reflect V3.1 removal (brain toggle is temporarily disabled, so this logic isn't currently used)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
3 files reviewed, 2 comments
|
@TestFlight build |
|
🚀 TestFlight deployment triggered! Check the Actions tab for progress. |
|
✅ TestFlight deployment completed successfully! |
Summary
Resolves #343
Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.