mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-28 13:31:32 +08:00
fix: azure-openai provider
This commit is contained in:
parent
450d6228d4
commit
b67cd9d145
@ -145,12 +145,14 @@ function addProviderSpecificMiddlewares(builder: AiSdkMiddlewareBuilder, config:
|
||||
// Anthropic特定中间件
|
||||
break
|
||||
case 'openai':
|
||||
case 'azure-openai': {
|
||||
const tagName = config.model?.id.includes('gemini') ? tagNameArray[1] : tagNameArray[0]
|
||||
builder.add({
|
||||
name: 'thinking-tag-extraction',
|
||||
middleware: extractReasoningMiddleware({ tagName })
|
||||
})
|
||||
break
|
||||
}
|
||||
case 'gemini':
|
||||
// Gemini特定中间件
|
||||
break
|
||||
|
||||
@ -217,7 +217,7 @@ export const INITIAL_PROVIDERS: Provider[] = [
|
||||
{
|
||||
id: 'azure-openai',
|
||||
name: 'Azure OpenAI',
|
||||
type: 'openai',
|
||||
type: 'azure-openai',
|
||||
apiKey: '',
|
||||
apiHost: '',
|
||||
apiVersion: '',
|
||||
|
||||
@ -800,6 +800,7 @@ const migrateConfig = {
|
||||
|
||||
state.llm.providers.forEach((provider) => {
|
||||
if (provider.id === 'qwenlm') {
|
||||
// @ts-ignore eslint-disable-next-line
|
||||
provider.type = 'qwenlm'
|
||||
}
|
||||
})
|
||||
@ -857,6 +858,7 @@ const migrateConfig = {
|
||||
try {
|
||||
state.llm.providers.forEach((provider) => {
|
||||
if (provider.id === 'qwenlm') {
|
||||
// @ts-ignore eslint-disable-next-line
|
||||
provider.type = 'qwenlm'
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user