Skip to content

Commit 49f316d

Browse files
chitalianclaude
andauthored
Add GPT 5.2 for Azure BYOK without PTB (#5540)
* feat: add gpt-5.2 Azure BYOK endpoint with PTB disabled Add Azure endpoint for gpt-5.2 model with ptbEnabled set to false, allowing BYOK (Bring Your Own Key) usage without Pay-The-Bill. * test: update registry snapshots for gpt-5.2 Azure endpoint * fix: update Jest snapshot header link for compatibility --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a71b46d commit 49f316d

File tree

2 files changed

+84
-3
lines changed

2 files changed

+84
-3
lines changed

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

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5142,6 +5142,29 @@ exports[`Registry Snapshots endpoint configurations snapshot 1`] = `
51425142
"*",
51435143
],
51445144
},
5145+
"gpt-5.2:azure": {
5146+
"context": 400000,
5147+
"crossRegion": false,
5148+
"maxTokens": 128000,
5149+
"modelId": "gpt-5.2",
5150+
"parameters": [
5151+
"logprobs",
5152+
"max_completion_tokens",
5153+
"response_format",
5154+
"seed",
5155+
"stop",
5156+
"temperature",
5157+
"tool_choice",
5158+
"tools",
5159+
"top_p",
5160+
"verbosity",
5161+
],
5162+
"provider": "azure",
5163+
"ptbEnabled": false,
5164+
"regions": [
5165+
"*",
5166+
],
5167+
},
51455168
"gpt-5.2:openai": {
51465169
"context": 400000,
51475170
"crossRegion": false,
@@ -6687,6 +6710,7 @@ exports[`Registry Snapshots model coverage snapshot 1`] = `
66876710
"openrouter",
66886711
],
66896712
"openai/gpt-5.2": [
6713+
"azure",
66906714
"openai",
66916715
"openai",
66926716
"openai",
@@ -8388,6 +8412,17 @@ exports[`Registry Snapshots pricing snapshot 1`] = `
83888412
],
83898413
},
83908414
"openai/gpt-5.2": {
8415+
"azure": [
8416+
{
8417+
"cacheMultipliers": {
8418+
"cachedInput": 0.1,
8419+
},
8420+
"input": 0.00000175,
8421+
"output": 0.000014,
8422+
"threshold": 0,
8423+
"web_search": 0.01,
8424+
},
8425+
],
83918426
"openai": [
83928427
{
83938428
"cacheMultipliers": {
@@ -9074,6 +9109,7 @@ exports[`Registry Snapshots verify registry state 1`] = `
90749109
{
90759110
"model": "gpt-5.2",
90769111
"providers": [
9112+
"azure",
90779113
"openai",
90789114
"openrouter",
90799115
],
@@ -9439,7 +9475,7 @@ exports[`Registry Snapshots verify registry state 1`] = `
94399475
"provider": "anthropic",
94409476
},
94419477
{
9442-
"modelCount": 15,
9478+
"modelCount": 16,
94439479
"provider": "azure",
94449480
},
94459481
{
@@ -9630,8 +9666,8 @@ exports[`Registry Snapshots verify registry state 1`] = `
96309666
"claude-3.5-haiku:anthropic:*",
96319667
],
96329668
"totalArchivedConfigs": 0,
9633-
"totalEndpoints": 290,
9634-
"totalModelProviderConfigs": 290,
9669+
"totalEndpoints": 291,
9670+
"totalModelProviderConfigs": 291,
96359671
"totalModelsWithPtb": 100,
96369672
"totalProviders": 21,
96379673
}

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

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,51 @@ export const endpoints = {
253253
"*": {},
254254
},
255255
},
256+
"gpt-5.2:azure": {
257+
provider: "azure",
258+
author: "openai",
259+
providerModelId: "gpt-5.2",
260+
pricing: [
261+
{
262+
threshold: 0,
263+
input: 0.00000175, // $1.75 per 1M tokens
264+
output: 0.000014, // $14.00 per 1M tokens
265+
web_search: 0.01, // $10 per 1000 searches (1:1 USD; 10/1K)
266+
cacheMultipliers: {
267+
cachedInput: 0.1, // $0.175 per 1M tokens
268+
},
269+
},
270+
],
271+
contextLength: 400000,
272+
maxCompletionTokens: 128000,
273+
rateLimits: {
274+
rpm: 50,
275+
tpm: 100000,
276+
},
277+
supportedParameters: [
278+
"tools",
279+
"tool_choice",
280+
"seed",
281+
"max_completion_tokens",
282+
"response_format",
283+
"stop",
284+
"verbosity",
285+
"temperature",
286+
"top_p",
287+
"logprobs",
288+
],
289+
unsupportedParameters: [
290+
"presence_penalty",
291+
"frequency_penalty",
292+
"top_logprobs",
293+
"logit_bias",
294+
"max_tokens",
295+
],
296+
ptbEnabled: false,
297+
endpointConfigs: {
298+
"*": {},
299+
},
300+
},
256301
} satisfies Partial<
257302
Record<`${GPT52ModelName}:${ModelProviderName}`, ModelProviderConfig>
258303
>;

0 commit comments

Comments
 (0)