From 43b55d93ce8c322f20b653d23885e06d765ac978 Mon Sep 17 00:00:00 2001 From: evgeniy-phase-ai <351591807+evgeniy-phase-ai@users.noreply.github.com> Date: Thu, 12 Nov 2026 07:18:24 +0000 Subject: [PATCH] docs: add Phase Router custom endpoint guide Co-Authored-By: Claude Opus 5.5 --- components/icons/providers/index.ts | 1 + components/icons/providers/phaserouter.tsx | 16 +++++++ .../librechat_yaml/ai_endpoints/index.mdx | 1 + .../librechat_yaml/ai_endpoints/meta.json | 1 + .../ai_endpoints/phaserouter.mdx | 44 +++++++++++++++++++ lib/icons.tsx | 2 + 6 files changed, 65 insertions(+) create mode 100644 components/icons/providers/phaserouter.tsx create mode 100644 content/docs/configuration/librechat_yaml/ai_endpoints/phaserouter.mdx diff --git a/components/icons/providers/index.ts b/components/icons/providers/index.ts index e287de290d..884cd03352 100644 --- a/components/icons/providers/index.ts +++ b/components/icons/providers/index.ts @@ -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' diff --git a/components/icons/providers/phaserouter.tsx b/components/icons/providers/phaserouter.tsx new file mode 100644 index 0000000000..2b1a776279 --- /dev/null +++ b/components/icons/providers/phaserouter.tsx @@ -0,0 +1,16 @@ +import React from 'react' + +export default function PhaseRouterIcon({ className, ...props }: React.SVGProps) { + return ( + + + + + ) +} diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/index.mdx b/content/docs/configuration/librechat_yaml/ai_endpoints/index.mdx index 87e51cbf33..5f5849ca86 100644 --- a/content/docs/configuration/librechat_yaml/ai_endpoints/index.mdx +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/index.mdx @@ -65,6 +65,7 @@ OPENAI_API_KEY=user_provided + diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json index c46fe3dfdd..35be0e64f4 100644 --- a/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/meta.json @@ -23,6 +23,7 @@ "ollama", "openrouter", "perplexity", + "phaserouter", "portkey", "shuttleai", "togetherai", diff --git a/content/docs/configuration/librechat_yaml/ai_endpoints/phaserouter.mdx b/content/docs/configuration/librechat_yaml/ai_endpoints/phaserouter.mdx new file mode 100644 index 0000000000..0c19d653fa --- /dev/null +++ b/content/docs/configuration/librechat_yaml/ai_endpoints/phaserouter.mdx @@ -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. diff --git a/lib/icons.tsx b/lib/icons.tsx index e6efff0668..a6f1461aca 100644 --- a/lib/icons.tsx +++ b/lib/icons.tsx @@ -38,6 +38,7 @@ import { OpenAIIcon, OpenRouterIcon, PerplexityIcon, + PhaseRouterIcon, PortkeyIcon, RailwayIcon, RedisIcon, @@ -292,6 +293,7 @@ const icons: Record = { OpenAI: , OpenRouter: , Perplexity: , + PhaseRouter: , Portkey: , Railway: , Redis: ,