Skip to content

Commit 3476d4b

Browse files
committed
integrate gpt-5-mini with azure provider
1 parent 3cfba13 commit 3476d4b

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed

packages/__tests__/cost/__snapshots__/registrySnapshots.test.ts.snap

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2850,6 +2850,25 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = `
28502850
"*",
28512851
],
28522852
},
2853+
"gpt-5-mini:azure": {
2854+
"context": 400000,
2855+
"crossRegion": false,
2856+
"maxTokens": 128000,
2857+
"modelId": "gpt-5-mini",
2858+
"parameters": [
2859+
"max_tokens",
2860+
"response_format",
2861+
"seed",
2862+
"structured_outputs",
2863+
"tool_choice",
2864+
"tools",
2865+
],
2866+
"provider": "azure",
2867+
"ptbEnabled": true,
2868+
"regions": [
2869+
"*",
2870+
],
2871+
},
28532872
"gpt-5-mini:openai": {
28542873
"context": 400000,
28552874
"crossRegion": false,
@@ -4081,6 +4100,7 @@ exports[`Registry Snapshots model coverage snapshot 1`] = `
40814100
"openrouter",
40824101
],
40834102
"openai/gpt-5": [
4103+
"azure",
40844104
"openai",
40854105
"openai",
40864106
"openai",
@@ -5031,6 +5051,16 @@ exports[`Registry Snapshots pricing snapshot 1`] = `
50315051
],
50325052
},
50335053
"openai/gpt-5": {
5054+
"azure": [
5055+
{
5056+
"cacheMultipliers": {
5057+
"cachedInput": 0.12,
5058+
},
5059+
"input": 2.5e-7,
5060+
"output": 0.000002,
5061+
"threshold": 0,
5062+
},
5063+
],
50345064
"openai": [
50355065
{
50365066
"cacheMultipliers": {
@@ -5434,6 +5464,7 @@ exports[`Registry Snapshots verify registry state 1`] = `
54345464
{
54355465
"model": "gpt-5-mini",
54365466
"providers": [
5467+
"azure",
54375468
"helicone",
54385469
"openai",
54395470
"openrouter",
@@ -5722,7 +5753,7 @@ exports[`Registry Snapshots verify registry state 1`] = `
57225753
"provider": "anthropic",
57235754
},
57245755
{
5725-
"modelCount": 7,
5756+
"modelCount": 8,
57265757
"provider": "azure",
57275758
},
57285759
{
@@ -5860,8 +5891,8 @@ exports[`Registry Snapshots verify registry state 1`] = `
58605891
"claude-3.5-haiku:openrouter:*",
58615892
],
58625893
"totalArchivedConfigs": 0,
5863-
"totalEndpoints": 168,
5864-
"totalModelProviderConfigs": 168,
5894+
"totalEndpoints": 169,
5895+
"totalModelProviderConfigs": 169,
58655896
"totalModelsWithPtb": 71,
58665897
"totalProviders": 15,
58675898
}

packages/__tests__/cost/providers/azure.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe("AzureOpenAIProvider", () => {
160160
const url = provider.buildUrl(ptbEndpoint, { isStreaming: false });
161161

162162
expect(url).toBe(
163-
"https://helicone-gateway.cognitiveservices.azure.com/openai/deployments/test-deployment/chat/completions?api-version=2025-01-01-preview"
163+
"https://east1-gateway-resource.cognitiveservices.azure.com/openai/deployments/test-deployment/chat/completions?api-version=2025-01-01-preview"
164164
);
165165
});
166166

packages/cost/models/authors/openai/gpt-5/endpoints.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,35 @@ export const endpoints = {
8181
"*": {},
8282
},
8383
},
84+
"gpt-5-mini:azure": {
85+
providerModelId: "gpt-5-mini",
86+
provider: "azure",
87+
author: "openai",
88+
pricing: [
89+
{
90+
threshold: 0,
91+
input: 0.00000025,
92+
output: 0.000002,
93+
cacheMultipliers: {
94+
cachedInput: 0.12,
95+
},
96+
},
97+
],
98+
contextLength: 400000,
99+
maxCompletionTokens: 128000,
100+
supportedParameters: [
101+
"tools",
102+
"tool_choice",
103+
"seed",
104+
"max_tokens",
105+
"response_format",
106+
"structured_outputs"
107+
],
108+
ptbEnabled: true,
109+
endpointConfigs: {
110+
"*": {},
111+
},
112+
},
84113
"gpt-5-nano:openai": {
85114
providerModelId: "gpt-5-nano",
86115
provider: "openai",

packages/cost/models/providers/azure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class AzureOpenAIProvider extends BaseProvider {
2323
const baseUri =
2424
endpoint.userConfig.baseUri ||
2525
(endpoint.ptbEnabled
26-
? "https://helicone-gateway.cognitiveservices.azure.com"
26+
? "https://east1-gateway-resource.cognitiveservices.azure.com/"
2727
: null);
2828

2929
if (!baseUri) {

0 commit comments

Comments
 (0)