Skip to content

Commit ec93809

Browse files
docs(omniroute): convert installation guide to overview page
Transform the OmniRoute documentation from a detailed local installation and startup verification guide to a concise overview page that focuses on introducing OmniRoute's purpose, core features, and common use cases. The page now delegates specific installation and configuration steps to the official OmniRoute repository and documentation. Co-Authored-By: Hagicode <noreply@hagicode.com> Signed-off-by: newbe36524 <newbe36524@qq.com>
1 parent 4ee68d3 commit ec93809

1 file changed

Lines changed: 13 additions & 71 deletions

File tree

  • src/content/docs/related-software-installation/omniroute
Lines changed: 13 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,28 @@
11
---
2-
title: OmniRoute 本地安装与启动验证
3-
description: 使用推荐的本地 npm 路径安装 OmniRoute,完成启动验证,并确认 http://localhost:20128 与 http://localhost:20128/v1 可用
2+
title: OmniRoute 简要介绍
3+
description: 关于 OmniRoute 的用途、核心特点与常见使用场景的简介
44
sidebar_position: 12
55
tags:
66
- omniroute
77
- openai-compatible
8-
- installation
8+
- overview
99
- integration
1010
---
1111

1212
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
1313

14-
本页面面向第一次接触 OmniRoute 的 HagiCode 用户:先用最短路径把本地服务跑起来,再验证 `http://localhost:20128/v1` 可用,并确认 Dashboard 与 API 都已经正常启动
14+
OmniRoute 是一个轻量的 OpenAI 兼容路由器与代理(gateway),用于将多个上游模型提供商统一为单一的 OpenAI 兼容 API 端点。它常用于在本地或内网环境中集中管理模型访问、凭证和路由策略,方便现有基于 OpenAI API 的工具、SDK 与平台无缝对接
1515

16-
:::tip[推荐路径]
17-
首版文档只把**最稳定的推荐路径**放在前面:`npm install -g omniroute``omniroute`、Dashboard `http://localhost:20128`、OpenAI 兼容 Base URL `http://localhost:20128/v1`。Docker、VPS 和更高级的部署方式放在后面,作为可选路径。
18-
:::
16+
主要特点
1917

20-
## 安装前准备
18+
- OpenAI 兼容的 /v1 API,使现有客户端代码无需修改即可对接。
19+
- 多上游 Provider 路由:可按模型、标签或策略把请求转发到不同提供方。
20+
- 仪表盘(Dashboard)用于可视化管理 Endpoints、API Keys 和运行状态。
21+
- 灵活的部署方式:本地、Docker 或云端均可部署。
2122

22-
- 本机已安装 Node.js。建议先完成 [安装 Node.js](/related-software-installation/nodejs/installation)
23-
- 预留可访问的本地端口 `20128`,避免被其他服务占用。
24-
- 准备至少一个你要通过 OmniRoute 统一接入的上游模型提供方账号。
25-
- 计划接入 HagiCode、CLI 或 SDK 时,先把“Dashboard 地址”和“API Base URL”区分清楚:
26-
- Dashboard:`http://localhost:20128`
27-
- OpenAI 兼容 Base URL:`http://localhost:20128/v1`
23+
注意
2824

29-
## 本地安装与启动
30-
31-
推荐先走全局 npm 安装路径:
32-
33-
```bash
34-
npm install -g omniroute
35-
omniroute
36-
```
37-
38-
启动后,按下面的顺序检查:
39-
40-
1. 打开浏览器访问 `http://localhost:20128`,确认 Dashboard 可以正常加载。
41-
2. 在 Dashboard 中进入 `Endpoints` 页面,创建或复制一个 API Key。
42-
3. 记下稍后要提供给工具的 Base URL:`http://localhost:20128/v1`
43-
44-
:::note[为什么先看 Dashboard]
45-
首次接入时,Dashboard 是确认 OmniRoute 已启动、Provider 已连接、API Key 已生成的最快路径。后续工具调用如果失败,先回到 Dashboard 看运行状态,通常比直接排查 SDK 配置更快。
46-
:::
47-
48-
## 启动后验证
49-
50-
### 验证一:确认模型目录可读
51-
52-
先把刚才在 `Endpoints` 页面拿到的 Key 放进环境变量:
53-
54-
```bash
55-
export OMNIROUTE_API_KEY="替换为你在 Endpoints 页面复制的 Key"
56-
```
57-
58-
然后请求 `/v1/models`
59-
60-
```bash
61-
curl http://localhost:20128/v1/models \
62-
-H "Authorization: Bearer ${OMNIROUTE_API_KEY}"
63-
```
64-
65-
如果返回模型列表,说明 OpenAI 兼容端点和鉴权已经可用。
66-
67-
### 验证二:发一次最小聊天请求
68-
69-
```bash
70-
curl http://localhost:20128/v1/chat/completions \
71-
-H "Authorization: Bearer ${OMNIROUTE_API_KEY}" \
72-
-H "Content-Type: application/json" \
73-
-d '{
74-
"model": "替换为 /v1/models 返回的模型 ID",
75-
"messages": [
76-
{ "role": "user", "content": "Reply with ok." }
77-
]
78-
}'
79-
```
80-
81-
这一步的重点不是提示词,而是确认你选择的模型已经能从 OmniRoute 正常路由出去。
82-
83-
## 下一步
25+
本仓库已移除了具体的本地安装与启动步骤。若需要安装、启动或高级配置指南,请查阅 OmniRoute 官方仓库与文档(下方链接),或使用上游提供的安装说明与部署示例。
8426

8527
<CardGrid>
8628
<LinkCard
@@ -96,9 +38,9 @@ curl http://localhost:20128/v1/chat/completions \
9638
如果你还没有准备好本地 CLI 环境,可以先补齐 Agent CLI 的安装。
9739
</LinkCard>
9840
<LinkCard
99-
title="OmniRoute 上游项目"
41+
title="OmniRoute 官方仓库"
10042
href="https://github.com/diegosouzapw/OmniRoute"
10143
>
102-
需要查看更完整的官方说明时,继续阅读上游仓库与指南
44+
官方代码仓库与 README 包含安装、配置和部署示例
10345
</LinkCard>
10446
</CardGrid>

0 commit comments

Comments
 (0)