[openrouter] meta/muse-spark-1.3-contributor with thinking=max → 400 invalid_request_error from Meta (works on high)
Summary
Using OpenRouter model `meta/muse-spark-1.3-contributor` with thinking level `max` fails immediately with a 400 from the downstream Meta provider. Switching to `high` works.
Repro
- Provider: `openrouter`
- Model: `meta/muse-spark-1.3-contributor`
- Thinking level: `max` (via `/thinking` or `--thinking max` / `--model ...:max`)
- Send any prompt
Actual
``` Error: 400: {"message":"Provider returned error","code":400,"metadata":{"raw":"{"error":{"code":null,"message":"The request contains invalid parameters. Check the request body for any errors or inconsistencies.","param":null,"type":"invalid_request_error"}}","provider_name":"Meta","is_byok":false}} {"error":{"code":null,"message":"The request contains invalid parameters. Check the request body for any errors or inconsistencies.","param":null,"type":"invalid_request_error"}} ```
Expected
Either `max` should be hidden/clamped for this model (like the older Muse Spark entries), or `max` should map to a value Meta accepts.
Analysis (from local catalog, pi 0.85.1)
Built-in `openrouter.json` entry:
```json { "id": "meta/muse-spark-1.3-contributor", "reasoning": true, "thinkingLevelMap": { "off": null, "minimal": "minimal", "low": "low", "medium": "medium", "high": "high", "xhigh": "xhigh", "max": "max" }, "compat": { "supportsDeveloperRole": false, "thinkingFormat": "openrouter" } } ```
So pi sends `reasoning: { effort: "max" }` via OpenRouter, which forwards to Meta (`provider_name":"Meta"`), and Meta rejects it with `invalid_request_error`.
Notably, older entries in the same catalog correctly disable `max`:
- `meta/muse-spark-1.1`: `"max": null`
- `meta/muse-spark-1.2`: `"max": null`
- `meta/muse-spark-1.2-contributor`: `"max": null`
While `meta/muse-spark-1.3` and `meta/muse-spark-1.3-contributor` both advertise `"max": "max"`.
Env
- pi: 0.85.1
- provider: openrouter
- model: meta/muse-spark-1.3-contributor
- works: high / fails: max
Thanks!
Source: earendil-works/pi