From 2863d64602a0e8a21915690618c6d044ddd3ebfa Mon Sep 17 00:00:00 2001 From: Roland Tannous Date: Tue, 12 May 2026 09:55:24 +0400 Subject: [PATCH] studio/chat: relax presence_penalty to optional on OpenAIChatCompletionsRequest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 1fbf445a — chat-adapter now omits presence_penalty for providers that do not accept it (Anthropic / DeepSeek), but the request type still required it as a non-optional number, breaking tsc. The backend pydantic model already defaults presence_penalty to 0, so making it optional client-side matches reality. --- studio/frontend/src/features/chat/types/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/studio/frontend/src/features/chat/types/api.ts b/studio/frontend/src/features/chat/types/api.ts index 228cbb62ab..97fa39065a 100644 --- a/studio/frontend/src/features/chat/types/api.ts +++ b/studio/frontend/src/features/chat/types/api.ts @@ -196,7 +196,7 @@ export interface OpenAIChatCompletionsRequest { top_k?: number; min_p?: number; repetition_penalty?: number; - presence_penalty: number; + presence_penalty?: number; image_base64?: string; audio_base64?: string; use_adapter?: boolean | string | null;