Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
page of your Microsoft Foundry portal.
2) AZURE_AI_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model (e.g., gpt-4o, gpt-4o-mini, gpt-5o, gpt-5o-mini)
used by the agent for understanding and responding to prompts. This is NOT the image generation model.
3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1-mini)
3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1)
used by the ImageGenTool.

NOTE:
- Image generation requires a separate "gpt-image-1-mini" deployment which is specified when constructing
- Image generation requires a separate "gpt-image-1" deployment which is specified when constructing
the `ImageGenTool`, as well as providing it in the `x-ms-oai-image-generation-deployment` header when
calling `.responses.create`.
Copy link
Member

@dargilco dargilco Feb 18, 2026

Choose a reason for hiding this comment

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

Can you please also delete this sentence? clearly no longer needed if the samples work for you without the header.
"as well as providing it in the x-ms-oai-image-generation-deployment header when calling .responses.create."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't tried it without this header actually, let me give it a test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we still need the header, it failed just now when I ran it without it

- AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1-mini".
- AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1".
- The generated image will be saved as "microsoft.png" in the OS temporary directory.
"""

Expand All @@ -62,7 +62,7 @@

# [START tool_declaration]
tool = ImageGenTool( # type: ignore[call-overload]
model=image_generation_model, # Model such as "gpt-image-1-mini" # type: ignore
model=image_generation_model, # Model such as "gpt-image-1" # type: ignore
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The README.md file still references "gpt-image-1-mini" in the image generation example snippet (line 265), but this PR updates the sample files to recommend "gpt-image-1" instead. For consistency across the documentation, the README should also be updated to reflect this new recommendation.

Copilot uses AI. Check for mistakes.
quality="low",
size="1024x1024",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
page of your Microsoft Foundry portal.
2) AZURE_AI_MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in
the "Models + endpoints" tab in your Microsoft Foundry project.
3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1-mini)
3) IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME - The deployment name of the image generation model (e.g., gpt-image-1)
used by the ImageGenTool.

NOTE:
- Image generation requires a separate "gpt-image-1-mini" deployment which is specified when constructing
- Image generation requires a separate "gpt-image-1" deployment which is specified when constructing
the `ImageGenTool`, as well as providing it in the `x-ms-oai-image-generation-deployment` header when
calling `.responses.create`.
- AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1-mini".
- AZURE_AI_MODEL_DEPLOYMENT_NAME should be set to your chat model (e.g., gpt-4o), NOT "gpt-image-1".
- The generated image will be saved as "microsoft.png" in the OS temporary directory.
"""

Expand Down
Loading