Skip to content

Update sample_agent_image_generation.py docs recommended image model#45236

Open
ahibrahimm wants to merge 3 commits intomainfrom
ahibrahim/image-gen-sample-doc
Open

Update sample_agent_image_generation.py docs recommended image model#45236
ahibrahimm wants to merge 3 commits intomainfrom
ahibrahim/image-gen-sample-doc

Conversation

@ahibrahimm
Copy link
Contributor

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the documentation in image generation sample files to recommend using "gpt-image-1" instead of "gpt-image-1-mini" as the image generation model. The change reflects a preference for the more capable model that supports additional features like high input fidelity settings.

Changes:

  • Updated documentation comments to reference "gpt-image-1" instead of "gpt-image-1-mini" in both sync and async versions
  • Modified inline code comments to reflect the new recommended model name

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_image_generation_async.py Updated documentation to recommend "gpt-image-1" model in comments
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_image_generation.py Updated documentation to recommend "gpt-image-1" model, but also contains unintended changes to agent_name and commented-out cleanup code

# [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.
- 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

ahibrahimm and others added 2 commits February 18, 2026 23:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments