Skip to content

language_models: Add vision support for Copilot Chat models #30155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 12, 2025

Conversation

imumesh18
Copy link
Contributor

@imumesh18 imumesh18 commented May 7, 2025

Problem Statement:
Support for image analysis (vision) is currently restricted to Anthropic and Gemini models. This limits users who wish to leverage vision capabilities available in other models, such as Copilot, for tasks like attaching image context within the agent message editor.

Proposed Change:
This PR extends vision support to include Copilot models that are already equipped with vision capabilities. This integration will allow users within VS Code to attach and analyze images using supported Copilot models via the agent message editor.

Scope Limitation:

This PR does not implement controls within the message editor to ensure that image context (e.g., through copy-paste or attachment) is exclusively enabled or prompted only when a vision-supported model is active. Long term the message editor should have access to each models vision capability and stop the users from attaching images by either greying out the context saying it's not support or not work through both copy paste and file/directory search.

Closes #30076

Release Notes:

  • Add vision support for Copilot Chat models

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label May 7, 2025
@imumesh18 imumesh18 force-pushed the copilot-vision-support branch from b784ef6 to 0f18fe5 Compare May 7, 2025 17:22
@maxdeviant maxdeviant changed the title language models: Add vision support for copilot models language_models: Add vision support for Copilot Chat models May 7, 2025
@imumesh18 imumesh18 marked this pull request as ready for review May 7, 2025 17:51
text_content.push_str(text);
}
}
MessageContent::Image(image) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
MessageContent::Image(image) => {
MessageContent::Image(image) if self.model.supports_vision() => {

You can coalesce the if statement in the match expression, it makes it clearer that this case is not used otherwise.

Copy link
Contributor

@bennetbo bennetbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bennetbo bennetbo enabled auto-merge (squash) May 12, 2025 12:52
@bennetbo bennetbo merged commit a6c3d49 into zed-industries:main May 12, 2025
19 checks passed
JosephTLyons pushed a commit that referenced this pull request May 12, 2025
Problem Statement:
Support for image analysis (vision) is currently restricted to Anthropic
and Gemini models. This limits users who wish to leverage vision
capabilities available in other models, such as Copilot, for tasks like
attaching image context within the agent message editor.

Proposed Change:
This PR extends vision support to include Copilot models that are
already equipped with vision capabilities. This integration will allow
users within VS Code to attach and analyze images using supported
Copilot models via the agent message editor.

Scope Limitation:

This PR does not implement controls within the message editor to ensure
that image context (e.g., through copy-paste or attachment) is
exclusively enabled or prompted only when a vision-supported model is
active. Long term the message editor should have access to each models
vision capability and stop the users from attaching images by either
greying out the context saying it's not support or not work through both
copy paste and file/directory search.

Closes #30076 

Release Notes:

- Add vision support for Copilot Chat models

---------

Co-authored-by: Bennet Bo Fenner <[email protected]>
JosephTLyons pushed a commit that referenced this pull request May 12, 2025
Problem Statement:
Support for image analysis (vision) is currently restricted to Anthropic
and Gemini models. This limits users who wish to leverage vision
capabilities available in other models, such as Copilot, for tasks like
attaching image context within the agent message editor.

Proposed Change:
This PR extends vision support to include Copilot models that are
already equipped with vision capabilities. This integration will allow
users within VS Code to attach and analyze images using supported
Copilot models via the agent message editor.

Scope Limitation:

This PR does not implement controls within the message editor to ensure
that image context (e.g., through copy-paste or attachment) is
exclusively enabled or prompted only when a vision-supported model is
active. Long term the message editor should have access to each models
vision capability and stop the users from attaching images by either
greying out the context saying it's not support or not work through both
copy paste and file/directory search.

Closes #30076 

Release Notes:

- Add vision support for Copilot Chat models

---------

Co-authored-by: Bennet Bo Fenner <[email protected]>
@imumesh18 imumesh18 deleted the copilot-vision-support branch May 12, 2025 13:41
dive pushed a commit to dive/zed that referenced this pull request May 12, 2025
…stries#30155)

Problem Statement:
Support for image analysis (vision) is currently restricted to Anthropic
and Gemini models. This limits users who wish to leverage vision
capabilities available in other models, such as Copilot, for tasks like
attaching image context within the agent message editor.

Proposed Change:
This PR extends vision support to include Copilot models that are
already equipped with vision capabilities. This integration will allow
users within VS Code to attach and analyze images using supported
Copilot models via the agent message editor.

Scope Limitation:

This PR does not implement controls within the message editor to ensure
that image context (e.g., through copy-paste or attachment) is
exclusively enabled or prompted only when a vision-supported model is
active. Long term the message editor should have access to each models
vision capability and stop the users from attaching images by either
greying out the context saying it's not support or not work through both
copy paste and file/directory search.

Closes zed-industries#30076 

Release Notes:

- Add vision support for Copilot Chat models

---------

Co-authored-by: Bennet Bo Fenner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agent Panel: GitHub Copilot models can't read attached images
3 participants