Skip to content

Conversation

@louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jul 22, 2025

Describe Your Changes

This PR addresses feedback from #5808 regarding how we determine first-class provider status. Instead of using token.js registration as the check, we now implement a proper predefined list to identify first-class providers that should be non-deletable.

CleanShot 2025-07-22 at 13 25 22@2x CleanShot 2025-07-22 at 13 30 17@2x

#5281

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

Refactor to use a predefined list for non-deletable providers, updating logic in DeleteProvider.tsx, $providerName.tsx, and providers.ts.

  • Behavior:
    • DeleteProvider.tsx: Uses predefinedProviders to check non-deletable status instead of models from token.js.
    • $providerName.tsx: Updates import path for predefinedProviders.
    • providers.ts: Uses predefinedProviders for built-in providers.
  • Tests:
    • providers.test.ts: Updates mock for predefinedProviders to reflect new import path and logic.
  • Misc:
    • Renames web-app/src/mock/data.ts to web-app/src/consts/providers.ts.
    • Minor formatting changes in providers.test.ts and providers.ts.

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

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 0d174db in 1 minute and 4 seconds. Click for details.
  • Reviewed 27 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/DeleteProvider.tsx:20
  • Draft comment:
    Importing predefinedProviders from '@/mock/data' replaces token.js models. Consider moving this config to a dedicated production config file if it's not meant only for mock/testing.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. web-app/src/containers/dialogs/DeleteProvider.tsx:31
  • Draft comment:
    The check using predefinedProviders.some() improves first-class provider detection. Consider extracting this logic into a helper function to enhance clarity and maintainability, and ensure the expected provider property exists in each predefined provider object.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_fSORwz0jQgnKQ0dI

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

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 bdc83b0 in 1 minute and 27 seconds. Click for details.
  • Reviewed 61 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 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/DeleteProvider.tsx:31
  • Draft comment:
    Consider using a case‐insensitive comparison (e.g. using toLowerCase()) when checking if the provider is in predefinedProviders to be consistent with the provider creation check.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. web-app/src/routes/settings/providers/$providerName.tsx:369
  • Draft comment:
    Same as above – for consistency, consider using a case‐insensitive check when comparing provider names in predefinedProviders.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. web-app/src/routes/settings/providers/index.tsx:25
  • Draft comment:
    The import update from '@/mock/data' to '@/consts/providers' looks appropriate; ensure that the new constants match expected structure.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to ensure that the new constants match the expected structure, which is a form of asking them to double-check their work. This violates the rule against asking the author to ensure behavior is intended or to double-check things.

Workflow ID: wflow_ntbCYFaCDM5ngjiZ

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

@louis-jan louis-jan requested review from LazyYuuki and urmauur July 22, 2025 06:33
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.

Caution

Changes requested ❌

Reviewed 6acb12e in 1 minute and 59 seconds. Click for details.
  • Reviewed 425 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 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/services/__tests__/providers.test.ts:305
  • Draft comment:
    Mixing snake_case and camelCase keys (e.g. controller_type vs. controllerType) can be confusing. Consider standardizing the naming convention.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. web-app/src/services/__tests__/providers.test.ts:120
  • Draft comment:
    PR title mentions HuggingFace provider non-deletability but no test covers it. Add a test to verify that the HuggingFace (or similar predefined) provider cannot be deleted.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. web-app/src/services/__tests__/providers.test.ts:18
  • Draft comment:
    Consistent use of trailing commas throughout mocks improves readability and diff clarity. Good job!
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_ewMKzgS4hkd6JqWp

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

@louis-jan louis-jan merged commit d347058 into release/v0.6.6 Jul 22, 2025
50 of 54 checks passed
@louis-jan louis-jan deleted the fix/huggingface-as-first-class-provider branch July 22, 2025 16:32
@github-project-automation github-project-automation bot moved this to QA in Jan Jul 22, 2025
@github-actions github-actions bot added this to the v0.6.6 milestone Jul 22, 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.

3 participants