Skip to content

enhancement: add model provider options#7611

Merged
urmauur merged 3 commits intomainfrom
enhancement/add-model-provider-options
Mar 5, 2026
Merged

enhancement: add model provider options#7611
urmauur merged 3 commits intomainfrom
enhancement/add-model-provider-options

Conversation

@urmauur
Copy link
Member

@urmauur urmauur commented Mar 4, 2026

Describe Your Changes

Screenshot 2026-03-04 at 20 36 38

Fixes Issues

  • 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

@urmauur urmauur requested a review from louis-jan March 4, 2026 13:29
@urmauur urmauur self-assigned this Mar 4, 2026
Copilot AI review requested due to automatic review settings March 4, 2026 13:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a UI entry point in the Settings sidebar to create new (OpenAI-compatible) model providers, so users can add providers without navigating to the dedicated Model Providers page.

Changes:

  • Adds an “Add Provider” action to the Settings menu’s Model Providers section via AddProviderDialog.
  • Introduces createProvider logic in SettingsMenu to create and persist a new provider, then navigate to its settings page.
  • Defaults the providers section expansion state to expanded.
Comments suppressed due to low confidence (1)

web-app/src/containers/SettingsMenu.tsx:46

  • setTimeout(..., 0) around the navigation looks unnecessary here because addProvider (Zustand set) is synchronous. Prefer navigating immediately after addProvider (or, if a deferral is required, use a documented approach like queueMicrotask/requestAnimationFrame) to avoid leaving an untracked timer running if the component unmounts quickly.
      addProvider(newProvider)
      setTimeout(() => {
        navigate({ to: route.settings.providers, params: { providerName: name } })
      }, 0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings March 4, 2026 13:44
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Barecheck - Code coverage report

Total: 22.14%

Your code coverage diff: 0.02% ▴

Uncovered files and lines
FileLines
web-app/src/containers/SettingsMenu.tsx31-47, 158-159, 171-177, 179-180, 182, 184, 191-199, 201-206, 208-223, 226-231, 233-234, 319

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

web-app/src/containers/tests/SettingsMenu.test.tsx:130

  • The test selects the chevron via getAllByRole('button')[0], but the menu now renders multiple buttons (e.g., the new “Add Provider” button). This makes the test dependent on DOM ordering. Consider scoping the query to the Model Providers row/link and selecting the nested button from there so the test remains stable if more buttons are added later.
    // Click the chevron to collapse
    const chevronButtons = screen.getAllByRole('button')
    const chevron = chevronButtons[0]
    await user.click(chevron)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@urmauur urmauur merged commit 3b7621f into main Mar 5, 2026
21 checks passed
@github-project-automation github-project-automation bot moved this to QA in Jan Mar 5, 2026
@urmauur urmauur deleted the enhancement/add-model-provider-options branch March 5, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: QA

Development

Successfully merging this pull request may close these issues.

3 participants