Skip to content

Persist model selection and improve vision-model handling #8

Description

@LostOne1000

Priority

Medium

Summary

The plug-in selects the first model returned by Ollama:

props.selectedModel = availableModels[1]

Ollama does not guarantee that the first returned model is vision-capable or appropriate for image metadata generation.

The user’s model selection is also discarded whenever the dialog is reopened.

Expected behavior

The plug-in should remember the selected model and avoid silently defaulting to an arbitrary text-only model.

Implementation notes

  • Store the selected model in Lightroom plug-in preferences.
  • When loading:
    1. Retrieve the available Ollama models.
    2. Select the stored preference when it still exists.
    3. Otherwise prefer the configured default model.
    4. Otherwise require explicit selection or use a documented fallback.
  • Persist the selection when it changes or when the dialog is saved.
  • Consider adding a user-configured vision-model preference rather than attempting unreliable model-name inference.
  • Display a clear error when the selected model rejects image input.

Acceptance criteria

  • The selected Ollama model persists between Lightroom sessions.
  • Reopening the dialog restores the previously selected model when available.
  • The first arbitrary model returned by /api/tags is not automatically preferred over a valid saved selection.
  • A missing saved model falls back predictably.
  • Image-input rejection produces a clear recoverable error.
  • Existing model discovery behavior continues to work when Ollama is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions