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