mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 10:29:02 +08:00
fix(AihubmixAPIClient): enhance ID validation logic to exclude 'embed… (#8157)
fix(AihubmixAPIClient): enhance ID validation logic to exclude 'embedding' (#8148)
This commit is contained in:
parent
be6ecbe0b1
commit
40724ad877
@ -103,7 +103,12 @@ export class AihubmixAPIClient extends BaseApiClient {
|
||||
}
|
||||
|
||||
// gemini开头 且不以-nothink、-search结尾
|
||||
if ((id.startsWith('gemini') || id.startsWith('imagen')) && !id.endsWith('-nothink') && !id.endsWith('-search')) {
|
||||
if (
|
||||
(id.startsWith('gemini') || id.startsWith('imagen')) &&
|
||||
!id.endsWith('-nothink') &&
|
||||
!id.endsWith('-search') &&
|
||||
!id.includes('embedding')
|
||||
) {
|
||||
const client = this.clients.get('gemini')
|
||||
if (!client || !this.isValidClient(client)) {
|
||||
throw new Error('Gemini client not properly initialized')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user