Codestral fill-in-the-middle completion
codestral_fimFill in missing code between a given prefix and suffix. Use for editor autocomplete, code patching, or structured refactors where boundaries are specified.
Instructions
Fill-in-the-middle code completion with Codestral.
Given prompt (code preceding the cursor) and suffix (code after the cursor),
Codestral writes the middle. Use for editor autocomplete scenarios, code-patching
agents, or structured refactors where you know the target boundaries.
Default stop tokens: [] — let the model decide. Override with stop if needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Code preceding the cursor. | |
| suffix | Yes | Code after the cursor. Can be empty string. | |
| model | No | ||
| stop | No | ||
| temperature | No | ||
| max_tokens | No | ||
| top_p | No | ||
| seed | No | Random seed for deterministic sampling. Maps to Mistral's `random_seed`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| model | Yes | ||
| finish_reason | No | ||
| usage | No |