openclaw - ✅(Solved) Fix [Bug]: MiniMax TTS: API returns 2013 error — gateway sends float values where API requires integers [3 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#62144Fetched 2026-04-08 03:08:25
View on GitHub
Comments
2
Participants
2
Timeline
8
Reactions
0
Timeline (top)
cross-referenced ×3commented ×2labeled ×2referenced ×1

Error Message

{ "model": "speech-2.8-hd", "text": "Good morning Robert...", "stream": false, "output_format": "url", "voice_setting": { "voice_id": "English_expressive_narrator", "speed": 1.0, ← float, causes 2013 error "vol": 1.0, ← float, causes 2013 error "pitch": 0.0 ← float, causes 2013 error } }

Steps to reproduce

  1. Configure minimax as TTS provider in OpenClaw messages.tts.
  2. Attempt TTS via the message tool or tts tool call.
  3. Observe no audio returned; error: "MiniMax TTS API returned no audio data".

Expected behavior

MiniMax TTS API returns audio. Direct curl with integer values for speed/vol/pitch returns audio URL successfully.

Actual behavior

API returns HTTP 200 with {"base_resp":{"status_code":2013,"status_msg":"invalid params, Mismatch type int64 with value null"}}. No audio data.

OpenClaw version

2026.4.5 (3e72c03)

Operating system

Linux (Raspberry Pi OS / arm64)

Install method

npm install / openclaw-updater

Model

minimax-portal/MiniMax-M2.7 (text), minimax/speech-2.8-hd (TTS)

Provider / routing chain

openclaw -> minimax TTS API

Additional provider/model setup details

messages.tts.provider: "minimax" messages.tts.providers.minimax.baseUrl: "https://api.minimax.io/v1" messages.tts.providers.minimax.model: "speech-2.8-hd"

Logs, screenshots, and evidence

Root Cause

OpenClaw's minimax TTS provider sends float values for speed, vol, and pitch in the voice_setting object. The MiniMax TTS API requires these to be integers.

Fix Action

Fixed

PR fix notes

PR #62161: fix(minimax): add TTS speech provider with integer coercion for voice_setting params

Description (problem / solution / changelog)

Summary

Fixes #62144

  • Adds a new MiniMax TTS speech provider plugin (extensions/minimax/tts.ts + speech-provider.ts) that calls the MiniMax t2a_v2 endpoint.
  • Coerces speed, vol, and pitch in voice_setting to integers via Math.trunc() before sending to the API, preventing the 2013 ("invalid params, Mismatch type int64 with value null") error.
  • Registers the provider in extensions/minimax/index.ts so messages.tts.provider: "minimax" is now a valid configuration.

Root cause

There was no MiniMax speech provider registered in the plugin system. Users configuring messages.tts.provider: "minimax" would get a "no provider registered" skip, resulting in no audio output. The MiniMax TTS API (/v1/t2a_v2) requires pitch as an integer and empirically rejects float representations of speed and vol (even though the OpenAPI spec types them as float).

What changed

FileChange
extensions/minimax/tts.tsNew: MiniMax TTS API client with Math.trunc() integer coercion, hex-decoded audio response handling, and MiniMax-specific error parsing
extensions/minimax/speech-provider.tsNew: SpeechProviderPlugin implementation with config resolution, directive parsing, and synthesis
extensions/minimax/tts.test.tsNew: 10 tests covering integer coercion, truncation behavior, error handling, and request format
extensions/minimax/index.tsRegisters the speech provider via api.registerSpeechProvider()
extensions/minimax/api.tsExports the new speech provider and TTS helpers

Test plan

  • npx vitest run extensions/minimax/tts.test.ts — 10/10 passing
  • npx vitest run src/plugins/contracts/tts.contract.test.ts — 40/40 passing
  • npx vitest run src/plugins/contracts/plugin-registration.contract.test.ts — 54/54 passing
  • Manual verification with MiniMax API key (requires active MiniMax account)

Joel Nishanth · offlyn.AI

Made with Cursor

Changed files

  • extensions/minimax/api.ts (modified, +7/-0)
  • extensions/minimax/index.ts (modified, +2/-0)
  • extensions/minimax/speech-provider.ts (added, +272/-0)
  • extensions/minimax/tts.test.ts (added, +266/-0)
  • extensions/minimax/tts.ts (added, +194/-0)

PR #62220: Fix: cast speed/vol/pitch to integers for MiniMax TTS API (Resolves #62144)

Description (problem / solution / changelog)

Fixes #62144.

The MiniMax TTS API (/v1/t2a_v2) requires speed, vol, and pitch in voice_setting to be integers. OpenClaw was sending float defaults (1.0, 0.0) which caused a 2013 "invalid params" error and no audio output.

Apply Math.round() to all three values in minimaxTTS() right before the API call so user-configured floats are coerced to the integers the API expects.

Changed files

  • extensions/minimax/speech-provider.test.ts (modified, +11/-2)
  • extensions/minimax/speech-provider.ts (modified, +7/-1)
  • extensions/minimax/tts.ts (modified, +3/-3)

PR #62221: fix(minimax): integer voice_setting fields for TTS t2a_v2

Description (problem / solution / changelog)

Summary

  • Problem: MiniMax t2a_v2 rejects voice_setting.speed, vol, and pitch when serialized as JSON floats (for example 1.0), returning base_resp status 2013. Same values as integers work (#62144).
  • What changed: Round speed, vol, pitch, and sample_rate to integers before building the JSON body in extensions/minimax/tts.ts. Updated speech provider tests.

Change Type

  • Bug fix

Scope

  • Integrations

Linked Issue

  • Closes #62144

Security Impact

  • No new permissions, secrets, network surfaces, or execution changes beyond existing TTS request shape.

Verification

  • pnpm test -- extensions/minimax/speech-provider.test.ts

Compatibility

  • Backward compatible: request values are rounded to nearest integer; behavior matches API expectations.

Changed files

  • extensions/minimax/speech-provider.test.ts (modified, +5/-1)
  • extensions/minimax/tts.ts (modified, +9/-4)

Code Example

{
  "model": "speech-2.8-hd",
  "text": "Good morning Robert...",
  "stream": false,
  "output_format": "url",
  "voice_setting": {
    "voice_id": "English_expressive_narrator",
    "speed": 1.0,    ← float, causes 2013 error
    "vol": 1.0,       ← float, causes 2013 error
    "pitch": 0.0      ← float, causes 2013 error
  }
}


### Steps to reproduce

1. Configure minimax as TTS provider in OpenClaw messages.tts.
2. Attempt TTS via the message tool or tts tool call.
3. Observe no audio returned; error: "MiniMax TTS API returned no audio data".


### Expected behavior

MiniMax TTS API returns audio. Direct curl with integer values for speed/vol/pitch returns audio URL successfully.


### Actual behavior

API returns HTTP 200 with {"base_resp":{"status_code":2013,"status_msg":"invalid params, Mismatch type int64 with value null"}}. No audio data.


### OpenClaw version

2026.4.5 (3e72c03)

### Operating system

Linux (Raspberry Pi OS / arm64)

### Install method

npm install / openclaw-updater

### Model

minimax-portal/MiniMax-M2.7 (text), minimax/speech-2.8-hd (TTS)

### Provider / routing chain

openclaw -> minimax TTS API

### Additional provider/model setup details

messages.tts.provider: "minimax"
messages.tts.providers.minimax.baseUrl: "https://api.minimax.io/v1"
messages.tts.providers.minimax.model: "speech-2.8-hd"


### Logs, screenshots, and evidence
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Environment

Problem

MiniMax TTS API returns HTTP 200 with {"base_resp":{"status_code":2013,"status_msg":"invalid params, Mismatch type int64 with value null"}} — no audio returned.

Root Cause

OpenClaw's minimax TTS provider sends float values for speed, vol, and pitch in the voice_setting object. The MiniMax TTS API requires these to be integers.

Failing Request (from gateway)

{
  "model": "speech-2.8-hd",
  "text": "Good morning Robert...",
  "stream": false,
  "output_format": "url",
  "voice_setting": {
    "voice_id": "English_expressive_narrator",
    "speed": 1.0,    ← float, causes 2013 error
    "vol": 1.0,       ← float, causes 2013 error
    "pitch": 0.0      ← float, causes 2013 error
  }
}


### Steps to reproduce

1. Configure minimax as TTS provider in OpenClaw messages.tts.
2. Attempt TTS via the message tool or tts tool call.
3. Observe no audio returned; error: "MiniMax TTS API returned no audio data".


### Expected behavior

MiniMax TTS API returns audio. Direct curl with integer values for speed/vol/pitch returns audio URL successfully.


### Actual behavior

API returns HTTP 200 with {"base_resp":{"status_code":2013,"status_msg":"invalid params, Mismatch type int64 with value null"}}. No audio data.


### OpenClaw version

2026.4.5 (3e72c03)

### Operating system

Linux (Raspberry Pi OS / arm64)

### Install method

npm install / openclaw-updater

### Model

minimax-portal/MiniMax-M2.7 (text), minimax/speech-2.8-hd (TTS)

### Provider / routing chain

openclaw -> minimax TTS API

### Additional provider/model setup details

messages.tts.provider: "minimax"
messages.tts.providers.minimax.baseUrl: "https://api.minimax.io/v1"
messages.tts.providers.minimax.model: "speech-2.8-hd"


### Logs, screenshots, and evidence

```shell
# Working curl (integers — returns audio URL):
curl -X POST "https://api.minimax.io/v1/t2a_v2" \
  -H "Authorization: Bearer <KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "speech-2.8-hd",
    "text": "Test",
    "stream": false,
    "output_format": "url",
    "voice_setting": {
      "voice_id": "English_expressive_narrator",
      "speed": 1,
      "vol": 1,
      "pitch": 0
    }
  }'
# Returns: {"data":{"audio":"https://minimax-algeng-chat-tts-us..."}}

# Failing (floats — returns 2013):
# Same request with speed: 1.0, vol: 1.0, pitch: 0.0
# Returns: {"base_resp":{"status_code":2013,"status_msg":"invalid params..."}}

Impact and severity

Affected: All users relying on MiniMax TTS for voice output (Amplavia-Pilot, Lore agents). Severity: High — TTS completely broken for MiniMax provider. Frequency: Always (100% failure rate). Consequence: No voice output; must fall back to OpenAI/ElevenLabs or wait for fix.

Additional information

Last known good: unknown (TTS never worked with Minimax in this setup). Fix: Cast speed/vol/pitch to integers in the minimax TTS provider before sending to API.

extent analysis

TL;DR

Cast speed, vol, and pitch to integers in the voice_setting object before sending the request to the MiniMax TTS API.

Guidance

  1. Verify the API requirements: Confirm that the MiniMax TTS API indeed requires speed, vol, and pitch to be integers.
  2. Update the OpenClaw minimax TTS provider: Modify the code to cast the speed, vol, and pitch values to integers before constructing the API request.
  3. Test with modified request: Use a tool like curl to test the modified request with integer values for speed, vol, and pitch to ensure it returns the expected audio URL.
  4. Implement the fix in OpenClaw: Apply the necessary code changes to the OpenClaw minimax TTS provider to cast the values to integers, and verify that TTS works as expected.

Example

"voice_setting": {
  "voice_id": "English_expressive_narrator",
  "speed": 1,  // Cast to integer
  "vol": 1,    // Cast to integer
  "pitch": 0   // Cast to integer
}

Notes

This fix assumes that the issue is solely due to the data type mismatch between the OpenClaw minimax TTS provider and the MiniMax TTS API. If the issue persists after applying this fix, further investigation may be necessary.

Recommendation

Apply the workaround by casting speed, vol, and pitch to integers in the voice_setting object, as this directly addresses the identified root cause of the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

MiniMax TTS API returns audio. Direct curl with integer values for speed/vol/pitch returns audio URL successfully.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING