@lineai/voice-models
v0.1.2
Published
Voice model catalog for the Line AI phone platform: model → tier mapping, intra-tier ordering, and upgrade detection. Pure data + pure functions; no prices.
Readme
@lineai/voice-models
Voice model catalog for the Line AI phone platform: model → tier mapping, explicit intra-tier ordering, and upgrade detection.
Voice agents pin a concrete model ID (gpt-realtime-1.5, gpt-realtime-2.1-mini, …); this package derives the sellable tier (standard | pro | max) from that pin — the inverse of the chat/task tier system, which stores the tier and resolves the model late. Pinned models never change out from under a customer; availableUpgrade() only detects that a newer same-tier model exists.
No prices live here. The service-api rate card (and its Firestore overrides) remains the sole pricing authority; this catalog only tells pricing code which tier a model belongs to and whether it is a reasoning model.
API
import {
VOICE_MODELS, VOICE_TIERS, DEFAULT_VOICE_MODEL,
normalizeModelId, // strips '-2025-10-06' style date suffixes
modelInfo, tierOf, isReasoningModel,
currentModelForTier, modelsForTier,
availableUpgrade, // highest-rank non-deprecated same-tier model above the pin, or null
} from '@lineai/voice-models';status semantics:
current— what a newly created agent in this tier gets.available— catalogued and upgradable, but not the default (staging state).deprecated— never offered as an upgrade target; existing pins keep working.
Develop
pnpm install
pnpm build
pnpm test