Skip to content

Expose and forward img-forge params: aspect_ratio, image_size, model #47

@stackbilt-admin

Description

@stackbilt-admin

Problem

Downstream consumers connecting through stackbilt-mcp-gateway do not see newly exposed img-forge generation params (aspect_ratio, image_size, model) even after reconnects.

img-forge is already updated/deployed, but the consumer-facing tool schema appears stale and/or wrapper forwarding is incomplete at the gateway layer.

Why this matters

Tarot/deck workflows require deterministic portrait generation and model control:

  • aspect_ratio: "2:3"
  • image_size: "2K"
  • model: "gemini-3-pro-image-preview" (or tier ultra_plus)

Without explicit schema + pass-through, clients silently default to square outputs and can’t reliably use the intended Gemini path.

Required Fix (Gateway-side)

1) Tool schema exposure

Update the generate_image (or equivalent proxied img-forge tool) schema in stackbilt-mcp-gateway to expose:

  • aspect_ratio: enum
    • 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
  • image_size: enum
    • 512, 1K, 2K, 4K
  • model: enum
    • gemini-3.1-flash-image-preview
    • gemini-3-pro-image-preview

Keep existing fields unchanged (prompt, quality_tier, negative_prompt, seed, etc.).

2) Request forwarding

Ensure all three fields are forwarded unchanged to img-forge /v2/generate:

  • aspect_ratio
  • image_size
  • model

No local remapping that drops/overwrites them.

3) Tier/model quota correctness

If model is set, map it to effective tier for quota/audit consistency:

  • gemini-3.1-flash-image-preview -> ultra
  • gemini-3-pro-image-preview -> ultra_plus

4) Tool list refresh behavior

If gateway caches upstream tool definitions:

  • invalidate/rebuild cache on deploy
  • emit notifications/tools/list_changed when schema changes

Acceptance Criteria

  • New MCP session to stackbilt-mcp-gateway shows tool args including aspect_ratio, image_size, model.
  • Tool call with:
    • quality_tier: "ultra_plus"
    • aspect_ratio: "2:3"
    • image_size: "2K"
    • model: "gemini-3-pro-image-preview"
      succeeds and reaches img-forge unchanged.
  • Audit/quota reflects ultra_plus when model=gemini-3-pro-image-preview.
  • Reconnect-only and fresh-add client paths both receive updated schema.

Validation Checklist

  • tools/list at gateway includes new properties
  • one smoke generation call with 2:3 + 2K + gemini-3-pro-image-preview
  • verify downstream consumer sees updated schema without manual JSON hacks
  • verify no regressions for existing clients using only quality_tier

Context

img-forge MCP + gateway are already deployed with support for these params. The missing link is the Stackbilder-facing MCP gateway schema/forwarding path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingseverity:mediumMedium severity — real but contained impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions