mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
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:
@@ -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
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user