Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions components/icons/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export { default as OllamaIcon } from './ollama'
export { default as OpenAIIcon } from './openai'
export { default as OpenRouterIcon } from './openrouter'
export { default as PerplexityIcon } from './perplexity'
export { default as PhaseRouterIcon } from './phaserouter'
export { default as PortkeyIcon } from './portkey'
export { default as RailwayIcon } from './railway'
export { default as RedisIcon } from './redis'
Expand Down
16 changes: 16 additions & 0 deletions components/icons/providers/phaserouter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'

export default function PhaseRouterIcon({ className, ...props }: React.SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 64 64"
fill="none"
className={className}
{...props}
>
<circle cx="32" cy="32" r="17" stroke="currentColor" strokeWidth="3" opacity=".45" />
<circle cx="32" cy="32" r="9" fill="currentColor" />
</svg>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ OPENAI_API_KEY=user_provided
<Cards.Card title="LiteLLM" href="/docs/configuration/librechat_yaml/ai_endpoints/litellm" arrow />
<Cards.Card title="NEAR AI Cloud" href="/docs/configuration/librechat_yaml/ai_endpoints/nearai" arrow />
<Cards.Card title="NeurochainAI" href="/docs/configuration/librechat_yaml/ai_endpoints/neurochain" arrow />
<Cards.Card title="Phase Router" href="/docs/configuration/librechat_yaml/ai_endpoints/phaserouter" arrow />
<Cards.Card title="Portkey AI" href="/docs/configuration/librechat_yaml/ai_endpoints/portkey" arrow />
<Cards.Card title="TrueFoundry AI Gateway" href="/docs/configuration/librechat_yaml/ai_endpoints/truefoundry" arrow />
<Cards.Card title="vLLM" href="/docs/configuration/librechat_yaml/ai_endpoints/vllm" arrow />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"ollama",
"openrouter",
"perplexity",
"phaserouter",
"portkey",
"shuttleai",
"togetherai",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Phase Router
icon: PhaseRouter
description: Configure Phase Router as a custom endpoint in LibreChat.
---

[Phase Router](https://router.phase.xyz) is an OpenAI-compatible model router: about 400 models (open models such as DeepSeek, Qwen, Llama, gpt-oss, Kimi and GLM, plus Claude models) behind one base URL and one API key. Each response reports the model that ran and its price in `usage.cost`.

## Get an API key

Create an API key (`phk_...`) in the [Phase Router dashboard](https://router.phase.xyz/dashboard). Add it to your `.env` file:

```bash filename=".env"
PHASE_API_KEY=your-api-key
```

## Configuration

Add the endpoint to the `custom` list under `endpoints` in your `librechat.yaml`. If your file already has an `endpoints.custom` list, paste only the `- name:` entry into it, keeping the same indentation:

```yaml filename="librechat.yaml"
endpoints:
custom:
- name: "Phase Router"
apiKey: "${PHASE_API_KEY}"
baseURL: "https://router.phase.xyz/v1"
models:
default:
- "auto"
- "gpt-oss-120b"
- "deepseek-v3.2"
fetch: true
titleConvo: true
titleModel: "gpt-oss-120b"
modelDisplayLabel: "Phase Router"
```

To let each user supply their own key through the LibreChat UI instead of reading one from `.env`, set `apiKey: "user_provided"`.

## Notes

- With `fetch: true`, LibreChat loads the model list from Phase Router's OpenAI-compatible `/v1/models` endpoint. The `default` array is only the initial selection.
- The model `auto` lets the router pick a model for each request; any model can also be called by its id from the [model catalog](https://router.phase.xyz/models).
- See the [Phase Router docs](https://router.phase.xyz/docs) for prices, limits and the full API reference.
2 changes: 2 additions & 0 deletions lib/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
OpenAIIcon,
OpenRouterIcon,
PerplexityIcon,
PhaseRouterIcon,
PortkeyIcon,
RailwayIcon,
RedisIcon,
Expand Down Expand Up @@ -292,6 +293,7 @@ const icons: Record<string, ReactElement> = {
OpenAI: <OpenAIIcon />,
OpenRouter: <OpenRouterIcon />,
Perplexity: <PerplexityIcon />,
PhaseRouter: <PhaseRouterIcon />,
Portkey: <PortkeyIcon />,
Railway: <RailwayIcon />,
Redis: <RedisIcon />,
Expand Down