mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
(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:
parent
3a4f5b23b5
commit
7f2742334c
9 changed files with 142 additions and 41 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue