fix: exclude speech providers from providers list endpoint

ListProviders now filters out client_type matching '%-speech' so Edge
and future speech providers no longer appear on the Providers page.
ListSpeechProviders uses the same pattern match instead of hard-coding
'edge-speech'.
This commit is contained in:
Acbox
2026-04-07 00:29:28 +08:00
parent a04b8fd564
commit ea40e6481a
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -712,6 +712,7 @@ func (q *Queries) ListModelsByType(ctx context.Context, type_ string) ([]Model,
const listProviders = `-- name: ListProviders :many
SELECT id, name, client_type, icon, enable, config, metadata, created_at, updated_at FROM providers
WHERE client_type NOT LIKE '%-speech'
ORDER BY created_at DESC
`
@@ -834,7 +835,7 @@ func (q *Queries) ListSpeechModelsByProviderID(ctx context.Context, providerID p
const listSpeechProviders = `-- name: ListSpeechProviders :many
SELECT id, name, client_type, icon, enable, config, metadata, created_at, updated_at FROM providers
WHERE client_type = 'edge-speech'
WHERE client_type LIKE '%-speech'
ORDER BY created_at DESC
`