mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 11:44:28 +08:00
fix: Fix the image support for the GitHub Copilot models (#5379)
This commit is contained in:
parent
3f42c7bace
commit
2392cba477
@ -2202,9 +2202,10 @@ export function isVisionModel(model: Model): boolean {
|
||||
if (!model) {
|
||||
return false
|
||||
}
|
||||
if (model.provider === 'copilot') {
|
||||
return false
|
||||
}
|
||||
// 新添字段 copilot-vision-request 后可使用 vision
|
||||
// if (model.provider === 'copilot') {
|
||||
// return false
|
||||
// }
|
||||
|
||||
if (model.provider === 'doubao') {
|
||||
return VISION_REGEX.test(model.name) || model.type?.includes('vision') || false
|
||||
|
||||
@ -70,7 +70,8 @@ export default class OpenAIProvider extends BaseProvider {
|
||||
baseURL: this.getBaseURL(),
|
||||
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