Skip to content

fix(ui-tars): allow VLM key fields from multiple sources during preset import #533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eust-w
Copy link

@eust-w eust-w commented Apr 24, 2025

Summary

This PR fixes an issue where importing preset configurations would fail if any of the three VLM key fields (vlmBaseUrl, vlmApiKey, and vlmModelName) were missing, even if they were already set in the Settings-VLM settings page.

The changes allow these key fields to be provided from either source (Settings-VLM page or imported configuration), improving user experience by making the validation less strict. As long as one source provides the necessary values, the application will function correctly.

Key changes:

  • Modified PresetSchema to make VLM key fields optional
  • Added mergeWithExistingSettings function to combine settings from multiple sources
  • Updated importPresetFromText to merge imported settings with existing ones
  • Ensured Settings-VLM page is automatically updated after import

Closes: #532

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@CLAassistant
Copy link

CLAassistant commented Apr 24, 2025

CLA assistant check
All committers have signed the CLA.

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.

[Bug]: Overly Strict Validation for VLM Key Fields During Preset Import
2 participants