Skip to content

Conversation

@Sg312
Copy link
Contributor

@Sg312 Sg312 commented Nov 25, 2025

Summary

Add claude opus 4.5 and remove context usage indicator

Type of Change

  • New feature

Testing

Manual

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
docs Skipped Skipped Nov 25, 2025 0:33am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 25, 2025

Greptile Overview

Greptile Summary

Added claude-4.5-opus model support across copilot system and commented out context usage indicator component.

Key Changes:

  • Added claude-4.5-opus to model validation schemas, type definitions, and UI options
  • Set claude-4.5-opus as enabled by default in user models configuration
  • Commented out (not removed) ContextUsageIndicator component and claude-4.1-opus references

Issues Found:

  • claude-4.1-opus remains in validation schemas and type definitions despite being commented out in UI and defaults, creating inconsistency
  • ContextUsageIndicator import not removed despite component being commented out
  • PR title says "remove" context usage indicator but code only comments it out

Confidence Score: 3/5

  • This PR has logical inconsistencies that should be resolved before merging
  • Score reflects inconsistent handling of claude-4.1-opus removal - it's commented out in some files but still present in validation schemas and type definitions, which will allow invalid model values to pass validation
  • Pay close attention to apps/sim/app/api/copilot/chat/route.ts, apps/sim/lib/copilot/api.ts, and apps/sim/stores/panel/copilot/types.ts - these files still contain claude-4.1-opus in their schemas/types which creates inconsistency with the UI and defaults

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/app/api/copilot/chat/route.ts 5/5 Added claude-4.5-opus to model enum validation in Zod schema
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx 4/5 Commented out ContextUsageIndicator component and its import (not removed)
apps/sim/lib/copilot/api.ts 5/5 Added claude-4.5-opus to SendMessageRequest model union type
apps/sim/stores/panel/copilot/types.ts 5/5 Added claude-4.5-opus to CopilotState selectedModel union type

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as User Input Component
    participant Store as Copilot Store
    participant API as /api/copilot/chat
    participant Agent as Sim Agent

    Note over User,Agent: Model Addition Flow
    
    User->>UI: Select claude-4.5-opus
    UI->>Store: setSelectedModel('claude-4.5-opus')
    Store->>Store: Update selectedModel state
    
    User->>UI: Send message
    UI->>Store: sendMessage(message, options)
    Store->>API: POST with model: 'claude-4.5-opus'
    
    Note over API: Validate against Zod schema<br/>(includes claude-4.5-opus)
    
    API->>Agent: Forward request with model
    Agent-->>API: Streaming response
    API-->>Store: Forward stream
    Store-->>UI: Update messages
    UI-->>User: Display response
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.

6 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

'claude-4.5-haiku',
'claude-4.5-sonnet',
'claude-4.5-opus',
'claude-4.1-opus',
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: claude-4.1-opus still present in validation schema but commented out elsewhere - should be removed here too for consistency

Suggested change
'claude-4.1-opus',
'claude-4.5-opus',
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/api/copilot/chat/route.ts
Line: 59:59

Comment:
**logic:** `claude-4.1-opus` still present in validation schema but commented out elsewhere - should be removed here too for consistency

```suggestion
      'claude-4.5-opus',
```

How can I resolve this? If you propose a fix, please make it concise.

AttachedFilesDisplay,
ContextPills,
ContextUsageIndicator,
MentionMenu,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: import for ContextUsageIndicator not removed but component is commented out - clean up unused import

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx
Line: 22:22

Comment:
**style:** import for `ContextUsageIndicator` not removed but component is commented out - clean up unused import

How can I resolve this? If you propose a fix, please make it concise.

| 'claude-4.5-haiku'
| 'claude-4.5-sonnet'
| 'claude-4.5-opus'
| 'claude-4.1-opus'
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: claude-4.1-opus still present in type definition but commented out elsewhere - remove for consistency

Suggested change
| 'claude-4.1-opus'
| 'claude-4.5-opus'
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/lib/copilot/api.ts
Line: 88:88

Comment:
**logic:** `claude-4.1-opus` still present in type definition but commented out elsewhere - remove for consistency

```suggestion
    | 'claude-4.5-opus'
```

How can I resolve this? If you propose a fix, please make it concise.

| 'claude-4.5-haiku'
| 'claude-4.5-sonnet'
| 'claude-4.5-opus'
| 'claude-4.1-opus'
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: claude-4.1-opus still present in type definition but commented out elsewhere - remove for consistency

Suggested change
| 'claude-4.1-opus'
| 'claude-4.5-opus'
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/stores/panel/copilot/types.ts
Line: 82:82

Comment:
**logic:** `claude-4.1-opus` still present in type definition but commented out elsewhere - remove for consistency

```suggestion
    | 'claude-4.5-opus'
```

How can I resolve this? If you propose a fix, please make it concise.

@Sg312 Sg312 merged commit d413bcd into staging Nov 25, 2025
9 checks passed
waleedlatif1 pushed a commit that referenced this pull request Nov 25, 2025
…#2113)

* Add claude opus 4.5 to copilot and remove context usage indicator

* Lint
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.

2 participants