Update sample_agent_image_generation.py docs recommended image model#45236
Update sample_agent_image_generation.py docs recommended image model#45236ahibrahimm wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
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 |
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_image_generation.py
Outdated
Show resolved
Hide resolved
sdk/ai/azure-ai-projects/samples/agents/tools/sample_agent_image_generation.py
Outdated
Show resolved
Hide resolved
| # [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 |
There was a problem hiding this comment.
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.
| - 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`. |
There was a problem hiding this comment.
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."
There was a problem hiding this comment.
I haven't tried it without this header actually, let me give it a test
There was a problem hiding this comment.
I think we still need the header, it failed just now when I ran it without it
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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:
General Guidelines and Best Practices
Testing Guidelines