You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(embedding): improve dimension detection performance and reliability
- Add dimension detection flags to prevent redundant API calls for custom models
- Replace fragile magic number logic with explicit boolean flags for OAPI detection
- Make environment variable check case-insensitive for better user experience
- Fix setModel method to properly reset detection flags for unknown models
- Update test imports to fix TypeScript compilation errors
Performance improvements:
- Dimension detection now happens only once per model/instance
- Eliminates unnecessary API calls for known and already-detected models
- Concurrent embed calls no longer trigger duplicate dimension detection
Reliability improvements:
- OAPI dimension detection no longer relies on magic number comparison
- Case-insensitive environment variable parsing (true/TRUE/True all work)
- Proper state management for model changes via setModel()
0 commit comments