mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix: add model validation on Playground
This commit is contained in:
parent
f6ed80028d
commit
4ec6a827b4
1 changed files with 13 additions and 2 deletions
|
|
@ -748,8 +748,19 @@ const ChatUI: React.FC<ChatUIProps> = ({
|
|||
return;
|
||||
}
|
||||
|
||||
// Require model selection for Responses API
|
||||
if (endpointType === EndpointType.RESPONSES && !selectedModel) {
|
||||
// Require model selection for all model-based endpoints
|
||||
const modelRequiredEndpoints = [
|
||||
EndpointType.CHAT,
|
||||
EndpointType.IMAGE,
|
||||
EndpointType.SPEECH,
|
||||
EndpointType.IMAGE_EDITS,
|
||||
EndpointType.RESPONSES,
|
||||
EndpointType.ANTHROPIC_MESSAGES,
|
||||
EndpointType.EMBEDDINGS,
|
||||
EndpointType.TRANSCRIPTION,
|
||||
];
|
||||
|
||||
if (modelRequiredEndpoints.includes(endpointType as EndpointType) && !selectedModel) {
|
||||
NotificationsManager.fromBackend("Please select a model before sending a request");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue