mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-29 19:33:34 +00:00
This commit fixes the critical bug where the generate command ignored user provider configuration and used hardcoded fallback chains. Changes: - Added enableFallback and fallbackChain options to SynthConfig - Updated BaseGenerator to respect user-provided fallback preferences - Fixed Gemini initialization to properly use environment variables - Updated ModelRouter.getFallbackChain to only require essential capabilities - Added error handling for missing fallback providers The router now: 1. Respects user's primary provider and model choice 2. Allows users to disable fallbacks with enableFallback: false 3. Supports custom fallback chains via fallbackChain config option 4. Only falls back when the primary provider fails 5. Filters fallback capabilities to essential ones (text, json) for compatibility This ensures that when users configure a specific provider (e.g., OpenRouter with a specific model), the system uses that configuration first and only falls back if it fails, rather than blindly switching providers. Fixes the issue where provider configuration was being ignored due to hardcoded fallback logic in base.ts line 41. |
||
|---|---|---|
| .. | ||
| adapters | ||
| api | ||
| cache | ||
| config | ||
| generators | ||
| routing | ||
| types | ||
| index.ts | ||
| types.ts | ||