Skip to content

Commit 1f5a182

Browse files
committed
fix: address review feedback - differentiate duplicate model definitions and add error handling
1 parent 2e0e70f commit 1f5a182

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/types/src/providers/openai.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const openAiNativeModels = {
2828
inputPrice: 1.25,
2929
outputPrice: 10.0,
3030
cacheReadsPrice: 0.13,
31-
description: "GPT-5: The best model for coding and agentic tasks across domains",
31+
description: "GPT-5 (2025-08-07): Latest snapshot of GPT-5 model",
3232
// supportsVerbosity is a new capability; ensure ModelInfo includes it
3333
supportsVerbosity: true,
3434
// GPT-5 supports Responses API reasoning summaries
@@ -64,7 +64,7 @@ export const openAiNativeModels = {
6464
inputPrice: 0.25,
6565
outputPrice: 2.0,
6666
cacheReadsPrice: 0.03,
67-
description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks",
67+
description: "GPT-5 Mini (2025-08-07): Latest snapshot of GPT-5 Mini model",
6868
supportsVerbosity: true,
6969
// GPT-5 supports Responses API reasoning summaries
7070
supportsReasoningSummary: true,
@@ -98,7 +98,7 @@ export const openAiNativeModels = {
9898
inputPrice: 0.05,
9999
outputPrice: 0.4,
100100
cacheReadsPrice: 0.01,
101-
description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5",
101+
description: "GPT-5 Nano (2025-08-07): Latest snapshot of GPT-5 Nano model",
102102
supportsVerbosity: true,
103103
// GPT-5 supports Responses API reasoning summaries
104104
supportsReasoningSummary: true,

src/api/providers/openai-native.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ export class OpenAiNativeHandler extends BaseProvider implements SingleCompletio
132132

133133
// Defensive guard: if prev-id is present, we should never send more than one input item.
134134
if (Array.isArray(newMessages) && newMessages.length !== 1) {
135+
console.warn(
136+
`Warning: When using previous_response_id, only one input item should be sent. Got ${newMessages.length} items.`,
137+
)
135138
}
136139

137140
requestBody.input =

0 commit comments

Comments
 (0)