mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-12 11:11:06 +08:00
feat(llm): add provider URL presets
Expose provider-specific preset endpoints in the setup and system settings flows so users can start from the correct base URL while still editing it manually.
This commit is contained in:
@@ -221,6 +221,7 @@ const llmMaxContextRef = computed({
|
||||
|
||||
const {
|
||||
providerItems: llmProviderItems,
|
||||
baseUrlPresetItems: llmBaseUrlPresetItems,
|
||||
models: llmModels,
|
||||
selectedProvider: selectedLlmProvider,
|
||||
selectedModel: selectedLlmModel,
|
||||
@@ -1015,11 +1016,24 @@ watch(currentLlmSnapshotKey, (snapshotKey, previousSnapshotKey) => {
|
||||
/>
|
||||
</VCol>
|
||||
<VCol v-if="SystemSettings.Basic.AI_AGENT_ENABLE && showBaseUrlField" cols="12" md="6">
|
||||
<VSelect
|
||||
v-if="llmBaseUrlPresetItems.length > 0"
|
||||
:model-value="SystemSettings.Basic.LLM_BASE_URL"
|
||||
@update:model-value="(value: any) => {
|
||||
SystemSettings.Basic.LLM_BASE_URL = value || '';
|
||||
}"
|
||||
:label="t('setting.system.llmBaseUrlPreset')"
|
||||
:hint="t('setting.system.llmBaseUrlPresetHint')"
|
||||
:items="llmBaseUrlPresetItems"
|
||||
persistent-hint
|
||||
prepend-inner-icon="mdi-format-list-bulleted-square"
|
||||
class="mb-3"
|
||||
/>
|
||||
<VTextField
|
||||
v-model="SystemSettings.Basic.LLM_BASE_URL"
|
||||
:label="t('setting.system.llmBaseUrl')"
|
||||
:hint="t('setting.system.llmBaseUrlHint')"
|
||||
placeholder="https://api.deepseek.com"
|
||||
:placeholder="selectedLlmProvider?.default_base_url || 'https://api.deepseek.com'"
|
||||
persistent-hint
|
||||
prepend-inner-icon="mdi-link"
|
||||
/>
|
||||
|
||||
@@ -53,6 +53,7 @@ const authConnectedRef = computed({
|
||||
|
||||
const {
|
||||
providerItems,
|
||||
baseUrlPresetItems,
|
||||
models: llmModels,
|
||||
selectedProvider,
|
||||
selectedModel,
|
||||
@@ -228,11 +229,24 @@ onMounted(async () => {
|
||||
</VCol>
|
||||
|
||||
<VCol v-if="showBaseUrlField" cols="12" md="6">
|
||||
<VSelect
|
||||
v-if="baseUrlPresetItems.length > 0"
|
||||
:model-value="wizardData.agent.baseUrl"
|
||||
@update:model-value="(value: any) => {
|
||||
wizardData.agent.baseUrl = value || '';
|
||||
}"
|
||||
:label="t('setting.system.llmBaseUrlPreset')"
|
||||
:hint="t('setting.system.llmBaseUrlPresetHint')"
|
||||
:items="baseUrlPresetItems"
|
||||
persistent-hint
|
||||
prepend-inner-icon="mdi-format-list-bulleted-square"
|
||||
class="mb-3"
|
||||
/>
|
||||
<VTextField
|
||||
v-model="wizardData.agent.baseUrl"
|
||||
:label="t('setting.system.llmBaseUrl')"
|
||||
:hint="t('setting.system.llmBaseUrlHint')"
|
||||
placeholder="https://api.deepseek.com"
|
||||
:placeholder="selectedProvider?.default_base_url || 'https://api.deepseek.com'"
|
||||
persistent-hint
|
||||
prepend-inner-icon="mdi-link-variant"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user