Skip to content

Add lm studio as model provider#1134

Merged
zhijianma merged 8 commits intoagentscope-ai:mainfrom
garyzhang99:dev/lm_studio
Mar 11, 2026
Merged

Add lm studio as model provider#1134
zhijianma merged 8 commits intoagentscope-ai:mainfrom
garyzhang99:dev/lm_studio

Conversation

@garyzhang99
Copy link
Copy Markdown
Collaborator

Description

As the title says. Also polish doc.

Copilot AI review requested due to automatic review settings March 10, 2026 07:47
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the platform's local LLM capabilities by introducing native support for LM Studio. Users can now easily configure and utilize models served by LM Studio, benefiting from improved integration and clear guidance. The changes ensure a consistent user experience across the application and its documentation, making local model deployment more accessible.

Highlights

  • LM Studio Provider Integration: Added LM Studio as a new, natively supported model provider, allowing seamless connection to local LLMs hosted via the LM Studio desktop application.
  • Console UI and Localization Updates: Integrated LM Studio into the console's model settings, including specific endpoint hints and configuration logic, with corresponding localization updates for English, Japanese, Russian, and Chinese.
  • Comprehensive Documentation: Updated both English and Chinese documentation across the README, configuration guides, and console usage instructions to detail the setup and usage of the LM Studio provider, including important notes for Docker users and context length management.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • README.md
    • Updated Docker instructions to include LM Studio configuration examples.
  • README_zh.md
    • Updated Chinese Docker instructions to include LM Studio configuration examples.
  • console/src/locales/en.json
    • Added a new localization string for the LM Studio endpoint hint.
  • console/src/locales/ja.json
    • Added a new Japanese localization string for the LM Studio endpoint hint.
  • console/src/locales/ru.json
    • Added a new Russian localization string for the LM Studio endpoint hint.
  • console/src/locales/zh.json
    • Added a new Chinese localization string for the LM Studio endpoint hint.
  • console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx
    • Modified the isConfigured logic to correctly identify LM Studio as a configured provider.
  • console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx
    • Implemented logic to display LM Studio-specific endpoint hints and default URLs within the provider configuration modal.
  • console/src/pages/Settings/Models/components/sections/ModelsSection.tsx
    • Adjusted the provider filtering and display logic to properly account for the LM Studio provider's base URL requirement.
  • src/copaw/providers/lm_studio_provider.py
    • Introduced a new Python file defining the LMStudioProvider class, which extends OpenAIProvider to integrate with LM Studio's local server.
  • src/copaw/providers/provider_manager.py
    • Imported the new LMStudioProvider.
    • Registered PROVIDER_LMSTUDIO as a built-in provider.
    • Updated the _provider_from_data method to correctly instantiate LMStudioProvider when detected.
  • website/public/docs/config.en.md
    • Expanded the English built-in providers table to include LM Studio with its default base URL.
  • website/public/docs/config.zh.md
    • Expanded the Chinese built-in providers table to include LM Studio with its default base URL.
  • website/public/docs/console.en.md
    • Added a new dedicated English documentation section detailing the setup and configuration of the LM Studio provider.
    • Updated the quick reference table to mention LM Studio in the models section.
  • website/public/docs/console.zh.md
    • Added a new dedicated Chinese documentation section detailing the setup and configuration of the LM Studio provider.
    • Updated the quick reference table to mention LM Studio in the models section.
  • website/public/docs/models.en.md
    • Updated the introductory text to explicitly mention LM Studio as a supported LLM provider.
    • Added a comprehensive English guide for configuring and using the LM Studio provider, including prerequisites and important tips.
  • website/public/docs/models.zh.md
    • Updated the introductory text in Chinese to explicitly mention LM Studio as a supported LLM provider.
    • Added a comprehensive Chinese guide for configuring and using the LM Studio provider, including prerequisites and important tips.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
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 LM Studio as a first-class LLM provider across the backend provider registry, Console UI, and documentation, enabling CoPaw to connect to LM Studio’s OpenAI-compatible local server and auto-discover loaded models.

