-
Couldn't load subscription status.
- Fork 8
AI selector rework #652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
AI selector rework #652
Conversation
The function would need the runtime anyways
| modelName = DEFAULT_MODELS[nextProvider]; | ||
| model = findModel(nextProvider, modelName, availableModels); | ||
| if (model) return model; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Infinite Loop in Provider Selection
Infinite loop: When cellAiSettings has a valid provider but no model, and the provider's default model is not available, the while loop tries to find a different provider. However, providerPreferenceOrder.find((p) => p !== cellAiSettings.provider) will always return the same "next" provider (the first one that's not equal to cellAiSettings.provider). If that provider's model is also unavailable, the loop will continue indefinitely trying the same provider. The loop should either break after trying all providers, or iterate through providers systematically instead of using .find().
Screen.Recording.2025-10-24.at.6.12.56.PM.mov
Screen.Recording.2025-10-27.at.10.47.03.AM.mov
Screen.Recording.2025-10-27.at.10.49.43.AM.mov
Screen.Recording.2025-10-27.at.10.51.55.AM.mov