chore: bump openai (#2152)

Co-authored-by: Marcus Schiesser <mail@marcusschiesser.de>
This commit is contained in:
Alex Yang
2025-08-05 19:58:45 -07:00
committed by GitHub
parent db3f556cb4
commit b6409b6823
5 changed files with 36 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@llamaindex/openai": patch
---
chore: bump openai version
+1 -1
View File
@@ -40,6 +40,6 @@
"@llamaindex/env": "workspace:*"
},
"dependencies": {
"openai": "^4.102.0"
"openai": "^5.12.0"
}
}
+7 -1
View File
@@ -248,6 +248,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
private isResponseOutputTextAnnotationAddedEvent(
event: OpenAILLM.Responses.ResponseStreamEvent,
// @ts-expect-error type is broken
): event is OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent {
return event.type === "response.output_text.annotation.added";
}
@@ -304,6 +305,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
outputContent += part.text;
}
if (this.isAnnotationPresent(part)) {
// @ts-expect-error type is broken
options.annotations = part.annotations;
}
if (this.isRefusalPresent(part)) {
@@ -456,6 +458,7 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
}
private handleOutputTextAnnotationAddedEvent(
// @ts-expect-error type is broken
event: OpenAILLM.Responses.ResponseTextAnnotationDeltaEvent,
streamState: StreamState,
) {
@@ -580,7 +583,10 @@ export class OpenAIResponses extends ToolCallLLM<OpenAIResponsesChatOptions> {
delete baseRequestParams.tools;
}
if (!isTemperatureSupported(baseRequestParams.model))
if (
baseRequestParams.model &&
!isTemperatureSupported(baseRequestParams.model)
)
delete baseRequestParams.temperature;
if (stream) {
+3
View File
@@ -47,6 +47,9 @@ export const GPT4_MODELS = {
"gpt-4o-audio-preview-2024-10-01": {
contextWindow: 128000,
},
"gpt-4o-audio-preview-2025-06-03": {
contextWindow: 128000,
},
"gpt-4o-2024-11-20": {
contextWindow: 128000,
},
+20 -2
View File
@@ -1426,8 +1426,8 @@ importers:
packages/providers/openai:
dependencies:
openai:
specifier: ^4.102.0
version: 4.102.0(ws@8.18.1(bufferutil@4.0.9))(zod@3.25.76)
specifier: ^5.12.0
version: 5.12.0(ws@8.18.1(bufferutil@4.0.9))(zod@3.25.76)
devDependencies:
'@llamaindex/core':
specifier: workspace:*
@@ -11310,6 +11310,18 @@ packages:
zod:
optional: true
openai@5.12.0:
resolution: {integrity: sha512-vUdt02xiWgOHiYUmW0Hj1Qu9OKAiVQu5Bd547ktVCiMKC1BkB5L3ImeEnCyq3WpRKR6ZTaPgekzqdozwdPs7Lg==}
hasBin: true
peerDependencies:
ws: ^8.18.0
zod: ^3.23.8
peerDependenciesMeta:
ws:
optional: true
zod:
optional: true
openapi-fetch@0.9.8:
resolution: {integrity: sha512-zM6elH0EZStD/gSiNlcPrzXcVQ/pZo3BDvC6CDwRDUt1dDzxlshpmQnpD6cZaJ39THaSmwVCxxRrPKNM1hHrDg==}
@@ -25679,6 +25691,7 @@ snapshots:
zod: 3.25.76
transitivePeerDependencies:
- encoding
optional: true
openai@4.94.0(ws@8.18.1(bufferutil@4.0.9))(zod@3.25.76):
dependencies:
@@ -25695,6 +25708,11 @@ snapshots:
transitivePeerDependencies:
- encoding
openai@5.12.0(ws@8.18.1(bufferutil@4.0.9))(zod@3.25.76):
optionalDependencies:
ws: 8.18.1(bufferutil@4.0.9)
zod: 3.25.76
openapi-fetch@0.9.8:
dependencies:
openapi-typescript-helpers: 0.0.8