(UI) - allow assigning wildcard models to a team / key (#8041)

* fix message.error

* fix add return_wildcard_routes

* ui edit modelAvailableCall

* fetchAvailableModelsForTeamOrKey

* ui set all models for a team

* ui define common helpers

* edit create key button

* fix viewing model display names

* fix editing team models

* update gitignore

* add jest testing for ui

* Revert "add jest testing for ui"

This reverts commit 98f9a3ebfd.
This commit is contained in:
Ishaan Jaff 2025-01-27 18:06:22 -08:00 committed by GitHub
parent 3a4f5b23b5
commit 7f2742334c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 142 additions and 41 deletions

View file

@ -1318,7 +1318,8 @@ export const modelExceptionsCall = async (
export const modelAvailableCall = async (
accessToken: String,
userID: String,
userRole: String
userRole: String,
return_wildcard_routes: boolean = false
) => {
/**
* Get all the models user has access to
@ -1326,6 +1327,9 @@ export const modelAvailableCall = async (
console.log("in /models calls, globalLitellmHeaderName", globalLitellmHeaderName)
try {
let url = proxyBaseUrl ? `${proxyBaseUrl}/models` : `/models`;
if (return_wildcard_routes === true) {
url += `?return_wildcard_routes=True`;
}
//message.info("Requesting model data");
const response = await fetch(url, {