Context Mode and Azure AI Gateway
Your developers' coding agents fill their context with raw tool output, forget the project between sessions, and can run a command such as git push --force. Context Mode works on these three problems inside the coding agent's session. Azure AI Gateway governs the model and tool calls of your apps and agents. Context Mode Standard is $500 a month for the whole team, with a 99.9% uptime SLA.
Our test numbers on this page are from the published benchmarks. Every fact about Azure AI Gateway comes from a Microsoft page in Sources. Retrieved 2026-11-24.
What Context Mode does in the session
Context Mode is the control plane between coding agents and models. It is on the request path of Claude Code, Claude Desktop, Codex, Codex Desktop, T3 Code, OpenCode and Pi. Each test below ran the same agent two ways: connected direct to the model, and through Context Mode.
- Less context spent. Context Saving folds long tool output before the model reads it. Errors stay in full, and the rest goes to an archive the agent can search. A long agentic coding session on Claude Opus 5.5 went from $7.20 to $2.49 of model spend, 65.5% lower, and 168 paired runs on 10 shorter tasks went from $28.28 to $23.16. 155 of 168 paired runs had a lower cost. The cost figures are for Claude Code. See the benchmarks and Context Saving.
- An agent that remembers. Each developer has a private memory and a private archive of past sessions. Memory gives the agent the current facts of the project in every connected app, on any machine. In a long session on a 200K window, the agent gave the exact answer to 9 of 10 questions about early details, against 4 of 10 direct, and the session never compacted (the test). See Memory and Recall.
- Risky commands blocked before they run. The team sets its Protect rules once. Protect checks each tool call before the terminal runs it, and it reads through
sudo,sh -cand about 130 other wrappers. In Claude Code and Codex, a blocked command such asgit push --force,terraform destroyorrm -rf ~never runs, and the model is told why. A member's agent cannot loosen a team rule. See Protect. - Skills on every machine. Import skills from a GitHub repo once. The skill that matches the message loads in any agent, with no files to sync. See Skills.
- One plan, with an SLA. Standard is $500 a month for the whole team: any number of members and 10,000,000 requests in one pool. It has a 99.9% monthly uptime SLA on the gateway request path, with service credits: 10% of the month's fee below 99.9%, 25% below 99.0% and 50% below 95.0%. The admin claims a credit by email within 30 days. Extra requests stay off until the admin sets a monthly budget from $50 to $5,000, and then they are $0.75 per 1,000. In a 30-day month, the pool is 333,333 requests a day. For a team of 15 developers, that is 22,222 requests a day for each developer. The Free plan has 10,000 requests a month.
Your coding agents keep their own Anthropic or OpenAI account. Context Mode sits between the agent and that account.
Side by side
Microsoft made Azure AI Gateway generally available on 2026-11-17. Its facts below are from that announcement and from Microsoft Learn. Ours are on Pricing and in the benchmarks.
| Context Mode Standard | Azure AI Gateway | |
|---|---|---|
| Built for | Teams whose developers run coding agents every day | Platform teams that govern the models and tools of AI apps and agents |
| Where it acts | Inside each coding agent session, on the request path between the agent and the model | At the gateway endpoints that apps and agents call for models and MCP tools |
| Context and spend | Folds long tool output before the model reads it. A long session in Claude Code on Claude Opus 5.5 went from $7.20 to $2.49 of model spend, and 168 paired runs on 10 shorter tasks went from $28.28 to $23.16. | Token and request limits for each caller. Cost limits stop new requests when the estimated spend reaches a budget. |
| For each developer | Private memory and recall, and skills on every machine | A catalog of approved models and tools to find, test and connect |
| Risky actions | Protect blocks a shell command such as git push --force before it runs, in Claude Code and Codex, with one set of rules for the team | Curates and blocks MCP tools at the gateway. Azure AI Content Safety screens prompts and responses. |
| Records | The console shows what each request saved. The Protect log shows what agents tried and which rule answered. | The caller, the target, the tokens and the outcome of each model and tool call, exported over OpenTelemetry |
| Coding agents | On the request path of Claude Code, Codex, OpenCode, Pi and their desktop apps | A plugin for GitHub Copilot CLI, Claude Code, Cursor and Gemini CLI finds approved models and tools and connects your app |
| Model providers | Anthropic and OpenAI. The gateway forwards to api.anthropic.com, api.openai.com and chatgpt.com. | Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic, Amazon Bedrock, Google Vertex AI or any OpenAI-compatible endpoint |
| Uptime | 99.9% monthly uptime SLA, with service credits | A fully managed Azure service that scales with traffic, in 17 Azure regions |
| Price | $500 a month for the whole team | $500 a month for each gateway, charged by the hour. Paid billing starts 2027-01-01. |
| Included requests | 10,000,000 a month, one pool for the whole team | 10,000,000 a month for each gateway |
| Extra requests | Off until the admin sets a budget, then $0.75 per 1,000. In a 30-day month the pool is 333,333 requests a day: 22,222 a day for each developer in a team of 15. | $20 per 1,000,000 requests |
| Free tier | Free plan: 10,000 requests a month | 10,000 requests a month |
What Azure AI Gateway does
Azure AI Gateway is a managed gateway for AI traffic: requests to AI models and to Model Context Protocol (MCP) servers (overview). Apps and agents call the gateway. A platform team manages the connections, the access, the policies and the records in one place (concepts). It is a separate product from Azure API Management, in the same family (Microsoft's comparison).
- Routing. One gateway in front of Microsoft Foundry, Azure OpenAI, OpenAI, Anthropic, Amazon Bedrock, Google Vertex AI or any OpenAI-compatible endpoint. It routes by priority, weight or your own conditions, with failover.
- Limits. Token and request limits for each caller, and cost limits that stop new requests when the estimated spend reaches a budget.
- Safety and tools. Azure AI Content Safety screens prompts and responses. The gateway brings MCP servers, OpenAPI specs and connectors behind one endpoint, and the platform team curates and blocks tools there.
- Records. It records the caller, the target, the tokens and the outcome of each model and tool call, and exports them over OpenTelemetry.
- Coding agents. A plugin for GitHub Copilot CLI, Claude Code, Cursor and Gemini CLI finds approved models and tools and connects your app (Microsoft Learn).
- Price. 10,000 requests a month are free. Above that, a gateway is $500 a month with 10,000,000 requests, then $20 per 1,000,000 requests.
Which one to choose
- Choose Context Mode when your developers write code with coding agents every day, and you want sessions that spend less context, agents that remember the project, and one set of command rules that every member's agent follows. You get one bill, one pool of requests and a 99.9% uptime SLA.
- Use Azure AI Gateway when a platform team needs one point of control for the model and MCP traffic of many apps and agents: routing across providers, limits, content safety and records.
Keep Azure AI Gateway for your applications. Connect your coding agents to Context Mode.
Compliance documents and the security questionnaire: on request, through Talk to us. See also how we handle your data.
The next step: start Standard in the console and invite your team. npx @context-mode/cli signs each developer in and connects their agents.
Sources
Retrieved 2026-11-24. Each line names the page and what we took from it.
- Azure AI Gateway is now generally available. The general availability date, the price, the free requests, the day paid billing starts, the regions and the feature list.
- What's new in Azure API Management at Microsoft Ignite 2026. The launch in the Microsoft Ignite 2026 summary.
- What is AI Gateway?. A managed gateway for AI traffic: requests to AI models and to Model Context Protocol (MCP) servers.
- AI Gateway concepts. Apps and agents call gateway endpoints. Platform teams manage the connections, access, policies and records.
- Move AI workloads to AI Gateway. How to move AI APIs from Azure API Management, and the coding agents the plugin runs in.
- Region availability and scalability. The regions where you can create a gateway. Scaling is automatic.
- Use model router with AI Gateway. Model router from Microsoft Foundry ranks the models behind one alias for each request.
- AI Gateway and Azure API Management service. AI Gateway and Azure API Management are two products in one family, with different scopes.
- Azure API Management pricing. The price page of the product family. On the day we read it, its AI Gateway tier section said that pricing details are coming soon.
If a fact here is out of date, tell us and we fix it.