Skip to content

Add new vercel ai anthropic models - #20745

Merged
Sameerlite merged 2 commits into
mainfrom
litellm_vercel_ai_models
Feb 9, 2026
Merged

Add new vercel ai anthropic models#20745
Sameerlite merged 2 commits into
mainfrom
litellm_vercel_ai_models

Conversation

@Sameerlite

Copy link
Copy Markdown
Contributor

Relevant issues

https://vercel.com/ai-gateway/models/claude-sonnet-4.5
Fixes #20743

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature

Changes

image

@vercel

vercel Bot commented Feb 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 9, 2026 11:39am

Request Review

@greptile-apps

greptile-apps Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

This PR extends the model registry/pricing metadata with a set of new vercel_ai_gateway/anthropic/* entries (pricing, context windows, and capability flags), updating both the primary model_prices_and_context_window.json and the backup copy.

The change plugs into LiteLLM’s existing model-lookup mechanism: downstream routing and feature enablement (vision/tools/schema/caching) depend on these JSON entries being keyed by the exact model identifiers and having accurate capability flags.

Confidence Score: 3/5

  • This PR is probably safe to merge after validating the new model identifiers and fixing the missing capability flag inconsistency.
  • The change is limited to model metadata, but correctness hinges on exact model-key naming and accurate capability flags. One new entry (claude-sonnet-4.5) is inconsistent with the others, and the new key naming differs from existing Vercel Anthropic entries in the same file, which can break model lookup/routing if the IDs are not exact.
  • model_prices_and_context_window.json

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds multiple Vercel AI Gateway Anthropic model entries with pricing/context. Notable inconsistency: claude-sonnet-4.5 lacks supports_response_schema, and new model key naming differs from existing claude-4-* Vercel Anthropic entries (verify IDs/aliases).
litellm/model_prices_and_context_window_backup.json Mirrors the same new Vercel AI Gateway Anthropic model entries as the primary pricing file; inherits the same concerns about missing supports_response_schema for claude-sonnet-4.5 and potential model-id naming mismatches vs existing Vercel Anthropic keys.

Sequence Diagram

sequenceDiagram
  participant App as LiteLLM runtime
  participant Prices as model_prices_and_context_window.json
  participant Provider as Vercel AI Gateway

  App->>Prices: Lookup config by model key
  Prices-->>App: Return pricing + feature flags
  App->>App: Enable/disable features based on flags
  App->>Provider: Send request using selected model ID
  Provider-->>App: Response
  App-->>App: Apply schema/vision/tools handling

  Note over Prices,App: If model key is wrong/unrecognized,
  Note over Prices,App: lookup/routing may fail or use fallback.
  Note over Prices,App: If supports_response_schema missing,
  Note over Prices,App: schema features may be disabled for that model.
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +28739 to +28742
"vercel_ai_gateway/anthropic/claude-sonnet-4.5": {
"cache_creation_input_token_cost": 3.75e-06,
"cache_read_input_token_cost": 3e-07,
"input_cost_per_token": 3e-06,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing response schema flag

vercel_ai_gateway/anthropic/claude-sonnet-4.5 omits "supports_response_schema": true even though the other newly-added vercel/anthropic models include it (and the PR description suggests these are Vercel AI Gateway Anthropic models with schema support). If LiteLLM uses this flag to gate JSON-schema / response-format features, this entry will behave inconsistently vs the rest. Add supports_response_schema here (or remove it from the others if it’s not actually supported).

Comment on lines +28606 to +28610
"vercel_ai_gateway/anthropic/claude-3-7-sonnet": {
"cache_creation_input_token_cost": 3.75e-06,
"cache_read_input_token_cost": 3e-07,
"input_cost_per_token": 3e-06,
"litellm_provider": "vercel_ai_gateway",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Possible bad model identifiers

These new keys use both claude-3-5-* / claude-3-7-* and claude-sonnet-4* naming, but the existing adjacent Vercel Anthropic entries use claude-4-opus / claude-4-sonnet (see vercel_ai_gateway/anthropic/claude-4-opus and .../claude-4-sonnet). If the runtime expects exact model IDs that match Vercel’s gateway (or has a normalization layer), these entries may be unreachable / silently misrouted. Please confirm these exact strings are valid model IDs in the gateway and align naming with the existing Vercel Anthropic conventions (or add aliases/normalization if required).

Also appears in: litellm/model_prices_and_context_window_backup.json:28606.

@Sameerlite
Sameerlite merged commit 3cf109e into main Feb 9, 2026
9 of 28 checks passed
@ishaan-berri
ishaan-berri deleted the litellm_vercel_ai_models branch March 26, 2026 22:30
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
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.

[Bug]: Claude Code not working with Vercel models due to "thinking" error

1 participant