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
Description
Google provider models (Imagen 3/4, Nano Banana, Nano Banana 2) return an API error when called via
imageInferencebecause thestepsparameter is always sent, even though these models do not support it.Error
Root Cause
In
runware_mcp_server.py, line 92:The default value of
20meansstepsis always included in the API request. Sinceoptional_paramsfilters byif value is not None(line 255), a default of20will never beNone, 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 thestepsparameter and reject the request.Affected Models
All models listed under https://runware.ai/docs/providers/google
Fix
Change the default from
20toNone:This way
stepswill 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
photoMakerfunction (line 299) which also hassteps: Optional[int] = 20.Environment
mainbranchgoogle:4@1,google:4@3