Opus
pricing.ts comments document hasKnownPricing as returning null but signature returns boolean; getModelPricing JSDoc lies about return value
- src/providers/pricing.ts:60-67
JSDoc claims getModelPricing returns null for unknown models, but the implementation falls back to FALLBACK_PRICING (a non-null object). Callers reading the doc will write `if (price === null)` branches that are dead code and silently apply FALLBACK_PRICING — leading to wrong cost reporting being mistaken for 'unknown model.' This is a misleading comment that would cause real cost-attribution bugs.
Recommendation
Either fix the doc to say 'Falls back to conservative pricing for unknown models; use hasKnownPricing() to check existence' OR change return type to `{...} | null` and have callers handle null.