microsoft / microsoft/vscode

Support Microsoft MAI image generation in Copilot agent workflows

Open
#335,734 0 comments 0 reactions 1 assignee Claimed by @rzhao271 View on GitHub
triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Problem

Copilot agents can help build applications, but generating visual assets with Microsoft MAI models currently requires a separate workflow.

An agent should be able to generate an image during a coding conversation, show the result in chat, and optionally save it into the project. This should work independently of whether the selected conversational model supports native image generation.

## Proposal

Add a built-in **Generate Image** tool backed by Microsoft MAI image models.

## Expected behavior

- Available in normal Copilot Agent chat and the local Agents Window.
- Generates PNG images from text prompts.
- Displays results through the existing image preview, carousel, and Save actions.
- Preserves generated previews when the conversation is reopened.
- Optionally creates a new project file in the originating workspace or session worktree, without overwriting existing files.
- Uses secure credential storage and existing tool approval controls.
- Reports cancellation, authentication, quota, content-policy, and save failures clearly.
- Hides with disabled AI features.

## Initial scope

Start with a user-configured Microsoft Foundry endpoint and API key. Image generation is billed to the configured Azure resource.

A dedicated product endpoint and authentication using an existing signed-in identity can follow separately. Image editing, remote agent hosts, and headless execution are outside the initial scope.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.