mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 22:39:36 +08:00
fix: Fix the image support for the GitHub Copilot models (#5379)
This commit is contained in:
parent
e5e04c8132
commit
9cea0166e6
@ -2202,9 +2202,10 @@ export function isVisionModel(model: Model): boolean {
|
|||||||
if (!model) {
|
if (!model) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (model.provider === 'copilot') {
|
// 新添字段 copilot-vision-request 后可使用 vision
|
||||||
return false
|
// if (model.provider === 'copilot') {
|
||||||
}
|
// return false
|
||||||
|
// }
|
||||||
|
|
||||||
if (model.provider === 'doubao') {
|
if (model.provider === 'doubao') {
|
||||||
return VISION_REGEX.test(model.name) || model.type?.includes('vision') || false
|
return VISION_REGEX.test(model.name) || model.type?.includes('vision') || false
|
||||||
|
|||||||
@ -70,7 +70,8 @@ export default class OpenAIProvider extends BaseProvider {
|
|||||||
baseURL: this.getBaseURL(),
|
baseURL: this.getBaseURL(),
|
||||||
defaultHeaders: {
|
defaultHeaders: {
|
||||||
...this.defaultHeaders(),
|
...this.defaultHeaders(),
|
||||||
...(this.provider.id === 'copilot' ? { 'editor-version': 'vscode/1.97.2' } : {})
|
...(this.provider.id === 'copilot' ? { 'editor-version': 'vscode/1.97.2' } : {}),
|
||||||
|
...(this.provider.id === 'copilot' ? { 'copilot-vision-request': 'true' } : {})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user