Skip to content
Bug Barometer
All issues
Solution in Progress

MuleSoft / API Manager

LLM Gateway Gemini policy requires /models in the incoming request path, which breaks upstreams that already include /models

Reported
Nov 25, 2026
Updated
Nov 25, 2026
Fixed
—
Reports
0
Found in
—
Reference
W-24992245

Summary

Newly created Model Proxies that use the Gemini endpoint format now parse incoming requests so the gateway can generate metrics, monitoring and cost management data. The gateway expects the incoming URL to follow the form /<base-path>/models/{model}:{action}. If /models is added in the upstream URL instead of the incoming request, the request is rejected with HTTP 400. Older Gemini proxies passed requests through without this validation, so they are not affected.

Workaround

Add two DataWeave Headers Transformation policies around the LLM policies on the affected proxy:

  1. Before the LLM policies, add a policy that adds /models to the incoming path.
  2. After the LLM policies, add a policy that removes /models from the path, to avoid a duplicated /models/models in the upstream request.

Alternatively, send /models/{model}:{action} in the incoming request and remove /models from the upstream URL.

Steps to reproduce

  1. Create a Model Proxy with the Gemini endpoint format and a route to a Gemini model.
  2. Configure the upstream URL to include /models, so that incoming requests do not include /models.
  3. Deploy the proxy and create a client contract to obtain credentials.
  4. Send a native Gemini request, for example POST https://<gateway>/<proxy>/<model>:generateContent, with a contents/role/parts body.
  5. The request fails with HTTP 400.


Error details

HTTP 400: {"error": "Failed to parse model from request: Missing 'model' field in request"}

Status timeline

  1. Nov 30, 2026

    created · Solution in Progress · 0 reports

  2. Nov 30, 2026

    content changed · Solution in Progress · 0 reports

Official known-issue pageSuggest a workaround

LLM Gateway Gemini policy requires /models in the incoming request path, which breaks upstreams that already include /models · Bug Barometer