Skip to content

Commit 45d44e4

Browse files
committed
🤖 Fix TypeScript types for truncation parameter
Extended OpenAIResponsesProviderOptions type to include the truncation parameter since the SDK types don't yet include it, but it's supported by the OpenAI Responses API. _Generated with `cmux`_
1 parent 96ffc5d commit 45d44e4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/utils/ai/providerOptions.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,20 @@ import { ANTHROPIC_THINKING_BUDGETS, OPENAI_REASONING_EFFORT } from "@/types/thi
1111
import { log } from "@/services/log";
1212
import type { CmuxMessage } from "@/types/message";
1313

14+
/**
15+
* Extended OpenAI Responses provider options to include truncation
16+
* The SDK types don't yet include this parameter, but it's supported by the API
17+
*/
18+
type ExtendedOpenAIResponsesProviderOptions = OpenAIResponsesProviderOptions & {
19+
truncation?: "auto" | "disabled";
20+
};
21+
1422
/**
1523
* Provider-specific options structure for AI SDK
1624
*/
1725
type ProviderOptions =
1826
| { anthropic: AnthropicProviderOptions }
19-
| { openai: OpenAIResponsesProviderOptions }
27+
| { openai: ExtendedOpenAIResponsesProviderOptions }
2028
| Record<string, never>; // Empty object for unsupported providers
2129

2230
/**

0 commit comments

Comments
 (0)