Mistral FIM Completion
mistral_fim_completionCompletes code between a given prefix and suffix using Codestral, filling the gap at the cursor position to finish partial code.
Instructions
Fill-in-the-Middle code completion using Codestral.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "mistral_fim_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop | No | Stop sequences | |
| model | No | Model ID | codestral-latest |
| top_p | No | Top P | |
| prompt | Yes | Code before cursor | |
| suffix | No | Code after cursor | |
| max_tokens | No | Max tokens | |
| min_tokens | No | Min tokens | |
| random_seed | No | Random seed | |
| temperature | No | Temperature |