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) |
||
|---|---|---|
| .. | ||
| config-types | ||
| config-yaml | ||
| continue-sdk | ||
| fetch | ||
| hub | ||
| llm-info | ||
| openai-adapters | ||
| terminal-security | ||
| shared-release.config.js | ||