feat: add gateway auto-start on boot and real health detection

- Auto-detect gateway connectivity on server startup, start gateway if not running
- Fix /health endpoint to actually check gateway reachability instead of just CLI version
- Fix MiniMax CN base_url from /anthropic to /v1
- Frontend connection status now reflects real gateway state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ekko
2026-04-13 20:08:32 +08:00
parent 5143a264c5
commit 0ff04758b6
5 changed files with 60 additions and 8 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ export const PROVIDER_PRESETS: ProviderPreset[] = [
{
label: 'MiniMax (China)',
value: 'minimax-cn',
base_url: 'https://api.minimaxi.com/anthropic',
base_url: 'https://api.minimaxi.com/v1',
models: ['MiniMax-M2.7', 'MiniMax-M2.5', 'MiniMax-M2.1', 'MiniMax-M2'],
},
{
+1 -1
View File
@@ -17,7 +17,7 @@ export const useAppStore = defineStore('app', () => {
async function checkConnection() {
try {
const res = await checkHealth()
connected.value = true
connected.value = res.status === 'ok'
if (res.version) serverVersion.value = res.version
} catch {
connected.value = false