Skip to content

Commit 7730c6f

Browse files
OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes #9225) (#9231)
openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes #9225
1 parent 4e6cdad commit 7730c6f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/types/src/providers/openai.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export const openAiNativeModels = {
1616
outputPrice: 10.0,
1717
cacheReadsPrice: 0.13,
1818
description: "GPT-5 Chat Latest: Optimized for conversational AI and non-reasoning tasks",
19-
supportsVerbosity: true,
2019
},
2120
"gpt-5-2025-08-07": {
2221
maxTokens: 128000,

src/api/providers/openai-native.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
216216
// Unlike Chat Completions, system/developer roles in input have no special semantics here.
217217
// The official way to set system behavior is the top-level `instructions` field.
218218
instructions: systemPrompt,
219-
include: ["reasoning.encrypted_content"],
219+
// Only include encrypted reasoning content when reasoning effort is set
220+
...(reasoningEffort ? { include: ["reasoning.encrypted_content"] } : {}),
220221
...(reasoningEffort
221222
? {
222223
reasoning: {
@@ -1098,7 +1099,8 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
10981099
],
10991100
stream: false, // Non-streaming for completePrompt
11001101
store: false, // Don't store prompt completions
1101-
include: ["reasoning.encrypted_content"],
1102+
// Only include encrypted reasoning content when reasoning effort is set
1103+
...(reasoningEffort ? { include: ["reasoning.encrypted_content"] } : {}),
11021104
}
11031105

11041106
// Include service tier if selected and supported

0 commit comments

Comments
 (0)