INNER CODE UNIT · TypeScript

profile

Core-Mate/OpenGUI · deepseek-harness-plugin/src/index.ts:422

  const profile = (): ResolvedPiAiProviderProfile | undefined => {
    const raw = current()
    if (raw === lastRaw) return lastProfile
    lastRaw = raw
    lastProfile = configuredProfile(raw)
    return lastProfile
  }

  const resolveApiKey = async (_provider: string, active: ResolvedPiAiProviderProfile): Promise<string> => {
    const ref = credentialRef(active.apiKeyEnv ?? API_KEY_ENV)
    const credentials = ctx.get('credentials')
    const hit = credentials === undefined ? undefined : await credentials.resolve(ref)
    if (hit !== undefined) return assertUsableApiKey(hit.value, name, ref)
    throw new LlmError(`coremate-mobile: no credential stored for ${ref}`, 'MISSING_CREDENTIAL')
  }
  const adapter = new PhonePiAiAdapter({
    profiles: () => {
      const active = profile()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…