Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • added xai models and updated gemini pricing

Type of Change

  • New feature

Testing

Tested manually

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 Dec 2, 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 Dec 2, 2025 10:31pm

@waleedlatif1 waleedlatif1 merged commit bf54c88 into staging Dec 2, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/models branch December 2, 2025 22:31
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 2, 2025

Greptile Overview

Greptile Summary

Updated Google Gemini 2.5 model pricing to reflect significant increases (Pro input: 0.15→1.25, Flash input: 0.15→0.3), added new gemini-2.5-flash-lite model, and expanded xAI Grok models with 4 new variants (grok-4-0709, grok-4-1-fast-reasoning, grok-4-1-fast-non-reasoning) plus updated cached input pricing for grok-4-latest.

Major changes:

  • Gemini 2.5 Pro pricing increased substantially (8.3x input, 16.7x output)
  • Added gemini-2.5-flash-lite with lower pricing (input: 0.1, output: 0.4)
  • Added 4 new xAI Grok model variants with 2M context window for fast models
  • Updated grok-4-latest cached input pricing from 1.5 to 0.75

Critical issues found:

  • grok-4-fast-reasoning and grok-4-fast-non-reasoning models have cachedInput (0.25) priced higher than input (0.2), which is illogical as cached input should cost less

Confidence Score: 2/5

  • This PR contains logical errors in pricing configuration that will cause incorrect cost calculations
  • The PR has critical pricing logic errors where cachedInput costs more than input for two models (grok-4-fast-reasoning and grok-4-fast-non-reasoning). This contradicts the fundamental principle that cached input should be cheaper than regular input. The Gemini pricing updates and new model additions appear correct, but the xAI cached pricing errors need to be fixed before merging.
  • apps/sim/providers/models.ts:839-840 and apps/sim/providers/models.ts:852-853 need immediate correction for cachedInput pricing

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/providers/models.ts 2/5 Updated Gemini 2.5 pricing, added gemini-2.5-flash-lite and 4 new xAI Grok models. Critical issue: cachedInput pricing is higher than input for grok-4-fast-reasoning and grok-4-fast-non-reasoning.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Models as models.ts
    participant App as Application
    
    Dev->>Models: Update Gemini 2.5 Pro pricing<br/>(input: 0.15→1.25, output: 0.6→10.0)
    Dev->>Models: Update Gemini 2.5 Flash pricing<br/>(input: 0.15→0.3, output: 0.6→2.5)
    Dev->>Models: Add Gemini 2.5 Flash Lite<br/>(input: 0.1, output: 0.4)
    Dev->>Models: Update Grok 4 Latest cached pricing<br/>(cachedInput: 1.5→0.75)
    Dev->>Models: Add Grok 4-0709 model
    Dev->>Models: Add Grok 4-1 Fast models<br/>(reasoning & non-reasoning)
    
    Note over Models: ⚠️ Issue: grok-4-fast-* models<br/>have cachedInput (0.25) > input (0.2)
    
    App->>Models: Request model pricing info
    Models-->>App: Return pricing (with incorrect cached values)
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 (2)

  1. apps/sim/providers/models.ts, line 839-840 (link)

    logic: cachedInput should be lower than input (0.05, not 0.25)

  2. apps/sim/providers/models.ts, line 852-853 (link)

    logic: cachedInput should be lower than input (0.05, not 0.25)

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

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