fix: restore fetchAvailableModels to fix provider lost as custom (#194)
* fix: restore fetchAvailableModels to fix provider lost as custom (#174) #174 replaced fetchAvailableModels with fetchConfigModels, but config/models response lacks default_provider, label, base_url and api_key fields. This caused selectedProvider to always be empty, making all models appear as "custom" in the model selector. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: bump version to 0.4.6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hermes-web-ui",
|
"name": "hermes-web-ui",
|
||||||
"version": "0.4.5",
|
"version": "0.4.6",
|
||||||
"description": "Self-hosted AI chat dashboard for Hermes Agent — multi-model (Claude, GPT, Gemini, DeepSeek) web UI with Telegram, Discord, Slack, WhatsApp integration",
|
"description": "Self-hosted AI chat dashboard for Hermes Agent — multi-model (Claude, GPT, Gemini, DeepSeek) web UI with Telegram, Discord, Slack, WhatsApp integration",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { checkHealth, fetchConfigModels, updateDefaultModel, triggerUpdate, type AvailableModelGroup } from '@/api/hermes/system'
|
import { checkHealth, fetchAvailableModels, updateDefaultModel, triggerUpdate, type AvailableModelGroup } from '@/api/hermes/system'
|
||||||
|
|
||||||
const WEB_UI_VERSION = __APP_VERSION__
|
const WEB_UI_VERSION = __APP_VERSION__
|
||||||
|
|
||||||
@@ -57,16 +57,10 @@ export const useAppStore = defineStore('app', () => {
|
|||||||
|
|
||||||
async function loadModels() {
|
async function loadModels() {
|
||||||
try {
|
try {
|
||||||
const res = await fetchConfigModels()
|
const res = await fetchAvailableModels()
|
||||||
modelGroups.value = res.groups.map(g => ({
|
modelGroups.value = res.groups
|
||||||
provider: g.provider,
|
|
||||||
label: g.provider,
|
|
||||||
base_url: '',
|
|
||||||
models: g.models.map(m => typeof m === 'string' ? m : m.id),
|
|
||||||
api_key: '',
|
|
||||||
}))
|
|
||||||
selectedModel.value = res.default
|
selectedModel.value = res.default
|
||||||
selectedProvider.value = ''
|
selectedProvider.value = res.default_provider || ''
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user