Feature request: `response_format` support for MiniMax M2.5 via OpenAI-compatible API

Open
#4 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
json
Domain
api

Research direction

The issue names the OpenAI-compatible POST /v1/chat/completions endpoint and response_format, but no repository files or tests. Start by locating the endpoint implementation and its model capability handling, then check how json_object and json_schema are validated for other models. Done means M2.5 returns valid JSON for json_object and follows the supplied schema for json_schema, with the supported behavior documented.

Written by the indexing model from the issue text.

Description

Summary

MiniMax M2.5 does not support response_format (neither json_object nor json_schema) via the OpenAI-compatible chat completions endpoint. The native API documentation explicitly states this feature is "only supported by MiniMax-Text-01". This makes M2.5 unsuitable for production workloads that require structured JSON output.

Current behaviour

When sending response_format: { "type": "json_object" } to POST /v1/chat/completions with M2.5:

  • The parameter is silently ignored. No error or warning is returned.
  • The model generates free-form text that may contain JSON, but is not constrained to valid JSON.
    Additionally, when relying on prompt-based JSON instructions (the only available workaround), M2.5 frequently produces structurally malformed JSON. We observed a recurring defect across multiple production runs: the model drops the opening { brace for object elements inside arrays:
// Expected:
[{title: SEO Improvement, score: 8}, {title: Content Gap, score: 6}]
// Actual M2.5 output:
[{title: SEO Improvement, score: 8}, title: Content Gap, score: 6}]

This occurred consistently with schemas containing 10+ fields with nested objects and arrays. We had to implement a context-aware JSON repair function to work around this, which adds complexity and is inherently fragile.

Expected behaviour

response_format should be supported for M2.5 via the OpenAI-compatible API:

  1. { "type": "json_object" } should constrain output to syntactically valid JSON
  2. { "type": "json_schema", "json_schema": { "schema": ... } } should constrain output to JSON matching the provided schema
    If full json_schema mode is not feasible for M2.5, json_object mode alone would be a significant improvement; it would guarantee valid JSON syntax even without schema conformance.
Documentation gap

The OpenAI-compatible API documentation page does not mention response_format at all; it is absent from the supported parameters table and not listed among the "ignored" parameters either. The only documentation of response_format is in the native API spec, which states it is MiniMax-Text-01 only.
A clear compatibility matrix (per model, per API flavour) would help developers evaluate MiniMax models before committing to integration.

Impact

We evaluated M2.5 for a production AI pipeline processing 12 agents with structured output requirements. Despite M2.5's strong raw capabilities (204K context, competitive pricing), we abandoned it after 2 production runs due to the combination of:

  1. No response_format support (silent ignore)
  2. Consistent malformed JSON output from prompt-based workarounds
  3. Error 2013 ("invalid chat setting") when using multiple system messages (which blocked one workaround path for schema injection)
    We switched to OpenAI GPT-5-nano with native response_format support (json_schema mode with strict: true), which works reliably.
Questions
  1. Is there a roadmap for adding response_format to M2.5 via the OpenAI-compatible API?
  2. Is the malformed JSON issue (dropped opening braces) a known model-level problem?
  3. Would the MiniMax team consider adding response_format to the OpenAI-compatible endpoint for M2.5, even if only json_object mode?
Dominant language
No language data
Stars
588
Forks
83
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MiniMax-AI/MiniMax-M2.5

All issues in MiniMax-AI/MiniMax-M2.5

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.