fix(opencode): detect Copilot PDF input support (#41522)
This commit is contained in:
@@ -88,6 +88,9 @@ function build(key: string, remote: SelectableItem, url: string, prev?: Model):
|
||||
const image =
|
||||
(remote.capabilities.supports.vision ?? false) ||
|
||||
(remote.capabilities.limits.vision?.supported_media_types ?? []).some((item) => item.startsWith("image/"))
|
||||
const pdf =
|
||||
(remote.capabilities.supports.vision ?? false) &&
|
||||
(remote.capabilities.limits.vision?.supported_media_types?.includes("application/pdf") ?? false)
|
||||
|
||||
const isMsgApi = remote.supported_endpoints?.includes("/v1/messages")
|
||||
const endpoint: CopilotEndpoint | undefined = isMsgApi
|
||||
@@ -127,7 +130,7 @@ function build(key: string, remote: SelectableItem, url: string, prev?: Model):
|
||||
audio: false,
|
||||
image,
|
||||
video: false,
|
||||
pdf: false,
|
||||
pdf,
|
||||
},
|
||||
output: {
|
||||
text: true,
|
||||
|
||||
Reference in New Issue
Block a user