Skip to content

improvement(providers): audit and update all provider model definitions#3893

Merged
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/update-provider-models
Apr 2, 2026
Merged

improvement(providers): audit and update all provider model definitions#3893
waleedlatif1 merged 3 commits intostagingfrom
waleedlatif1/update-provider-models

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Added missing models: gpt-5.2-pro, gpt-5-pro, o3-mini, o3-pro, claude-sonnet-4-6, gemini-3.1-flash-lite-preview, deepseek-reasoner, grok-4.20 models, mistral-small-2603, devstral-2512, devstral-latest
  • Fixed Anthropic context windows and max output tokens verified against live API
  • Fixed OpenAI gpt-4.1 family context (1047576) and max output tokens (32768)
  • Updated DeepSeek, xAI, Mistral pricing to match official docs
  • Fixed Cerebras context windows to exact values
  • Removed shut down/deprecated models (gemini-3-pro-preview, 5 Groq models, 2 Cerebras models, 2 retired Mistral models)
  • Extended adaptive thinking support to Sonnet 4.6 and Opus 4.5
  • Updated all updatedAt dates to 2026-04-01

Type of Change

  • Enhancement (non-breaking change that improves existing functionality)

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
Copy Markdown

vercel bot commented Apr 2, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 2, 2026 2:14am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Medium risk because it changes the provider model catalog (added/removed models) and updates token limits/pricing used for request sizing and cost calculation, plus adjusts Anthropic thinking-mode selection for Sonnet 4.6 vs other Claude variants.

Overview
Updates the provider model registry across OpenAI/Azure, Anthropic, Google/Vertex, DeepSeek, xAI, Cerebras, Groq, Mistral, and Bedrock: adds new model IDs, removes deprecated entries, and refreshes most pricing.updatedAt values.

Corrects several model capability fields that drive runtime behavior—especially contextWindow and maxOutputTokens (notably OpenAI gpt-4.1* and multiple Claude models), plus assorted pricing/cached-input adjustments.

Refines Anthropic extended-thinking configuration so thinking.type: "adaptive" is only used for claude-opus-4-6 and claude-sonnet-4-6 (others use budget_tokens), and updates provider utils tests to match the new model set and revised token limits.

Written by Cursor Bugbot for commit c518c6f. Configure here.

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/update-provider-models branch from 34fe9e1 to b517f80 Compare April 2, 2026 01:44
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/update-provider-models branch from b517f80 to 9e91504 Compare April 2, 2026 01:47
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/update-provider-models branch from 9e91504 to 25875dd Compare April 2, 2026 01:52
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR performs a broad audit and update of all provider model definitions across OpenAI, Anthropic, Google Gemini/Vertex, DeepSeek, xAI, Groq, Cerebras, and Mistral. It adds ~15 new models, removes deprecated/shut-down models, corrects context windows and max-output-token limits against live API responses, and updates all updatedAt timestamps to 2026-04-01.

Key changes:

  • Anthropic: Added claude-sonnet-4-6 with 1M context and 128K max output; extended adaptive thinking (type: "adaptive") to cover both Opus 4.6 and Sonnet 4.6; corrected claude-opus-4-1/claude-opus-4-0 max output from 64 K → 32 K; fixed context windows from 200 K → 1 M for several Sonnet/Opus 4.x models
  • OpenAI: Added gpt-5.2-pro, gpt-5-pro, o3-mini, o3-pro; corrected gpt-4.1 family context from 1 M → 1,047,576 and added 32 K max-output cap
  • Google: Replaced deprecated gemini-3-pro-preview with gemini-3.1-flash-lite-preview (both direct and Vertex); added minimal thinking level across Gemini 3 models; added cached-input pricing for gemini-2.0-flash
  • DeepSeek: Updated pricing for all three models; added deepseek-reasoner — however its pricing matches the V3 chat model ($0.28/$0.028/$0.42) rather than the R1 reasoning model ($0.55/$0.14/$2.19), which may misrepresent costs
  • xAI: Added three grok-4.20-0309 variants with 2M context; corrected cached-input pricing for several Grok 3/4 models
  • Groq: Removed five deprecated models
  • Cerebras: Removed two deprecated models; corrected context windows from approximate (131 000) to exact (131 072) values
  • Mistral: Added mistral-small-2603, devstral-2512, devstral-latest; removed two retired models; updated pricing for mistral-small-latest and corrected codestral-latest context from 256 K → 128 K

Confidence Score: 4/5

  • Safe to merge after verifying deepseek-reasoner pricing; one P1 data inconsistency and one P2 test gap remain.
  • The adaptive-thinking fix from the previous thread is correctly addressed. The bulk of the changes (date updates, context window corrections, model additions/removals) are routine and well-structured. The one P1 concern is that deepseek-reasoner is assigned V3 chat pricing instead of R1 reasoning pricing, which would silently under-report costs for any user calling that model ID. The P2 gap is a missing test assertion for claude-sonnet-4-6 thinking support. Neither issue causes a crash or security problem, but the pricing inaccuracy is a real data correctness defect on the changed path.
  • apps/sim/providers/models.ts — verify deepseek-reasoner pricing against official DeepSeek API docs

Important Files Changed

Filename Overview
apps/sim/providers/models.ts Large-scale model registry update: new models added (gpt-5.2-pro, gpt-5-pro, o3-mini, o3-pro, claude-sonnet-4-6, gemini-3.1-flash-lite-preview, deepseek-reasoner, grok-4.20 variants, Mistral additions), deprecated models removed, pricing/context/max-output-token corrections applied across all providers. One pricing inconsistency found: deepseek-reasoner uses V3 chat pricing instead of R1 pricing.
apps/sim/providers/anthropic/core.ts Extended supportsAdaptiveThinking() to match sonnet-4-6 strings alongside existing opus-4-6 patterns; comment updated to document which models support adaptive vs budget-tokens thinking. Clean, well-commented change.
apps/sim/providers/utils.test.ts Test suite updated to remove gemini-3-pro-preview assertions, add gpt-5.2-pro/gpt-5-pro reasoning-effort assertions, update claude-opus-4-1 max-output expectation from 64000 to 32000; missing assertion for new claude-sonnet-4-6 thinking support.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[API call with modelId] --> B{supportsAdaptiveThinking?}
    B -- opus-4-6 or sonnet-4-6 --> C[thinking type adaptive\nplus output_config]
    B -- other thinking model --> D[thinking type enabled\nplus budget_tokens]
    B -- non-thinking model --> E[No thinking config]
    C --> F[Anthropic API]
    D --> F
    E --> F

    subgraph "Notable new models in PR"
        H[claude-sonnet-4-6\nadaptive thinking]
        I[deepseek-reasoner\npricing needs verify]
        J[gpt-5.2-pro and gpt-5-pro\nreasoning effort only]
        K[o3-mini and o3-pro]
        L[gemini-3.1-flash-lite-preview\nreplaces gemini-3-pro-preview]
    end
Loading

Reviews (3): Last reviewed commit: "fix(providers): move maxOutputTokens ins..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/update-provider-models branch from 25875dd to 76e077d Compare April 2, 2026 01:55
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 4c94f3c into staging Apr 2, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/update-provider-models branch April 2, 2026 02:32
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.

1 participant