Skip to content

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Sep 16, 2025

Describe Your Changes

This pull request refines the vision model import dialog by improving validation logic and error handling, and by removing unnecessary debug logging. The main changes focus on more robust extraction and verification of model metadata, particularly the baseName field, and ensuring compatibility between MMProj files and selected models.

Validation and Metadata Handling:

  • The dialog now extracts the general.basename from GGUF metadata and uses it to auto-set the model name if available, ensuring consistency between the file and the displayed model name.
  • When importing MMProj files, the code now checks that the baseName from the file matches or contains the current model name, and sets a validation error if there is a mismatch to prevent incompatible combinations.
  • The model name is initially set from the filename, but will be overridden by the extracted baseName from metadata if available, improving user experience and reducing manual input errors.

Code Cleanup:

  • Removed various console.log statements that previously logged debugging information about file metadata and validation steps, resulting in cleaner production code. [1] [2] [3]

Error Handling:

  • Improved error handling by providing clear error messages when MMProj file baseName does not match the selected model name, and logging the mismatch for troubleshooting.

Fixes Issues

Screenshot 2025-09-16 at 15 39 07 Screenshot 2025-09-16 at 15 38 44
  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

Important

Enhances vision model import dialog with improved validation, error handling, and code cleanup in ImportVisionModelDialog.tsx and providers/$providerName.tsx.

  • Validation and Metadata Handling:
    • Extracts general.basename from GGUF metadata in ImportVisionModelDialog.tsx to auto-set model name.
    • Validates baseName compatibility with model name for MMProj files, setting errors on mismatch.
    • Overrides model name from filename with baseName if available.
  • Code Cleanup:
    • Removes console.log statements from ImportVisionModelDialog.tsx for cleaner code.
  • Error Handling:
    • Provides clear error messages for baseName mismatches in MMProj files.
    • Logs errors for troubleshooting in ImportVisionModelDialog.tsx.
  • Misc:
    • Re-validates MMProj file on model name change using useEffect in ImportVisionModelDialog.tsx.
    • Handles importing state in ProviderDetail in providers/$providerName.tsx.

This description was created by Ellipsis for 0945eae. You can customize this summary. It will automatically update as commits are pushed.

@urmauur urmauur added this to the v0.6.10 milestone Sep 16, 2025
@urmauur urmauur self-assigned this Sep 16, 2025
@urmauur urmauur added this to Jan Sep 16, 2025
@urmauur urmauur moved this to Needs Review in Jan Sep 16, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to ea354ce in 1 minute and 27 seconds. Click for details.
  • Reviewed 112 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:72
  • Draft comment:
    Good extraction of the 'general.basename' metadata to auto-set the model name. Consider applying the same sanitization rules (e.g., allowed characters) as used for the filename to ensure consistency.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:124
  • Draft comment:
    The mmproj compatibility check uses case‑insensitive substring matching between baseName and modelName. Ensure this logic covers all edge cases—if you need stricter matching (e.g. full equality after normalization), consider updating the check.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_0r8CaKaG2mx72N8W

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 16, 2025

Barecheck - Code coverage report

Total: 29.25%

Your code coverage diff: -0.06% ▾

