Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jul 29, 2025

SmartHopper 0.5.0-alpha: AI Image Generation & Dynamic Model Fallback

This alpha release introduces AI-driven image generation with an integrated viewer, smarter model selection, special-value parsing fixes, and a host of internal enhancements.

🎨 Image Generation & Viewer

  • New AI Image Generate Component powered by OpenAI DALL·E models for batch or single-image generation.
  • New Image Viewer to display and save generated bitmaps directly on the Grasshopper canvas.

🤖 Dynamic Model Fallback

  • Components now detect capability mismatches and automatically switch to a compatible default model if the user’s choice lacks required features, ensuring seamless tool execution.

🐞 Special-Value Parsing Fix

  • Resolved errors when processing data containing special tokens or braces (e.g., {}), eliminating unexpected parsing failures.

✨ Other Improvements

  • Various internal refactorings, performance optimizations, and tool enhancements.

🛠️ Technical Requirements

  • Rhino 8.19 or above
  • Windows 10/11 (macOS untested)
  • Valid API keys for OpenAI (required for image generation), MistralAI, or DeepSeek

⚠️ Important Notes

  • Image generation currently supports only OpenAI DALL·E models.
  • Automatic model fallback may override user-selected models to meet component requirements.
  • API usage costs apply based on your provider plan.

🤝 We Value Your Feedback!

  • Share your experiences and suggestions via our discussions
  • Report issues or request features on our issue tracker
  • Let us know what AI capabilities would boost your design workflow most!

Happy designing! 🎨

marc-romu and others added 30 commits July 26, 2025 20:25
…true parameter in Deserialize should be the same
This PR updates the version badge in the README.md to match the current
version in Solution.props.

This is an automated PR created by the Update Version Badge workflow.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
#280)

## Description

This PR introduces AI image generation support to SmartHopper using
OpenAI DALL-E models and enhances the provider infrastructure for
greater extensibility and robustness. Key highlights include:

- Added new `img_generate` AI tool and `AIImgGenerateComponent` UI
component for image generation.
- Implemented provider-agnostic image generation and new
`DefaultImgModel` property in `IAIProvider`.
- Improved settings management for AI providers, including new methods
for setting and refreshing provider settings.
- Added component existence and connection type validation to
`GHJsonLocal`.
- Various bug fixes and refactors, including automatic GhJSON fixing in
`gh_put`, improved tool filtering, and compatibility fixes for preview
toggling and metrics output.


## Breaking Changes

No breaking changes.

## Testing Done

- Manual testing of image generation via UI and AI tool.
- Verified provider selection, settings management, and error handling.
- Confirmed changelog and versioning updates.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
This PR updates the version badge in the README.md to match the current
version in Solution.props.

This is an automated PR created by the Update Version Badge workflow.
marc-romu and others added 26 commits July 28, 2025 19:45
…-specific enhancements (#282)

## Description

This PR introduces a comprehensive, centralized model capability
management system across all AI providers and refactors
provider-specific model handling for extensibility and maintainability.

Closes #273.

## Breaking Changes

Providers need to be updated to this version.

## Testing Done

RH8.21 on windows.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
This PR updates the development version date in Solution.props to
reflect the latest changes.

This is an automated PR created by the Update Development Version Date
workflow.
## Description

This PR moves default model configuration to AIProviderModels. It allows
providers to define multiple default models for Chat, Image Generation,
JSON Output... This provides more flexibility.

This PR also includes a feature for components. Now, AI powered
components will automatically try to find a suitable default model if
the provided one is not capable for the requested tool.

## Breaking Changes

AI providers must be up to date to 0.5.0.

## Testing Done

Checked cases where model should pass, should be replaced with the
default model, and should not find any suitable model. All tests passed.

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
…itrary delimiters (#285)

## Description

This PR resolves
[#276](#276) by
making the parsing of AI-generated lists robust to any coordinate or
value formatting, regardless of delimiters (e.g., `{}`, [()], `[]`, `;`,
etc.). It ensures that lists like `{1,0,0}, (2,1,0), [3,2,0]` or
quoted/semicolon-delimited values are always correctly parsed as single
items.

Fixes #276

## Breaking Changes

None

## Testing Done

RH8.21 on windows

## Checklist

- [x] This PR is focused on a single feature or bug fix
- [x] Version in Solution.props was updated, if necessary, and follows
semantic versioning
- [x] CHANGELOG.md has been updated
- [x] PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] PR description follows [Pull Request Description
Template](#pull-request-description-template)
…AI-generated images (#286)

## Description

Introduces a new `ImageViewerComponent` in the
`SmartHopper.Components.Img` namespace for visualizing and saving
AI-generated bitmap images:

- Displays scaled bitmaps on a 200×200 px canvas with aspect‐ratio
preservation.
- Inputs:
  - **Image** (bitmap)
  - **File Path** (optional)
  - **Save** (button/toggle)
- Outputs:
  - **Status**
  - **Saved Path**
- Thread‐safe bitmap handling via locking.
- Asynchronous file I/O to keep the UI responsive.
- Cross‐platform support using `System.Drawing.Common`.
- Custom `ImageViewerAttributes`.

## Breaking Changes

None

## Testing Done

- Verified image rendering in Grasshopper for PNG, JPEG, BMP, GIF, and
TIFF.
- Confirmed save functionality via both button and persistent toggle.
- Ensured UI responsiveness and thread safety under concurrent
operations.

## Checklist

- [x] This PR is focused on a single feature.  
- [ ] Version in `Solution.props` was updated, if necessary.  
- [x]
[CHANGELOG.md](cci:7://file:///c:/Users/Marc%20Roca/source/repos/architects-toolkit/SmartHopper/CHANGELOG.md:0:0-0:0)
has been updated under **Unreleased**.
- [x] PR title follows Conventional Commits format.  
- [x] PR description follows the Pull Request Description Template.
… fixes (#287)

This PR prepares the release for version 0.5.0-alpha with version update
and code style fixes:

- Updated version in Solution.props
- Updated changelog with closed-solved issues
- Updated README badges
@github-actions github-actions bot requested a review from marc-romu as a code owner July 29, 2025 20:19
@marc-romu marc-romu merged commit 9a73ca9 into main Jul 29, 2025
10 checks passed
@marc-romu marc-romu added this to the 0.5.0-alpha milestone Jul 30, 2025
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