Skip to content

Provider Request: Add AgentRouter (Non-profit AI Gateway β€” Free Credits)Β #1572

Description

@oyi77

🎯 What is AgentRouter?

AgentRouter is a non-profit AI API gateway that provides unified access to 30+ LLM providers (OpenAI, Anthropic, DeepSeek, Zhipu AI, and more) through a single API key.

Why it matters: $200 in free credits on signup

  • No credit card required β€” just connect GitHub
  • $200 with referral link (standard signup: $100)
  • Pay-as-you-go β€” no platform fees, no subscriptions, no minimum commitment
  • OpenAI-compatible API β€” drop-in replacement at https://agentrouter.org/v1
  • 30+ providers including GPT-5, Claude, DeepSeek, and more

API Details

Field Value
Base URL https://agentrouter.org/v1
Auth Type API Key (Bearer token)
API Format OpenAI-compatible
API Key Source https://agentrouter.org/console/token
Registration https://agentrouter.org/register

It also supports Anthropic-compatible endpoints at https://agentrouter.org/ (for Claude Code, Codex, etc.).

Supported Endpoints

/v1/chat/completions, /v1/responses, /v1/messages, /v1/embeddings, /v1/rerank, /v1/images/generations, /v1/audio/speech, /v1/audio/transcriptions


πŸ› οΈ Implementation Plan

AgentRouter is OpenAI-compatible β€” it can use the default executor with no custom translator or executor needed. Implementation follows the existing OpenRouter pattern exactly.

Files to Modify

1. src/shared/constants/providers.ts β€” Register the provider

Add to APIKEY_PROVIDERS:

agentrouter: {
  id: "agentrouter",
  alias: "agentrouter",
  name: "AgentRouter",
  icon: "router",
  color: "#10B981",
  textIcon: "AR",
  passthroughModels: true,
  website: "https://agentrouter.org",
  apiHint: "Get $200 free credits at https://agentrouter.org/register β€” no credit card required.",
},

2. open-sse/config/providerRegistry.ts β€” Configure endpoint & models

Add:

agentrouter: {
  id: "agentrouter",
  alias: "agentrouter",
  format: "openai",
  executor: "default",
  baseUrl: "https://agentrouter.org/v1/chat/completions",
  authType: "apikey",
  authHeader: "bearer",
  defaultContextLength: 128000,
  headers: {
    "HTTP-Referer": "https://endpoint-proxy.local",
    "X-Title": "OmniRoute",
  },
  models: [{ id: "auto", name: "Auto (Best Available)" }],
},

Since AgentRouter is a passthrough/router (like OpenRouter), passthroughModels: true means users can use any model AgentRouter supports without OmniRoute pre-registering them. Users would add models via the Available Models interface.

3. src/shared/constants/pricing.ts β€” Add baseline pricing (optional)

agentrouter: {
  auto: {
    input: 2.0,
    output: 8.0,
  },
},

4. src/shared/constants/config.ts β€” Add display endpoint (optional)

agentrouter: "https://agentrouter.org/v1/chat/completions",

πŸ“‹ Integration Checklist

  • Add provider entry in APIKEY_PROVIDERS (providers.ts)
  • Add provider config in providerRegistry.ts
  • Add pricing in pricing.ts
  • Add display endpoint in config.ts
  • No custom executor needed (uses default executor β€” OpenAI-compatible)
  • No custom translator needed (OpenAI format)

πŸ”— References


πŸ’‘ This is a good first issue β€” 4 files to edit, no custom executor/translator needed. Perfect for new contributors looking to add a provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions