Add support for GPT-5 models to SAP AI Core Provider (#5428)

* add gpt-5 models

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

* add changeset

* remove max_tokens & temperature

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>

---------

Signed-off-by: tjandy98 <3953059+tjandy98@users.noreply.github.com>
This commit is contained in:
tjandy98 authored and GitHub committed 2025-08-08 10:16:45 -07:00
1 parent a8971b807a
commit 5ed4319d21
3 files changed
+41 -2

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": minor
---
Add support for GPT-5 models to SAP AI Core Provider
+15 -2
View File
@@ -142,7 +142,20 @@ export class SapAiCoreHandler implements ApiHandler {
"anthropic--claude-3-opus",
]
const openAIModels = ["gpt-4o", "gpt-4", "gpt-4o-mini", "o1", "gpt-4.1", "gpt-4.1-nano", "o3-mini", "o3", "o4-mini"]
const openAIModels = [
"gpt-4o",
"gpt-4",
"gpt-4o-mini",
"o1",
"gpt-4.1",
"gpt-4.1-nano",
"gpt-5",
"gpt-5-nano",
"gpt-5-mini",
"o3-mini",
"o3",
"o4-mini",
]
const geminiModels = ["gemini-2.5-flash", "gemini-2.5-pro"]
@@ -191,7 +204,7 @@ export class SapAiCoreHandler implements ApiHandler {
stream_options: { include_usage: true },
}
if (["o1", "o3-mini", "o3", "o4-mini"].includes(model.id)) {
if (["o1", "o3-mini", "o3", "o4-mini", "gpt-5", "gpt-5-nano", "gpt-5-mini"].includes(model.id)) {
delete payload.max_tokens
delete payload.temperature
}
+21
View File
@@ -2879,6 +2879,27 @@ export const sapAiCoreModels = {
supportsPromptCache: true,
description: sapAiCoreModelDescription,
},
"gpt-5": {
maxTokens: 128_000,
contextWindow: 272_000,
supportsImages: true,
supportsPromptCache: true,
description: sapAiCoreModelDescription,
},
"gpt-5-nano": {
maxTokens: 128_000,
contextWindow: 272_000,
supportsImages: true,
supportsPromptCache: true,
description: sapAiCoreModelDescription,
},
"gpt-5-mini": {
maxTokens: 128_000,
contextWindow: 272_000,
supportsImages: true,
supportsPromptCache: true,
description: sapAiCoreModelDescription,
},
o1: {
maxTokens: 4096,
contextWindow: 200_000,