-
Notifications
You must be signed in to change notification settings - Fork 838
Open
Description
Problem
The PluralizationConfig type currently requires a model string even when enabled: false. This forces users to provide API keys and model configuration for a feature they're not using.
Current Behavior
modelis always required inPluralizationConfigPluralizationServiceconstructor always initializes the AI model- API keys are validated even when pluralization is disabled
Expected Behavior
modelshould only be required whenenabled: true- Model should be lazy-initialized only when needed
- No unnecessary API calls when pluralization is disabled
Proposed Solution
- Make
modeloptional inPluralizationConfig:model?: string - Add runtime check: throw error if
enabled: truebut no model - Move model initialization from constructor to
generateBatch()method
Benefits
- Better DX: Users don't need to configure unused features
- Performance: No unnecessary model initialization
- Resource efficiency: No API key validation when not needed
- Cleaner config: Only required fields when disabled
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels