isProviderListed (lib/providerListing.ts)

parley · src/lib/providerListing.ts · typescript · Apache-2.0
voice, Voice / Speech

Filter providers based on cloud and auth context for picker components.

// Source: https://github.com/pathorsAI/parley | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Which providers a picker offers. Shared by the STT and LLM pickers in
 * Settings and in Onboarding, which used to repeat the same inline filter four
 * times. Pure, so the rule is unit-tested once.
 */
export interface ProviderListingContext {
  /** The cloud edition is compiled in (`CLOUD_ENABLED`). */
  cloudEnabled: boolean;
  /** A cloud session exists (`cloudAuth` is set). */
  signedIn: boolean;
}

/**
 * A provider hosted on a Parley account (`requiresAccount` in the STT and LLM
 * registries — today "parley") only exists in the cloud build and only when
 * signed in (the 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key