Skip to content

feat: Add Vercel AI Gateway as a Provider#768

Open
tarai-dl wants to merge 1 commit intoMerit-Systems:masterfrom
tarai-dl:rn/vercel-ai-gateway
Open

feat: Add Vercel AI Gateway as a Provider#768
tarai-dl wants to merge 1 commit intoMerit-Systems:masterfrom
tarai-dl:rn/vercel-ai-gateway

Conversation

@tarai-dl
Copy link
Copy Markdown

Summary

This PR adds support for the Vercel AI Gateway as a provider in the Echo platform.

Changes

  • Added VercelAIGatewayProvider class extending BaseProvider
  • Added VERCEL_AI_GATEWAY to ProviderType enum
  • Added Vercel AI Gateway model definitions with pricing for:
    • OpenAI models (gpt-4o, gpt-4o-mini, gpt-4-turbo, etc.)
    • Anthropic models (claude-3-opus, claude-3-sonnet, claude-3-haiku, claude-3-5-sonnet)
    • Google models (gemini-1.5-pro, gemini-1.5-flash, gemini-1.0-pro)
    • Mistral models (mistral-large, mistral-medium, mistral-small)
    • Meta Llama models (llama-3.1-405b, llama-3.1-70b, llama-3.1-8b)
  • Updated ProviderFactory to route Vercel models to the new provider
  • Added VERCEL_AI_GATEWAY_API_KEY to environment configuration
  • Updated AccountingService to include Vercel AI Gateway models

Testing

The implementation follows the same pattern as existing providers (GPTProvider, OpenRouterProvider) and uses the OpenAI-compatible API format that the Vercel AI Gateway supports.

Related Issue

Closes #573

- Add VercelAIGatewayProvider class extending BaseProvider
- Add VERCEL_AI_GATEWAY to ProviderType enum
- Add Vercel AI Gateway model definitions with pricing
- Update ProviderFactory to route Vercel models to the new provider
- Add VERCEL_AI_GATEWAY_API_KEY to environment configuration
- Update AccountingService to include Vercel AI Gateway models

Closes Merit-Systems#573
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 18, 2026

@tarai-dl is attempting to deploy a commit to the Merit Systems Team on Vercel.

A member of the Team first needs to authorize it.

export const VercelAIGatewayModels: SupportedModel[] = [
// OpenAI models via Vercel AI Gateway
{
model_id: 'gpt-4o',
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.

Vercel AI Gateway models use the same model IDs as native providers (OpenAI, Anthropic), causing them to silently override the native provider mappings when VercelAIGatewayModels is spread last into ALL_SUPPORTED_MODELS.

Fix on Vercel

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.

Add the Vercel AI Gateway as a Provider

1 participant