microsoft/phi-4-miniOpen WeightsCompact Microsoft instruction model tuned for efficient coding assistance, reasoning, and low-latency agent tasks
TECHNICAL SPECIFICATIONS
MODEL CONTEXT PROTOCOL (MCP) READINESS
✓ Phi-4-mini natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.
MCP Context Window Recommendations
With a context capacity of 128,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.
STANDARDIZED BENCHMARKS & EVALS
API CALL INVOCATION EXAMPLE
// Example: Calling Phi-4-mini via OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.MICROSOFT_API_KEY,
});
const response = await client.chat.completions.create({
model: "microsoft/phi-4-mini",
messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});
console.log(response.choices[0].message.content);PRICING BY PROVIDER
Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.
This model supports prompt caching at $0.09 / 1M tokens, saving up to 50% on repetitive MCP tool definitions and system instructions.
MODEL RESOURCES
More Models by Microsoft
Alternative and family models from the same lab
Microsoft coding model with native vision support, optimized for fast and efficient software development
Microsoft coding model built for fast, efficient assistance in everyday developer workflows
Compact Microsoft multimodal model for text, image, and speech understanding