Changes:

  • Introduce LMStudioProvider and register it as a built-in provider in ProviderManager.
  • Update Console UI to support LM Studio endpoint hints/defaults and eligibility logic.
  • Expand English/Chinese docs + README Docker guidance to include LM Studio setup.

Reviewed changes

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

Show a summary per file
File Description
website/public/docs/models.zh.md Document LM Studio provider usage + Docker networking notes (ZH).
website/public/docs/models.en.md Document LM Studio provider usage + context-length/Docker notes (EN).
website/public/docs/console.zh.md Add LM Studio section to Console docs and update quick index (ZH).
website/public/docs/console.en.md Add LM Studio section to Console docs and update quick reference (EN).
website/public/docs/config.zh.md Expand built-in provider table to include LM Studio + others (ZH).
website/public/docs/config.en.md Expand built-in provider table to include LM Studio + others (EN).
src/copaw/providers/provider_manager.py Register LM Studio as a built-in provider and load it from persisted data.
src/copaw/providers/lm_studio_provider.py New provider class that fetches models from LM Studio’s OpenAI-compatible endpoint.
console/src/pages/Settings/Models/components/sections/ModelsSection.tsx Allow LM Studio providers in “eligible” selection when base_url is set.
console/src/pages/Settings/Models/components/modals/ProviderConfigModal.tsx Add LM Studio endpoint hint + default base URL behavior.
console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx Mark LM Studio as configured in provider card status logic.
console/src/locales/zh.json Add models.lmstudioEndpointHint translation (ZH).
console/src/locales/ru.json Add models.lmstudioEndpointHint translation (RU).
console/src/locales/ja.json Add models.lmstudioEndpointHint translation (JA).
console/src/locales/en.json Add models.lmstudioEndpointHint translation (EN).
README_zh.md Generalize Docker “host.docker.internal” Base URL guidance to include LM Studio (ZH).
README.md Generalize Docker “host.docker.internal” Base URL guidance to include LM Studio (EN).

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

Comment thread console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces LM Studio as a new model provider, which is a great addition for users running local models. The changes are comprehensive, covering the backend provider implementation, frontend UI updates for configuration, and thorough documentation for users. My review focuses on improving the maintainability and robustness of the new LMStudioProvider implementation. I've suggested a refactoring to reduce code duplication and enhance error logging, which will make the code cleaner and easier to debug in the future.

Comment thread src/copaw/providers/lm_studio_provider.py Outdated
@garyzhang99 garyzhang99 added the model configure Issue related to the model API. label Mar 10, 2026
Comment thread website/public/docs/config.zh.md Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Comment thread console/src/pages/Settings/Models/components/cards/RemoteProviderCard.tsx Outdated
Copilot AI review requested due to automatic review settings March 11, 2026 02:27
@garyzhang99 garyzhang99 requested a review from zhijianma March 11, 2026 02:30
Copy link
Copy Markdown
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 18 out of 18 changed files in this pull request and generated 5 comments.


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

Comment thread src/copaw/providers/lm_studio_provider.py
Comment thread src/copaw/providers/provider_manager.py
Comment thread website/public/docs/config.en.md Outdated
Comment thread website/public/docs/config.zh.md Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Copilot AI review requested due to automatic review settings March 11, 2026 06:33
Copy link
Copy Markdown
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 17 out of 17 changed files in this pull request and generated 4 comments.


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

Comment thread console/src/pages/Settings/Models/components/sections/ModelsSection.tsx Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Comment thread src/copaw/providers/lm_studio_provider.py Outdated
Copilot AI review requested due to automatic review settings March 11, 2026 07:39
Copy link
Copy Markdown
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 17 out of 17 changed files in this pull request and generated 1 comment.


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

@garyzhang99 garyzhang99 temporarily deployed to maintainer-approved March 11, 2026 07:49 — with GitHub Actions Inactive
@zhijianma zhijianma merged commit 6cf6678 into agentscope-ai:main Mar 11, 2026
19 checks passed
hh0592821 pushed a commit to hh0592821/CoPaw that referenced this pull request Mar 12, 2026
tudan110 pushed a commit to tudan110/QwenPaw that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model configure Issue related to the model API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants