Skip to content

[2] WIP - Stabileo AI multimodal build flow with Claude and image inputs#46

Closed
Batuis wants to merge 2 commits intopr/2-next-product-iterationfrom
pr/3-ai-build-from-images-and-claude
Closed

[2] WIP - Stabileo AI multimodal build flow with Claude and image inputs#46
Batuis wants to merge 2 commits intopr/2-next-product-iterationfrom
pr/3-ai-build-from-images-and-claude

Conversation

@Batuis
Copy link
Copy Markdown
Collaborator

@Batuis Batuis commented Apr 3, 2026

Summary

Adds multimodal image support to the Stabileo AI build workflow. Users can attach reference images in the PRO AI drawer, which are sent through the backend to Claude for vision-assisted structural model generation.

Stacked on PR #45 ([1]).

Changes

Backend (Rust)

  • Provider traits: New ImageAttachment struct (base64 data + media_type) added to AiRequest
  • Claude provider: Sends multimodal content blocks (image + text) to the Anthropic Messages API when images are attached. Falls back to text-only when no images present.
  • Build-model capability: BuildModelRequest accepts optional images array, forwarded to the provider as ImageAttachment list
  • Other capabilities (review, explain, interpret): Updated with empty images field for compilation

Frontend (Svelte/TypeScript)

  • AiDrawer: Paperclip (📎) button opens file picker for image upload. Thumbnails preview with remove button. Images cleared after send.
  • client.ts: buildModel accepts optional ImageAttachmentInput[] parameter, included in POST body when present
  • Send button: Enabled when either text or images are present (was text-only before)

Drawer overlap fix

  • Moved <AiDrawer /> rendering inside the pro-body-row flex container so it sits beside the viewport in PRO mode instead of stacking below it and overlapping the status bar

Scope and limitations

  • Image support is Claude-only for now — other providers (OpenAI, DeepSeek, etc.) receive the images field but ignore it
  • No changes to the system prompt or tool definitions for offshore/industrial structures yet — that's a follow-up
  • The existing text-only AI build path is unchanged and still works
  • No new tests added (the AI build tests require API keys)

Not included / deferred

  • System prompt improvements for offshore/industrial geometry
  • Image support for non-Claude providers
  • Image persistence in conversation history
  • Image compression/resizing before upload

Batuis added 2 commits April 3, 2026 20:36
Backend:
- Add ImageAttachment type to provider traits (data + media_type)
- Claude provider sends multimodal content blocks (image + text) to Anthropic API
- BuildModelRequest accepts optional images array
- All capabilities updated with images field on AiRequest

Frontend:
- AiDrawer: image upload button (📎) with file picker, thumbnail preview, remove
- client.ts: buildModel accepts optional images parameter
- Images sent as base64 in request body, cleared after send

Drawer fix:
- Move AiDrawer inside pro-body-row flex container so it sits beside
  the viewport instead of below it (fixes overlap with status bar)

Image support is Claude-only for now (other providers ignore the images field).
Frontend: when running on localhost without VITE_AI_API_KEY, auto-use
'dev' token instead of hard-failing. Non-localhost (production) still
requires explicit VITE_AI_API_KEY.

Backend: DEDALIANO_API_KEY defaults to 'dev' with a warning when not
set, instead of panicking. CORS defaults now include localhost:4000.

Both sides agree on the 'dev' token for zero-config local development.
@Batuis Batuis changed the title [2] AI build from reference images (Claude multimodal) [2] WIP - Stabileo AI multimodal build flow with Claude and image inputs Apr 4, 2026
@Batuis
Copy link
Copy Markdown
Collaborator Author

Batuis commented Apr 7, 2026

Closing: AI multimodal restructuring deferred. Continuing product work in a new stacked PR.

@Batuis Batuis closed this Apr 7, 2026
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.

1 participant