Skip to content

[BUG] Google models (Imagen, Nano Banana) fail due to steps parameter default value #1

@timoncool

Description

@timoncool

Description

Google provider models (Imagen 3/4, Nano Banana, Nano Banana 2) return an API error when called via imageInference because the steps parameter is always sent, even though these models do not support it.

Error

Error: Unsupported use of 'steps' parameter. This parameter is not supported for the selected model.

Root Cause

In runware_mcp_server.py, line 92:

steps: Optional[int] = 20,

The default value of 20 means steps is always included in the API request. Since optional_params filters by if value is not None (line 255), a default of 20 will never be None, so it's always sent to the API.

Google models (google:1@1, google:1@2, google:2@1, google:2@2, google:2@3, google:4@1, google:4@2, google:4@3) do not support the steps parameter and reject the request.

Affected Models

All models listed under https://runware.ai/docs/providers/google

Fix

Change the default from 20 to None:

# Before
steps: Optional[int] = 20,

# After
steps: Optional[int] = None,

This way steps will only be sent when explicitly provided by the user, and Google models will work correctly. Non-Google models will use their own server-side defaults.

The same issue may apply to the photoMaker function (line 299) which also has steps: Optional[int] = 20.

Environment

  • MCP-Runware from main branch
  • Claude Desktop / Claude Code
  • Tested with models: google:4@1, google:4@3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions