Skip to content

Conversation

@AnthonyRonning
Copy link
Contributor

@AnthonyRonning AnthonyRonning commented Dec 17, 2025

Summary

  • Removed DeepSeek v3.1 terminus from model configuration and selection logic
  • Updated "Reasoning" mode to always use DeepSeek R1
  • Temporarily disabled brain toggle UI (can be re-enabled later)
  • Removed v3.1 from marketing materials

Resolves #343

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Temporarily disabled the thinking (brain) toggle UI while improvements are made.
    • Adjusted available reasoning model selection to reflect current model availability.
    • Simplified model badge display to show fewer labels for the DeepSeek entry.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Walkthrough

Removed 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

Cohort / File(s) Summary
Model configuration
frontend/src/components/ModelSelector.tsx
Removed the deepseek-v31-terminus entry from MODEL_CONFIG and changed CATEGORY_MODELS.reasoning_off to "deepseek-r1-0528" with a comment that it represents R1 without the brain toggle.
Thinking toggle UI
frontend/src/components/UnifiedChat.tsx
Wrapped thinking/brain toggle rendering in a false condition (with eslint-ignore) at two locations, making the toggle UI unreachable while keeping event handlers and model-switching logic present.
Marketing badges
frontend/src/components/Marketing.tsx
Reduced the DeepSeek model badge labels from multiple labels to a single label; rendering structure unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check for any remaining references to deepseek-v31-terminus across the repo (tests, docs, analytics).
  • Verify CATEGORY_MODELS uses are consistent where reasoning_off is consumed.
  • Confirm the disabled toggle blocks intentionally use {false && ...} and eslint directives are acceptable.

Possibly related PRs

Poem

🐰 I hopped through code with gentle paws,

removed a terminus, paused the cause,
R1 now wanders, thinking shelved,
badges trimmed, the meadow delved,
a quiet toggle — we'll wake it soon.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—removing DeepSeek v3.1 terminus model from the codebase.
Linked Issues check ✅ Passed All coding requirements from issue #343 are met: v3.1 removed from model config, R1 mapped to reasoning_off, brain toggle disabled with lint-ignore, and v3.1 removed from marketing.
Out of Scope Changes check ✅ Passed All changes are directly related to removing v3.1 terminus and remapping reasoning mode; no out-of-scope modifications detected.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-343-20251217-1851

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13436d7 and 8314f00.

📒 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)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/src/components/UnifiedChat.tsx
  • frontend/src/components/ModelSelector.tsx
  • frontend/src/components/Marketing.tsx
⏰ 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-android
  • GitHub Check: build-ios
  • GitHub Check: build-macos (universal-apple-darwin)
  • GitHub Check: build-linux
  • GitHub Check: Cloudflare Pages

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 17, 2025

Greptile Summary

This PR successfully removes the DeepSeek V3.1 terminus model from the codebase. The model configuration has been deleted from MODEL_CONFIG, and the reasoning mode now always uses DeepSeek R1 for both thinking-enabled and thinking-disabled states. The brain toggle UI has been temporarily disabled using a false && condition to allow for easy re-enablement later. Marketing materials have been updated to remove V3.1 references.

Key Changes:

  • Removed deepseek-v31-terminus from model configuration
  • Updated CATEGORY_MODELS.reasoning_off to use deepseek-r1-0528 (R1) instead of V3.1
  • Disabled brain toggle button in two locations (desktop and mobile chat input)
  • Removed "DeepSeek V3.1 Terminus" from marketing badge labels
  • Added comments explaining the temporary nature of the brain toggle removal

Minor Issue:

  • A few outdated comments still reference V3.1 behavior and should be updated for clarity

Confidence Score: 4/5

  • This PR is safe to merge with minor documentation updates recommended
  • The implementation correctly removes the V3.1 model from all functional code (config, marketing, UI). The brain toggle is properly disabled using a lint-ignored false condition for easy re-enablement. The only issues are outdated comments that reference V3.1 behavior, which are non-critical style improvements. No logical errors or breaking changes detected.
  • All files are well-implemented. The comment updates in ModelSelector.tsx and LocalStateContext.tsx are minor style improvements.

Important Files Changed

Filename Overview
frontend/src/components/Marketing.tsx Removed "DeepSeek V3.1 Terminus" from marketing badge labels, now only shows "DeepSeek R1"
frontend/src/components/ModelSelector.tsx Removed deepseek-v31-terminus model config and updated reasoning_off to use R1, outdated comment references V3.1
frontend/src/components/UnifiedChat.tsx Disabled brain toggle button UI with false && condition in two locations (desktop and mobile chat input)

Sequence Diagram

sequenceDiagram
    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)
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. frontend/src/state/LocalStateContext.tsx, line 68 (link)

    syntax: outdated comment references V3.1 which has been removed

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link

@coderabbitai coderabbitai bot left a 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_on and reasoning_off now map to the same model ID "deepseek-r1-0528", which creates dead logic paths elsewhere in this file:

  1. 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
}
  1. 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:

  1. Dead code pattern: Using {false && ...} with an eslint-disable leaves unreachable code.
  2. Outdated comment: Line 2820 references V3.1 which is being removed.
  3. Logic inconsistency: Both reasoning_on and reasoning_off now 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9affc12 and 13436d7.

📒 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 using any type
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
Run just format, just lint, and just build after making TypeScript/React changes to ensure code quality and compilation

Files:

  • frontend/src/components/ModelSelector.tsx
  • frontend/src/components/Marketing.tsx
  • frontend/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.

Comment on lines +2528 to +2562
{/* 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>
)}
Copy link

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:

  1. 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.

  2. 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.

  3. Logic inconsistency: The condition checks for reasoning_on vs reasoning_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.

Suggested change
{/* 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.

@AnthonyRonning
Copy link
Contributor Author

@TestFlight build

@github-actions
Copy link
Contributor

🚀 TestFlight deployment triggered! Check the Actions tab for progress.

@github-actions
Copy link
Contributor

❌ 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>
@AnthonyRonning AnthonyRonning force-pushed the claude/issue-343-20251217-1851 branch from 13436d7 to 8314f00 Compare December 17, 2025 19:59
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 17, 2025

Deploying maple with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (2)

  1. 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!

  2. 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

Edit Code Review Agent Settings | Greptile

@AnthonyRonning
Copy link
Contributor Author

@TestFlight build

@github-actions
Copy link
Contributor

🚀 TestFlight deployment triggered! Check the Actions tab for progress.

@github-actions
Copy link
Contributor

✅ TestFlight deployment completed successfully!

@AnthonyRonning AnthonyRonning merged commit 827b17e into master Dec 17, 2025
8 checks passed
@AnthonyRonning AnthonyRonning deleted the claude/issue-343-20251217-1851 branch December 17, 2025 21:27
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.

Remove deepseek v3.1 terminus

2 participants