fix(provider-pool): 修正 Gemini 和 OpenAI 提供者的请求格式判断
将 Gemini 提供者的判断条件从精确匹配改为前缀匹配,以支持更多 Gemini 变体 使用常量 MODEL_PROVIDER.OPENAI_CUSTOM_RESPONSES 替代硬编码字符串
This commit is contained in:
parent
8252d45f89
commit
41e1b8f25a
1 changed files with 2 additions and 2 deletions
|
|
@ -336,7 +336,7 @@ export class ProviderPoolManager {
|
||||||
const baseMessage = { role: 'user', content: 'Hello, are you ok?' };
|
const baseMessage = { role: 'user', content: 'Hello, are you ok?' };
|
||||||
|
|
||||||
// Gemini 使用不同的请求格式
|
// Gemini 使用不同的请求格式
|
||||||
if (providerType === 'gemini-cli') {
|
if (providerType.startsWith('gemini')) {
|
||||||
return {
|
return {
|
||||||
contents: [{
|
contents: [{
|
||||||
role: 'user',
|
role: 'user',
|
||||||
|
|
@ -346,7 +346,7 @@ export class ProviderPoolManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenAI Custom Responses 使用特殊格式
|
// OpenAI Custom Responses 使用特殊格式
|
||||||
if (providerType === 'openai-custom-responses') {
|
if (providerType === MODEL_PROVIDER.OPENAI_CUSTOM_RESPONSES) {
|
||||||
return {
|
return {
|
||||||
input: [baseMessage],
|
input: [baseMessage],
|
||||||
model: modelName
|
model: modelName
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue