(providerKey?: string | null)
| 25 | export const DEFAULT_KIMI_CODE_BASE_URL = 'https://api.kimi.com/coding/v1'; |
| 26 | |
| 27 | export function isManagedKimiCode(providerKey?: string | null): boolean { |
| 28 | if (!providerKey) return false; |
| 29 | if (!providerKey.startsWith(MANAGED_PREFIX)) return false; |
| 30 | return providerKey.slice(MANAGED_PREFIX.length) === KIMI_CODE_PLATFORM_ID; |
| 31 | } |
| 32 | |
| 33 | export function kimiCodeBaseUrl(): string { |
| 34 | return process.env['KIMI_CODE_BASE_URL'] ?? DEFAULT_KIMI_CODE_BASE_URL; |