MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / readKimiApiConfig

Function readKimiApiConfig

apps/kimi-web/src/api/config.ts:18–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18export function readKimiApiConfig(): KimiApiConfig {
19 return {
20 serverHttpUrl: normalizeServerOrigin(import.meta.env.VITE_KIMI_SERVER_HTTP_URL),
21 clientId: getClientId(),
22 clientName: WEB_CLIENT_NAME,
23 clientVersion: webClientVersion(),
24 clientUiMode: WEB_CLIENT_UI_MODE,
25 };
26}
27
28// Default to SAME-ORIGIN so we never depend on CORS:
29// - dev: the SPA is served by Vite; the Vite dev proxy forwards /v1, /healthz

Callers 1

getKimiWebApiFunction · 0.90

Calls 3

getClientIdFunction · 0.85
webClientVersionFunction · 0.85
normalizeServerOriginFunction · 0.70

Tested by

no test coverage detected