Skip to content

fix: add missing capability flags to vercel_ai_gateway models - #20276

Merged
1 commit merged into
BerriAI:litellm_oss_staging_02_03_2026from
krauckbot:fix-vercel-ai-gateway-capabilities
Feb 3, 2026
Merged

fix: add missing capability flags to vercel_ai_gateway models#20276
1 commit merged into
BerriAI:litellm_oss_staging_02_03_2026from
krauckbot:fix-vercel-ai-gateway-capabilities

Conversation

@krauckbot

Copy link
Copy Markdown
Contributor

Problem

67 vercel_ai_gateway/* models are missing capability flags. For example:

  • vercel_ai_gateway/anthropic/claude-3.5-sonnet has zero capability flags
  • vercel_ai_gateway/openai/gpt-5 has zero capability flags
  • vercel_ai_gateway/google/gemini-2.5-pro has zero capability flags

This causes issues when:

  1. Router tries to filter by capabilities (e.g., vision, function calling)
  2. Users rely on litellm.supports_vision() or similar checks
  3. Capability-based model selection fails to include Vercel AI Gateway models

Solution

Added capability flags to 67 vercel_ai_gateway models by inferring from corresponding direct provider entries:

Provider Models Fixed
Anthropic (Claude) 6
OpenAI (GPT) 15
Google (Gemini) 8
xAI (Grok) 6
Mistral 5
DeepSeek 4
Others 23

Capabilities Added

  • supports_vision
  • supports_function_calling
  • supports_tool_choice
  • supports_response_schema

Methodology

For each vercel_ai_gateway/provider/model, found the matching direct provider entry and copied its capability flags. This ensures Vercel AI Gateway models report the same capabilities as their underlying models.

Testing

  • JSON validation passes
  • No capabilities were removed, only added
  • All inferred capabilities match documented model features

67 vercel_ai_gateway models were missing capability flags (supports_vision,
supports_function_calling, supports_tool_choice, supports_response_schema).

These capabilities were inferred from the corresponding direct provider entries
for the same models (e.g., vercel_ai_gateway/anthropic/claude-3.5-sonnet now has
the same capabilities as anthropic/claude-3.5-sonnet).

Models fixed include:
- Claude 3/3.5/3.7 (Anthropic)
- GPT-4/5 variants (OpenAI)
- Gemini 2.0/2.5 (Google)
- Grok 3/4 (xAI)
- Mistral/Mixtral variants
- Qwen models
- DeepSeek models
- And more

This ensures consistent capability reporting across providers for the same
underlying models.
@vercel

vercel Bot commented Feb 2, 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 2, 2026 3:21pm

Request Review

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


krauckbot seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Overview

Greptile Summary

Added capability flags (supports_vision, supports_function_calling, supports_tool_choice, supports_response_schema) to 67 vercel_ai_gateway/* models by copying from their corresponding direct provider entries. This enables router capability filtering and fixes litellm.supports_vision() checks for Vercel AI Gateway models.

Key changes:

  • Anthropic Claude models: Added 4 capabilities to 5 models, 2 capabilities to 1 model
  • OpenAI models: Added capabilities to 15 models (GPT-4.x, o-series)
  • Google Gemini models: Added 4 capabilities to 8 models
  • xAI Grok models: Added capabilities to 6 models
  • Mistral models: Added capabilities to 11 models
  • DeepSeek models: Added capabilities to 4 models
  • Meta Llama models: Added capabilities to 10 models
  • Other providers: Added capabilities to remaining models

Issue found:

  • vercel_ai_gateway/anthropic/claude-4-sonnet is missing supports_vision and supports_response_schema that the base model has

Confidence Score: 4/5

  • Safe to merge after fixing the missing capabilities for claude-4-sonnet
  • The PR successfully adds capability flags to 67 models with correct inference from base models, but one model (claude-4-sonnet) is incomplete with 2 missing capability flags out of 4
  • model_prices_and_context_window.json:27973 - claude-4-sonnet needs supports_vision and supports_response_schema added

Important Files Changed

Filename Overview
model_prices_and_context_window.json Added 181 capability flags to 67 vercel_ai_gateway models, one model missing 2 capabilities

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Config as model_prices_and_context_window.json
    participant Router as LiteLLM Router
    participant Check as Capability Check

    Dev->>Config: Add capability flags to 67 vercel_ai_gateway models
    Note over Config: supports_vision<br/>supports_function_calling<br/>supports_tool_choice<br/>supports_response_schema
    
    Router->>Config: Filter models by capability (e.g., vision=true)
    Config-->>Router: Return matching models (now includes vercel_ai_gateway)
    
    Check->>Config: litellm.supports_vision("vercel_ai_gateway/openai/gpt-4o")
    Config-->>Check: true (previously would be false/undefined)
    
    Note over Router,Check: Enables capability-based model selection<br/>for Vercel AI Gateway models
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.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment on lines 27973 to 27975
"max_output_tokens": 64000,
"max_tokens": 64000,
"mode": "chat",

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 supports_vision and supports_response_schema - the base claude-4-sonnet-20250514 model has all four capabilities (vision, function_calling, tool_choice, response_schema), but only two were added here

Suggested change
"max_output_tokens": 64000,
"max_tokens": 64000,
"mode": "chat",
"output_cost_per_token": 1.5e-05,
"supports_vision": true,
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_response_schema": true
Prompt To Fix With AI
This is a comment left during a code review.
Path: model_prices_and_context_window.json
Line: 27973:27975

Comment:
missing `supports_vision` and `supports_response_schema` - the base `claude-4-sonnet-20250514` model has all four capabilities (vision, function_calling, tool_choice, response_schema), but only two were added here

```suggestion
        "output_cost_per_token": 1.5e-05,
        "supports_vision": true,
        "supports_function_calling": true,
        "supports_tool_choice": true,
        "supports_response_schema": true
```

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

@ghost
ghost changed the base branch from main to litellm_oss_staging_02_03_2026 February 3, 2026 06:07
@ghost
ghost merged commit 17c0a88 into BerriAI:litellm_oss_staging_02_03_2026 Feb 3, 2026
5 of 8 checks passed
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…I#20276)

67 vercel_ai_gateway models were missing capability flags (supports_vision,
supports_function_calling, supports_tool_choice, supports_response_schema).

These capabilities were inferred from the corresponding direct provider entries
for the same models (e.g., vercel_ai_gateway/anthropic/claude-3.5-sonnet now has
the same capabilities as anthropic/claude-3.5-sonnet).

Models fixed include:
- Claude 3/3.5/3.7 (Anthropic)
- GPT-4/5 variants (OpenAI)
- Gemini 2.0/2.5 (Google)
- Grok 3/4 (xAI)
- Mistral/Mixtral variants
- Qwen models
- DeepSeek models
- And more

This ensures consistent capability reporting across providers for the same
underlying models.

Co-authored-by: krauckbot <krauckbot123@gmail.com>
This pull request was closed.
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