Skip to content

Commit dab6227

Browse files
v2.2 announcement
1 parent 7619403 commit dab6227

1 file changed

Lines changed: 200 additions & 0 deletions

File tree

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
---
2+
title: "Dev Proxy v2.2 with YAML config, detached mode, and OpenAI Responses API"
3+
description: "Dev Proxy v2.2 brings YAML configuration support, detached background mode, OpenAI Responses API support, structured JSON output, and major CLI improvements for agents and automation."
4+
date: 2026-03-05
5+
author: "Waldek Mastykarz, Garry Trinder"
6+
tags: ["release"]
7+
---
8+
9+
We're excited to announce the release of **Dev Proxy v2.2.0!** This is a big one. We've added first-class YAML configuration support, a detached mode for running Dev Proxy in the background, and rebuilt the CLI experience from the ground up for automation and AI agents.
10+
11+
### **In this version:**
12+
13+
- **YAML configuration** with anchors and merge keys for all config files
14+
- **Detached mode** - run Dev Proxy in the background with `--detach`
15+
- **Built for automation** - structured JSON output, TTY detection, proper exit codes, and more
16+
- **OpenAI Responses API** support across all OpenAI plugins
17+
- Improved error simulation and mocking
18+
- Bug fixes and polish
19+
20+
---
21+
22+
### **YAML configuration support**
23+
24+
Tired of wrestling with JSON commas and missing brackets? Dev Proxy now supports **YAML as a first-class alternative to JSON** for all configuration files - not just the main config, but also mocks, CRUD API definitions, error responses, rate limiting configs, and everything else.
25+
26+
Just use a `.yaml` or `.yml` extension, and Dev Proxy picks it up automatically. Your existing JSON configs continue to work unchanged.
27+
28+
The real power? **YAML anchors and merge keys**. Define reusable configuration blocks once and reference them everywhere:
29+
30+
```yaml
31+
throttled: &throttled
32+
statusCode: 429
33+
body: '{"error": "Too many requests"}'
34+
35+
mocks:
36+
- request:
37+
url: https://graph.microsoft.com/v1.0/users
38+
response:
39+
<<: *throttled
40+
- request:
41+
url: https://graph.microsoft.com/v1.0/groups
42+
response:
43+
<<: *throttled
44+
```
45+
46+
No more copying the same error response across dozens of mock entries. Define it once, reuse it everywhere.
47+
48+
You can also create new YAML configs from the start by naming your config file with a `.yaml` extension when running `devproxy config new my-config.yaml`.
49+
50+
---
51+
52+
### **Detached mode**
53+
54+
No more sacrificing a terminal window. The new `--detach` flag starts Dev Proxy as a background daemon:
55+
56+
```bash
57+
devproxy --detach
58+
```
59+
60+
Dev Proxy starts, writes its state to disk, and returns control to your terminal. Manage it with the new companion commands:
61+
62+
- `devproxy status` - check if Dev Proxy is running and see its configuration
63+
- `devproxy logs` - stream or read the daemon's output
64+
- `devproxy stop` - cleanly shut down the background instance
65+
66+
Whether you're running Dev Proxy alongside your development workflow or embedding it in a CI/CD pipeline, detached mode keeps it out of your way while staying fully controllable.
67+
68+
---
69+
70+
### **Built for automation**
71+
72+
This release makes Dev Proxy a first-class citizen for CI/CD pipelines and AI agents. We've made a series of changes that together transform how Dev Proxy works in automated environments.
73+
74+
#### **Structured JSON output**
75+
76+
The new `--output json` flag gives you machine-readable JSONL output across all commands:
77+
78+
```bash
79+
devproxy --output json
80+
devproxy outdated --output json
81+
devproxy config get --output json
82+
```
83+
84+
All output follows a consistent envelope format that agents can dispatch on via the `type` field:
85+
86+
```json
87+
{"type":"log","level":"info","message":"...","timestamp":"..."}
88+
{"type":"request","method":"GET","url":"...","timestamp":"..."}
89+
{"type":"result","data":{...},"timestamp":"..."}
90+
```
91+
92+
This replaces the previous `--log-for` flag with an industry-standard pattern used by CLIs like `az`, `gh`, and `kubectl`.
93+
94+
#### **Config validation**
95+
96+
The new `devproxy config validate` command lets you catch configuration errors before starting Dev Proxy:
97+
98+
```bash
99+
devproxy config validate
100+
devproxy config validate --config-file my-config.json
101+
```
102+
103+
No more starting Dev Proxy only to discover a typo in your config.
104+
105+
#### **CLI polish**
106+
107+
- **TTY detection** - Dev Proxy detects non-interactive terminals and skips interactive prompts, preventing agent hangs
108+
- **Exit codes** - exit code 2 for input errors, properly documented in help output
109+
- **NO_COLOR support** - respects `NO_COLOR`, `TERM=dumb`, and `--no-color` for clean log parsing
110+
- **--no-watch flag** - disables config file auto-restart, useful in CI/CD where config doesn't change
111+
- **Concrete examples** in all `--help` screens
112+
- **Compact error output** with improved error messages
113+
- **`devproxy api show`** command to display API endpoint information
114+
- **Suppressed startup noise** - filtered internal proxy library log messages that cluttered output
115+
116+
---
117+
118+
### **OpenAI Responses API support**
119+
120+
OpenAI recommends the [Responses API](https://platform.openai.com/docs/api-reference/responses) (`/v1/responses`) over Chat Completions for new projects. Dev Proxy now supports it across all OpenAI-related plugins:
121+
122+
- **OpenAIMockResponsePlugin** - mocks Responses API by converting to/from chat completion format
123+
- **OpenAITelemetryPlugin** - records telemetry for Responses API operations
124+
- **LanguageModelFailurePlugin** - injects fault prompts into Responses API requests
125+
- **LanguageModelRateLimitingPlugin** - tracks rate limits for Responses API calls
126+
127+
Whether your app uses the newer Responses API or the classic Chat Completions API, Dev Proxy has you covered.
128+
129+
---
130+
131+
### **Improved error simulation and mocking**
132+
133+
#### **Per-response retry-after values**
134+
135+
The **GenericRandomErrorPlugin** now supports the `@dynamic=N` syntax for `Retry-After` headers, letting you configure different retry-after values per response:
136+
137+
```json
138+
{
139+
"statusCode": 429,
140+
"headers": [
141+
{
142+
"name": "Retry-After",
143+
"value": "@dynamic=17"
144+
}
145+
]
146+
}
147+
```
148+
149+
This response uses 17 seconds for its `Retry-After` countdown, regardless of the plugin's global `retryAfterInSeconds` setting. The plain `@dynamic` token still works and falls back to the global config.
150+
151+
#### **Regex body matching in MockStdioResponsePlugin**
152+
153+
The **MockStdioResponsePlugin** now supports `bodyRegex` for regex-based request body matching, solving a common problem where string-contains matching (`bodyFragment`) could produce false positives - like `"initialized"` matching both the `initialized` method and `notifications/initialized`.
154+
155+
Use `bodyRegex` for precise matching and `bodyFragment` for simple contains matching. If both are specified, `bodyRegex` takes precedence.
156+
157+
---
158+
159+
### **Bug fixes and polish**
160+
161+
- Fixed emoji encoding in recorded `.har` files
162+
- Fixed response body decoding as UTF-8 when no charset specified in **DevToolsPlugin**
163+
- Graceful handling of permissions API errors in `UpdateUserScopesAsync`
164+
- Log actual API port when configured with port 0
165+
- Normalized enum names to lowercase in **GraphMinimalPermissionsPlugin** schema
166+
- Updated logo to use the official .NET brand color (`#512bd4`)
167+
168+
---
169+
170+
## Dev Proxy Toolkit
171+
172+
[Dev Proxy Toolkit](https://marketplace.visualstudio.com/items?itemName=garrytrinder.dev-proxy-toolkit) is an extension that makes it easier to work with Dev Proxy from within Visual Studio Code. Alongside the new release of Dev Proxy, we've also released a new version of the toolkit, v1.14.0.
173+
174+
In this version, we've:
175+
176+
- Added a "Start with Options..." command to launch Dev Proxy with interactive prompts for CLI settings
177+
- Added automated install and upgrade support for Linux
178+
- Added detection of outdated config files with schema version warnings
179+
- Added an "Upgrade Configs" command that uses Copilot Chat with Dev Proxy MCP tools
180+
- Added quick fixes for orphaned config sections (remove or link to a plugin)
181+
- Updated all JSON snippets to use v2.2.0 schemas
182+
- Fixed logging issues and improved diagnostics accuracy
183+
184+
Checkout out the [changelog](https://marketplace.visualstudio.com/items/garrytrinder.dev-proxy-toolkit/changelog) for more information on changes and bug fixes.
185+
186+
---
187+
188+
### **Why upgrade to v2.2.0?**
189+
190+
✅ **YAML-first config** - Write cleaner, more maintainable configs with anchors and merge keys
191+
✅ **Background mode** - Run Dev Proxy as a daemon without tying up a terminal
192+
✅ **Built for automation** - Structured JSON output, TTY detection, config validation, and proper exit codes
193+
✅ **OpenAI Responses API** - Test apps using OpenAI's recommended API
194+
✅ **Fine-grained error simulation** - Per-response retry-after values and regex body matching
195+
196+
### **Try it now**
197+
198+
Download **Dev Proxy v2.2.0** today and build better API-connected applications with confidence!
199+
200+
Got feedback or ideas? [Join us](https://github.com/dotnet/dev-proxy/discussions) and be part of the conversation.

0 commit comments

Comments
 (0)