Skip to content

feat(model connection): remove manual model creation#1551

Draft
AnishSarkar22 wants to merge 6 commits into
MODSetter:devfrom
AnishSarkar22:fix/models
Draft

feat(model connection): remove manual model creation#1551
AnishSarkar22 wants to merge 6 commits into
MODSetter:devfrom
AnishSarkar22:fix/models

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR fixes an issue with LM Studio integration by providing a dummy API key value ("not-needed") when no API key is configured. LM Studio accepts unauthenticated local requests, but the LiteLLM OpenAI-compatible adapter requires an api_key parameter to be present. The fix includes a conditional check that supplies the placeholder value specifically for the lm_studio provider when the API key is empty, along with a corresponding unit test to verify the behavior.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/tests/unit/services/test_model_connections.py
2 surfsense_backend/app/services/model_resolver.py

Need help? Join our Discord

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 895d1966-6e5a-4a84-a576-b1ed35c05fc5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnishSarkar22 AnishSarkar22 marked this pull request as draft June 26, 2026 22:01
@AnishSarkar22 AnishSarkar22 changed the title fix(model_resolver): supply dummy API key for LM Studio when empty feat(model connection): remove manual model creation Jun 27, 2026
… provider connect dialogs

- Introduced `isRefreshDisabled` prop to `ModelsSelectionPanel` to control refresh button state.
- Updated `ProviderConnectDialog` to conditionally enable refresh functionality based on model support and submission status.
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