repowiserepowise

App

portkey-ai / gateway

A blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.

★ 13,384stars on GitHubTypeScriptMIT

This connects Repowise to portkey-ai/gateway's code. It does not install gateway.

Repowise maps public repos from their source. Not affiliated with portkey-ai. What is Repowise?

github.com/portkey-ai/gatewayIndexed at 669825c

What is gateway?

gateway is an open-source AI gateway that lets an application send requests to more than 250 LLMs through one API. It takes client prompts and provider configuration, applies routing and reliability rules and guardrails, and returns streamed model responses. It is written in TypeScript and runs on Node.js. To install it, run npx @portkey-ai/gateway. Its code health is 7.5 out of 10 (Good), ranked #102 of 4,000+ indexed repos. The last commit to gateway was on May 19, 2026, and 133 people have contributed.

As of commit 669825c, indexed Sep 29, 2026. What it is comes from a model reading the README; the rest is measured from the source and git history, not from the maintainer.

For agentsgateway.md

Repo facts: type, license, health, rank, contributors
gateway facts
TypeApp
LicenseMIT
Code health7.5 / 10 (Good)
Health rank#102 of 4,000+ indexed repos
Last commitMay 19, 2026
Contributors133
Bus factor4
Size661 files, 66,267 lines

Install gateway

Commands copied from the README

  1. 1Run the gateway locally, which needs Node.js and npm.
    npx @portkey-ai/gateway

Releases on GitHub (latest v1.15.2, Jan 12, 2026)

Full install notes on GitHub

Explore gateway

Ask about this code in your agent

This connects Repowise to gateway's code. It does not install gateway. To install gateway, use the install steps.

Useful if you want to change or fork gateway: your agent can ask how it is put together and get answers that cite its files.

Ask about gateway

Answers come from gateway's README and source, with the files they cite. Two free answers a day without an account.

Want this for your own codebase? Map your repo free

About this page

Get a page like this for your own codebase

Repowise built this map of portkey-ai/gateway from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Free for 2 public repos, with a page like this one. No card. See how Repowise works

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed. Star Repowise on GitHub

portkey-ai/gateway FAQ

What is gateway?

gateway is an open-source AI gateway that routes application requests to more than 250 LLMs through one API. It can also apply guardrails and reliability rules such as fallbacks and automatic retries.

How does gateway work?

gateway takes client prompts and provider configuration, applies routing, reliability rules and guardrails, and returns streamed model responses. The server is started from src/start-server.ts.

How do I install gateway?

gateway runs locally with the command npx @portkey-ai/gateway, which requires Node.js and npm. The Gateway Console then runs alongside it to show local logs. See the install steps

What language is gateway written in?

gateway is written mainly in TypeScript, with a small number of JavaScript files and one Dockerfile. It runs on Node.js.

How is the gateway code organized?

gateway keeps its core setup in src, with src/index.ts as the top-level entry point and src/globals.ts for gateway-wide behavior. Guardrail logic lives in the plugins directory, with subfolders such as plugins/default, plugins/bedrock and plugins/pillar.

When should I use gateway?

gateway is for routing requests to many LLMs through one API while adding fallbacks, retries, load balancing and guardrails. It suits applications that need to switch or protect model providers.

What license does gateway use?

gateway uses the MIT license, identified as MIT in its license metadata. The code can be used under the terms of that license.

Code health

7.4out of 10Good

On the leaderboards:#38 of 66 TypeScript repos

Key features of gateway

  • Routes requests from one API to 250+ LLMs, including language, vision, audio and image models.
  • Retries failed requests automatically and falls back to another provider or model when specified errors occur.
  • Distributes requests across multiple API keys or AI providers with weights, and supports conditional routing.
  • Checks LLM inputs and outputs with 40+ pre-built guardrails, and lets you bring your own guardrails.
  • Provides an MCP Gateway for managing MCP (Model Context Protocol) servers with authentication, access control and observability.

How portkey-ai/gateway works

Requests from an application enter through the server that src/start-server.ts starts, and src/index.ts is the top-level entry point. src/globals.ts is where gateway-wide behavior is set up once and made available to the rest of the codebase. Guardrails are implemented in the plugins directory, where plugins/default holds constraint logic that can be applied to request content and metadata regardless of which provider receives the request. plugins/bedrock/type.ts defines the action model used to guard chat completions, with ContentPolicy extending BedrockAction. plugins/pillar contains scan logic for detecting risky content in prompts and responses, and the output is the streamed model response returned to the application.

The codebase has 661 files and 2,373 symbols in 5 modules, led by TypeScript, JavaScript and Dockerfile. Code health is 7.4 out of 10, rated good.