fix: add missing capability flags to vercel_ai_gateway models - #20276
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 OverviewGreptile SummaryAdded capability flags ( Key changes:
Issue found:
Confidence Score: 4/5
|
| 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
| "max_output_tokens": 64000, | ||
| "max_tokens": 64000, | ||
| "mode": "chat", |
There was a problem hiding this 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
| "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.17c0a88
into
BerriAI:litellm_oss_staging_02_03_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>
Problem
67
vercel_ai_gateway/*models are missing capability flags. For example:vercel_ai_gateway/anthropic/claude-3.5-sonnethas zero capability flagsvercel_ai_gateway/openai/gpt-5has zero capability flagsvercel_ai_gateway/google/gemini-2.5-prohas zero capability flagsThis causes issues when:
litellm.supports_vision()or similar checksSolution
Added capability flags to 67 vercel_ai_gateway models by inferring from corresponding direct provider entries:
Capabilities Added
supports_visionsupports_function_callingsupports_tool_choicesupports_response_schemaMethodology
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