mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
[Fix] UI - Fixed Label for vLLM in Model Create Flow (#16285)
* Fixed Label for vLLM * Make vLLM api key not required
This commit is contained in:
parent
2541a54023
commit
f1191578ae
3 changed files with 22 additions and 4 deletions
|
|
@ -44,4 +44,22 @@ describe("ProviderSpecificFields", () => {
|
|||
expect(apiKeyLabel).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
it("should render the provider specific fields for vLLM", async () => {
|
||||
const { getByLabelText, getByPlaceholderText } = render(
|
||||
<Form>
|
||||
<ProviderSpecificFields selectedProvider={"Hosted_Vllm" as Providers} />
|
||||
</Form>,
|
||||
);
|
||||
|
||||
await waitFor(() => {
|
||||
const apiBaseInput = getByPlaceholderText("https://...");
|
||||
expect(apiBaseInput).toBeInTheDocument();
|
||||
expect(apiBaseInput).toHaveAttribute("type", "text");
|
||||
|
||||
// Check for API Key field
|
||||
const apiKeyLabel = getByLabelText("vLLM API Key");
|
||||
expect(apiKeyLabel).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -507,9 +507,9 @@ const PROVIDER_CREDENTIAL_FIELDS: Record<Providers, ProviderCredentialField[]> =
|
|||
},
|
||||
{
|
||||
key: "api_key",
|
||||
label: "OpenAI API Key",
|
||||
label: "vLLM API Key",
|
||||
type: "password",
|
||||
required: true,
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
[Providers.Voyage]: [
|
||||
|
|
@ -581,7 +581,7 @@ const PROVIDER_CREDENTIAL_FIELDS: Record<Providers, ProviderCredentialField[]> =
|
|||
label: "API Key",
|
||||
type: "password",
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ interface GenerateCodeParams {
|
|||
selectedVectorStores: string[];
|
||||
selectedGuardrails: string[];
|
||||
selectedMCPTools: string[];
|
||||
selectedVoice: string;
|
||||
selectedVoice?: string;
|
||||
endpointType: string;
|
||||
selectedModel: string | undefined;
|
||||
selectedSdk: "openai" | "azure";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue