Skip to content

FEATURE: Add latest image model and aspect ratio support#157

Merged
merefield merged 4 commits into
mainfrom
add_image_model_n_supporrt_aspect
Mar 20, 2026
Merged

FEATURE: Add latest image model and aspect ratio support#157
merefield merged 4 commits into
mainfrom
add_image_model_n_supporrt_aspect

Conversation

@merefield

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_ratio enum parameter to PaintFunction and 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.

Comment thread lib/discourse_chatbot/functions/paint_function.rb Outdated
@merefield merefield merged commit 795c889 into main Mar 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants