1
0

feat: 初始化 AI Gateway 项目

实现支持 OpenAI 和 Anthropic 双协议的统一大模型 API 网关 MVP 版本,包含:
- OpenAI 和 Anthropic 协议代理
- 供应商和模型管理
- 用量统计
- 前端配置界面
This commit is contained in:
2026-04-15 16:53:28 +08:00
commit 915b004924
53 changed files with 5662 additions and 0 deletions

37
frontend/src/App.tsx Normal file
View File

@@ -0,0 +1,37 @@
import { useState } from 'react';
import { ProvidersPage } from './pages/ProvidersPage';
import { StatsPage } from './pages/StatsPage';
import './App.css';
function App() {
const [currentPage, setCurrentPage] = useState<'providers' | 'stats'>('providers');
return (
<div className="app">
<nav className="navbar">
<h1>AI Gateway</h1>
<div className="nav-links">
<button
className={currentPage === 'providers' ? 'active' : ''}
onClick={() => setCurrentPage('providers')}
>
</button>
<button
className={currentPage === 'stats' ? 'active' : ''}
onClick={() => setCurrentPage('stats')}
>
</button>
</div>
</nav>
<main className="content">
{currentPage === 'providers' && <ProvidersPage />}
{currentPage === 'stats' && <StatsPage />}
</main>
</div>
);
}
export default App;