fix: azure-openai provider

This commit is contained in:
suyao 2025-07-08 13:38:14 +08:00
parent 450d6228d4
commit b67cd9d145
No known key found for this signature in database
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -217,7 +217,7 @@ export const INITIAL_PROVIDERS: Provider[] = [
{
id: 'azure-openai',
name: 'Azure OpenAI',
type: 'openai',
type: 'azure-openai',
apiKey: '',
apiHost: '',
apiVersion: '',

View File

@ -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'
}
})