Skip to content

Conversation

@markmiro
Copy link
Contributor

@markmiro markmiro commented Oct 25, 2025

  • Better and more unified logic for selecting a default AI model based on which providers and models are available.
  • Don't set the AI model at cell creation. Do it at execution when we have a runtime and can determine an appropriate default model.
Screen.Recording.2025-10-24.at.6.12.56.PM.mov
  • Don't allow selecting a model if there is no runtime.
    • Related: users won't see gpt-4o-mini as the default when we don't have enough information to determine the default model
Screen.Recording.2025-10-27.at.10.47.03.AM.mov
  • Show existing model, but don't allow changing it if no runtime.
    • Screenshot 2025-10-27 at 10 47 57 AM
  • Special new state for decommissioned models to be displayed, but don't allow changing to a decommissioned model.
    • Screenshot 2025-10-21 at 4 28 46 PM
  • You can open a notebook with a runtime that has different models available than the ones available when the notebook was saved.
Screen.Recording.2025-10-27.at.10.49.43.AM.mov
  • Sort AI models by display name
  • Add AI models to debug panel
    • Screenshot 2025-10-27 at 10 51 21 AM
  • Show non-tool models disabled (so users don't wonder why a local Ollama model isn't showing up in the list)
    • Screenshot 2025-10-27 at 10 42 54 AM
  • Add feature flag for showing capabilities (we probably want to allow non-tool models) since some models are not great at tools, and even some tool models should have tools disabled because of how bad they are at deciding when to use them
  • Don't show model until user is on the cell (partly to address edge case where there are multiple AI cells that haven't been executed, and the default model changes, causing all non-executed cells to apparently update their models)
Screen.Recording.2025-10-27.at.10.51.55.AM.mov

@markmiro markmiro marked this pull request as ready for review October 27, 2025 17:53
cursor[bot]

This comment was marked as outdated.

modelName = DEFAULT_MODELS[nextProvider];
model = findModel(nextProvider, modelName, availableModels);
if (model) return model;
}
Copy link

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().

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant