This document describes how to call the MindLab Macaron model inference service on Alibaba Cloud Model Studio.
The features described in this document are available only in the Singapore region. To use the models, call them from the Singapore region.
Service activation
- Go to the Model Studio console, search for MindLab or Macaron, find the MindLab Macaron-series model card, and click Activate Now.
- In the dialog box, confirm the activation and authorization.
Quick start
MindLab provides the Macaron series models, including mindlab/macaron-v1-tall, mindlab/macaron-v1.1-venti, and mindlab/macaron-v1.1-coding-venti. Run the following code to quickly call mindlab/macaron-v1.1-venti in streaming mode.
You must have obtained an API Key and configured the API Key as an environment variable. If you call the model using an SDK, you must also install the SDK.
- OpenAI compatibility
- Anthropic compatibility
The
reasoning_effort parameter is not a standard OpenAI parameter. In the OpenAI Python SDK, you pass it in the extra_body. In the Node.js SDK, you pass it as a top-level parameter.- Python
- Node.js
Sample code
Thinking control
The Macaron series models are hybrid reasoning models. You can control the reasoning effort with the reasoning_effort parameter. Optional values: low, medium, high, xhigh, and max.
The thinking process is returned in the reasoning_content field. For mindlab/macaron-v1-tall, the thinking process is returned in the reasoning field.
For multi-turn conversations, set
preserve_thinking to true to pass the historical reasoning_content back to the model input.Parameter support
The following table lists the OpenAI-compatible parameters supported by the Macaron series models.
| Parameter | Description | Supported |
|---|---|---|
| model (string) | The model ID. | Yes |
| messages (array) | The conversation history between the user and the model. | Yes |
| stream (boolean) | Controls whether to use streaming output. | Yes |
| stream_options (object) | Configuration for streaming output (include_usage). | Yes |
| temperature (float) | Controls the randomness and diversity of the response. | Yes |
| top_p (float) | The probability threshold for nucleus sampling. | Yes |
| top_k (float) | The number of candidate tokens for sampling. | No |
| repetition_penalty (float) | The penalty for repetition in the generated sequence. | No |
| presence_penalty (float) | The penalty for the presence of tokens in the generated sequence. | No |
| response_format (object) | The format of the returned content (text, json_object, json_schema). | Yes |
| max_tokens (integer) | The maximum number of tokens that the model can generate. | Yes |
| n (integer) | The number of responses to generate (1-4). | Yes |
| enable_thinking (boolean) | Controls whether to enable thinking mode. | Yes |
| preserve_thinking (boolean) | Controls whether to pass the historical reasoning_content back to the model input. | Yes |
| thinking_budget (integer) | The maximum number of tokens for the thinking process. | Yes |
| reasoning_effort (string) | Controls the reasoning effort (low, medium, high, xhigh, max). | Yes |
| tool_stream (boolean) | Controls whether the tool_call arguments of Function Calling are returned in streaming mode. | No |
| enable_code_interpreter (boolean) | Controls whether to enable the code interpreter feature. | Yes |
| seed (integer) | The random seed for generation. | No |
| logprobs (boolean) | Controls whether to return the log probabilities of output tokens. | Yes |
| top_logprobs (integer) | The number of most likely candidate tokens to return (0-5). | Yes |
| stop (string or array) | Precise control over the content generation process. | Yes |
| tools (array) | The tools available for the model to call. | Yes |
| tool_choice (string or object) | The tool selection strategy (auto, none, specific). | Yes |
| parallel_tool_calls (boolean) | Controls whether to enable parallel tool calls. | No |
| enable_search (boolean) | Controls whether to use Internet search results for reference. | No |
| search_options (object) | The configuration for Internet search. | No |
| skill (object) | Enables specific generation skills, such as PPT generation. | No |
| instructions (string) | A field compatible with the OpenAI Responses API. | Yes |
Models and billing
The Macaron series models are provided by MindLab and are available only in the Singapore region (International deployment scope).
| Model ID | Context window | Model information |
|---|---|---|
mindlab/macaron-v1-tall | 256K | mindlab/macaron-v1-tall |
mindlab/macaron-v1.1-venti | 1M | mindlab/macaron-v1.1-venti |
mindlab/macaron-v1.1-coding-venti | 1M | mindlab/macaron-v1.1-coding-venti |
In thinking mode, the chain of thought is billed based on output tokens.