Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

> **Note**: odd version numbers, for example, `0.13.0`, are not included in this changelog. They are used to test the new features and fixes before the final release.

## [0.23.4] - Unreleased
## [0.23.5] - Unreleased

### Added:

- Support for using Dev Proxy Beta with commands
- Command: `dev-proxy-toolkit.discover-urls-to-watch` - Start Dev Proxy in discovery mode
- Snippets: Added `devproxy-plugin-openai-telemetry` - OpenAITelemetryPlugin instance
- Snippets: Added `devproxy-plugin-openai-telemetry-config` - OpenAITelemetryPlugin config section
- Snippets: Added `devproxy-plugin-prices-file` - OpenAITelemetryPlugin telemetry prices file
- Snippets: Added `devproxy-plugin-price` - OpenAITelemetryPlugin telemetry model price

### Changed:

Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Shown when the active document is a Dev Proxy configuration file

### Snippets

| Prefix | Description |
| ------ | ----------- |
| Prefix | Description |
| ------ | ----------- |
| `devproxy-config-file` | Dev Proxy config file |
Expand All @@ -78,6 +80,8 @@ Shown when the active document is a Dev Proxy configuration file
| `devproxy-mocks-file` | Dev Proxy mocks file |
| `devproxy-mocks-file-schema` | Dev Proxy mocks file schema |
| `devproxy-mock` | Dev Proxy mock |
| `devproxy-prices-file` | Dev Proxy prices file |
| `devproxy-price` | Dev Proxy price |
| `devproxy-request` | Dev Proxy request |
| `devproxy-response` | Dev Proxy response |
| `devproxy-response-header` | Dev Proxy response header |
Expand Down Expand Up @@ -139,6 +143,8 @@ Shown when the active document is a Dev Proxy configuration file
| `devproxy-plugin-odata-paging-guidance` | ODataPagingGuidancePlugin instance |
| `devproxy-plugin-graph-odsp-search-guidance` | ODSPSearchGuidancePlugin instance |
| `devproxy-plugin-openai-mock-response` | OpenAIMockResponsePlugin instance |
| `devproxy-plugin-openai-telemetry` | OpenAITelemetryPlugin instance |
| `devproxy-plugin-openai-telemetry-config` | OpenAITelemetryPlugin config section |
| `devproxy-plugin-open-api-spec-generator` | OpenApiSpecGeneratorPlugin instance |
| `devproxy-plugin-open-api-spec-generator-config` | OpenApiSpecGeneratorPlugin config section |
| `devproxy-plugin-rate-limiting` | MockResponsePlugin instance |
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dev-proxy-toolkit",
"displayName": "Dev Proxy Toolkit",
"description": "Makes it easy to create and update Dev Proxy configuration files.",
"version": "0.23.4",
"version": "0.23.5",
"publisher": "garrytrinder",
"engines": {
"vscode": "^1.89.0"
Expand Down
11 changes: 11 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ export const pluginSnippets: PluginSnippets = {
OpenAIMockResponsePlugin: {
instance: 'devproxy-plugin-openai-mock-response',
},
OpenAITelemetryPlugin: {
instance: 'devproxy-plugin-openai-telemetry',
config: {
name: 'devproxy-plugin-openai-telemetry-config',
required: true,
}
},
OpenApiSpecGeneratorPlugin: {
instance: 'devproxy-plugin-open-api-spec-generator',
config: {
Expand Down Expand Up @@ -323,6 +330,10 @@ export const pluginDocs: PluginDocs = {
name: 'OpenAI Mock Response Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/openaimockresponseplugin',
},
OpenAITelemetryPlugin: {
name: 'OpenAI Telemetry Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/openaitelemetryplugin',
},
OpenApiSpecGeneratorPlugin: {
name: 'Open API Spec Generator Plugin',
url: 'https://learn.microsoft.com/microsoft-cloud/dev/dev-proxy/technical-reference/openapispecgeneratorplugin',
Expand Down
46 changes: 46 additions & 0 deletions src/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,28 @@
],
"description": "Dev Proxy mock"
},
"PricesFile": {
"prefix": "devproxy-prices-file",
"body": [
"{",
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.28.0/openaitelemetryplugin.pricesfile.schema.json\",",
"\t\"prices\": {",
"\t\t$1",
"\t}",
"}"
],
"description": "Dev Proxy prices file"
},
"Price": {
"prefix": "devproxy-price",
"body": [
"\"gpt-4\": {",
"\t\"input\": 0.03,",
"\t\"output\": 0.06",
"}"
],
"description": "Dev Proxy price"
},
"Request": {
"prefix": "devproxy-request",
"body": [
Expand Down Expand Up @@ -855,6 +877,30 @@
],
"description": "OpenAIMockResponsePlugin instance"
},
"OpenAITelemetryPlugin": {
"prefix": "devproxy-plugin-openai-telemetry",
"body": [
"{",
"\t\"name\": \"OpenAITelemetryPlugin\",",
"\t\"enabled\": true,",
"\t\"pluginPath\": \"~appFolder/plugins/dev-proxy-plugins.dll\",",
"\t\"configSection\": \"openAITelemetryPlugin\"",
"}"
],
"description": "OpenAITelemetryPlugin instance"
},
"OpenAITelemetryPluginConfig": {
"prefix": "devproxy-plugin-openai-telemetry-config",
"body": [
"\"openAITelemetryPlugin\": {",
"\t\"\\$schema\": \"https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v0.28.0/openaitelemetryplugin.schema.json\",",
"\t\"application\": \"My app\",",
"\t\"includeCosts\": true,",
"\t\"pricesFile\": \"prices.json\"",
"}"
],
"description": "OpenAITelemetryPlugin config section"
},
"OpenApiSpecGeneratorPlugin": {
"prefix": "devproxy-plugin-open-api-spec-generator",
"body": [
Expand Down
Empty file added src/test/examples/prices.json
Empty file.