FEATURE: Add latest image model and aspect ratio support#157
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds support for newer GPT image-generation models and introduces an aspect_ratio parameter to the Paint tool, while extending function schema/validation to support enum-constrained parameters across the plugin.
Changes:
- Add
aspect_ratioenum parameter toPaintFunctionand map aspect ratios to model-supported image sizes (DALL·E 3 vs GPT image family). - Extend function parameter validation and function-to-JSON schema generation to support
enum. - Expand settings/model choices and update RAG tool availability to include paint edit for all
gpt-image-*models; add specs covering these behaviors.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| spec/lib/functions/paint_function_spec.rb | New specs for aspect_ratio enum exposure and size mapping behavior per model family. |
| spec/lib/function_spec.rb | Adds validation tests for enum/type enforcement and ensures enum appears in parsed function JSON. |
| spec/lib/bot/open_ai_agent_spec.rb | Verifies paint_edit_picture tool inclusion for gpt-image-* models and exclusion for dall-e-3. |
| plugin.rb | Bumps plugin version to reflect feature release. |
| package.json | Bumps package version to match release increment. |
| lib/discourse_chatbot/functions/parser.rb | Emits enum into generated function JSON schema when present. |
| lib/discourse_chatbot/functions/paint_function.rb | Adds aspect ratio parameter, model-family size mapping, and broader GPT image model detection. |
| lib/discourse_chatbot/function.rb | Enhances parameter validation: unknown args, type checks, and enum constraint enforcement. |
| lib/discourse_chatbot/bots/open_ai_bot_rag.rb | Includes PaintEditFunction and enables it for any gpt-image-* configured model. |
| config/settings.yml | Adds gpt-image-1-mini and gpt-image-1.5 to picture creation model choices. |
| config/locales/server.en.yml | Updates setting/help text and adds translation for the new aspect_ratio parameter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.