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
This commit is contained in:
Hannes Rudolph 2025-11-13 07:29:31 -07:00 • committed by GitHub
parent 4e6cdad052
commit 7730c6f862
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -16,7 +16,6 @@ export const openAiNativeModels = {
outputPrice: 10.0,
cacheReadsPrice: 0.13,
description: "GPT-5 Chat Latest: Optimized for conversational AI and non-reasoning tasks",
supportsVerbosity: true,
},
"gpt-5-2025-08-07": {
maxTokens: 128000,

View file

@ -216,7 +216,8 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
// Unlike Chat Completions, system/developer roles in input have no special semantics here.
// The official way to set system behavior is the top-level `instructions` field.
instructions: systemPrompt,
include: ["reasoning.encrypted_content"],
// Only include encrypted reasoning content when reasoning effort is set
...(reasoningEffort ? { include: ["reasoning.encrypted_content"] } : {}),
...(reasoningEffort
? {
reasoning: {
@ -1098,7 +1099,8 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
],
stream: false, // Non-streaming for completePrompt
store: false, // Don't store prompt completions
include: ["reasoning.encrypted_content"],
// Only include encrypted reasoning content when reasoning effort is set
...(reasoningEffort ? { include: ["reasoning.encrypted_content"] } : {}),
}
// Include service tier if selected and supported