Files
continue/packages
continue[bot] 7d3fa6daa9 fix(openai-adapters): Add defensive type checks for stream.usage Promise
Added type validation for stream.usage values to prevent NaN:
- Check if promptTokens is a number before using
- Check if completionTokens is a number before using
- Calculate totalTokens from components if not provided
- Default to 0 for any undefined/invalid values

This prevents NaN errors when stream.usage Promise resolves with
unexpected/undefined values in the fallback path.

Co-authored-by: nate <nate@continue.dev>
Generated with [Continue](https://continue.dev)
2025-12-10 19:50:18 +00:00
..
2025-12-02 12:25:02 -08:00
2025-12-03 16:21:28 -08:00
2025-12-02 12:25:02 -08:00
2025-07-18 19:20:13 +02:00