Uncovered files and lines
FileLines
web-app/src/containers/dialogs/ImportVisionModelDialog.tsx1, 10-15, 28-42, 44-45, 47-57, 59, 61, 63-64, 66, 68-69, 72, 74-76, 79-88, 90-95, 97, 99, 101-103, 107-109, 112-113, 116-128, 130-147, 149-161, 163-165, 167-169, 171-175, 177-178, 180-181, 183-187, 190-192, 194-197, 199-203, 205-208, 210-213, 216-218, 220-225, 227, 229-230, 232-237, 239-240, 242-243, 245-247, 250-262, 264-273, 276-280, 282-289, 291-296, 298-299, 302-303, 305, 307-313, 315-316, 319-335, 338-341, 343-348, 352, 354-356, 358-359, 361-362, 364-378, 380, 382-392, 394-396, 399-407, 409-415, 419-426, 428-430, 432, 434-440, 442, 444, 447-451, 453-454, 456-470, 472, 474-484, 486-488, 491-499, 501-507, 511-518, 520-522, 524, 526-532, 534, 536, 538-539, 541-547, 549-560, 562, 564-566, 568, 570-573, 575
web-app/src/routes/settings/providers/$providerName.tsx2-7, 13-30, 36-43, 46-48, 50-54, 56-92, 95-103, 105-108, 110, 112, 115-120, 122-124, 126-132, 137-138, 140-147, 149-150, 152-164, 166-167, 169, 171-174, 177-182, 184-185, 188-197, 200-204, 206-208, 211-212, 214, 216-221, 224-225, 227-230, 235-236, 238-241, 243-249, 251-255, 258-264, 267-270, 272, 274-278, 280-304, 306, 308-310, 312, 315-331, 333-336, 338, 340-343, 345-353, 355-356, 358-363, 365-371, 373-374, 376-377, 379-388, 390, 394, 397-399, 401-403, 406-417, 420-433, 435-439, 441, 443-480, 482-488, 491-492, 494-501, 503-513, 517-519, 522, 525-527, 529-540, 543-547, 549-552, 555-556, 559, 561-565, 567-576, 578-581, 583, 586-595, 597-602, 604-614, 616-618, 620-632, 634-642, 644-669, 671-686, 688, 690-691, 693, 695-696, 699-716, 718-723, 725-728, 730-736, 738-739, 741-750, 752-761, 763, 765-766, 769-779, 781-784, 786-796, 798-807, 809-821, 823-824, 826-831, 833-839, 841, 843, 845, 847, 849, 851, 853-860, 862-864, 867-877, 879-884, 886, 888-894, 896

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 272ef9f in 1 minute and 16 seconds. Click for details.
  • Reviewed 57 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:47
  • Draft comment:
    Good use of useCallback for validateGgufFile. Ensure that its dependency array (currently [modelName, serviceHub]) covers all variables used inside, especially if any other state or props are referenced in future modifications.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:275
  • Draft comment:
    The useEffect re-validating the MMProj file when modelName changes is a neat improvement. Confirm that rapid state changes won’t lead to unnecessary re-validations.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:124
  • Draft comment:
    The MMProj validation logic comparing 'baseName' and 'modelName' using toLowerCase is clear. Be sure metadata always includes these keys to prevent edge case issues.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. web-app/src/containers/dialogs/ImportVisionModelDialog.tsx:138
  • Draft comment:
    Consider whether handling potential cancellation of concurrent validations is needed. Although not critical now, it could prevent race conditions during rapid state updates.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_c4Lw5zOIXxOxP0Rd

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 0945eae in 1 minute and 39 seconds. Click for details.
  • Reviewed 184 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. web-app/src/routes/settings/providers/$providerName.tsx:86
  • Draft comment:
    Good addition: the importingModel state tracks the currently importing model for displaying a loading skeleton. Consider renaming it to something like 'importingModelId' if multiple simultaneous imports might be supported in the future.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. web-app/src/routes/settings/providers/$providerName.tsx:115
  • Draft comment:
    The nested try-catch inside handleModelImportSuccess is functionally fine but could be flattened to improve readability. Consider merging error handling if possible.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. web-app/src/routes/settings/providers/$providerName.tsx:188
  • Draft comment:
    Nice useEffect that clears the importing state when the model appears in the provider's model list.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. web-app/src/routes/settings/providers/$providerName.tsx:199
  • Draft comment:
    The 10-second fallback timeout to clear importingModel is a good safeguard, but consider defining this magic number as a constant or adding a comment explaining its rationale.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. web-app/src/routes/settings/providers/$providerName.tsx:867
  • Draft comment:
    The importing skeleton rendering using animate-pulse provides a clear UX cue. Ensure that only one import is processed at a time; if concurrent imports are possible in the future, consider using an array to track multiple importing models.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_KZWRQCNWoCVdsm1T

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@urmauur urmauur merged commit 9380774 into release/v0.6.10 Sep 16, 2025
16 checks passed
@urmauur urmauur deleted the fix/valdidate-mmproj branch September 16, 2025 10:18
@github-project-automation github-project-automation bot moved this from Needs Review to QA in Jan Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants