DeepSeek fill-in-the-middle
deepseek_fimComplete code between a prompt and suffix to fill function bodies or finish partial blocks for inline code completion; returns only the completion, with no chat commentary.
Instructions
Fill-in-the-middle completion against the DeepSeek beta endpoint. Give the code before the cursor as prompt and the code after it as suffix; the model writes the middle. This is the right tool for inline code completion, filling a function body, or finishing a partial block - it is not a chat call and returns no commentary.
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": "deepseek_fim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| echo | No | Echo the prompt back with the completion. | |
| stop | No | ||
| extra | No | ||
| model | No | Defaults to deepseek-chat. | |
| top_p | No | ||
| prompt | Yes | Code before the insertion point. | |
| stream | No | ||
| suffix | No | Code after the insertion point. Omit for a plain continuation. | |
| logprobs | No | 0-20 log probabilities per token. | |
| max_tokens | No | Max tokens to generate. | |
| timeout_ms | No | ||
| temperature | No | ||
| raw_response | No |