fix(ui): use non-streaming method for endpoint v1/a2a/message/send in… (#19025)

* Add end to end integration tests for batches

* Add end to end integration tests for batches

* Add end to end integration tests for batches

* Fix linter errors: remove unused imports and variables

* Add end to end integration tests for batches

* Add end to end integration tests for batches

* Add end to end integration tests for batches

* Add end to end integration tests for batches

* chore: document temporary grype ignore for CVE-2019-1010022

* chore: add config option

* chore: add ALLOWED_CVES

* refetch after key create

* test: remove flaky azure oidc embedding test

* fixing build

* bump: version 1.80.15 → 1.80.16

* [Fix] MSFT SSO - allow setting custom MSFT Base URLs (#18977)

* fix TestCustomMicrosoftSSO

* init CustomMicrosoftSSO

* use CustomMicrosoftSSO

* docs fix

* docs fix

* [Feat] UI Feedback Form - why LiteLLM  (#18999)

* init survey prompt

* init survey modal

* init Survey Modal

* POST feedback hook

* survey Modal

* add other

* in product survey fixes

* fix survey prompt

* fix survey

* fix build

* ui new build

* [Feat] MSFT SSO - allow overriding env var attribute names  (#18998)

* add MSFT SSO constants

* fix MSFT SSO env vars

* test_microsoft_sso_handler_openid_from_response_with_custom_attributes

* Add pricing of azure_ai/claude-opus-4-5

* test: temporarily disable flaky responses_id_security tests

* fix(ui): use non-streaming method for endpoint v1/a2a/message/send in A2A playground

'

---------

Co-authored-by: Ephrim Stanley <ephrim.stanley@point72.com>
Co-authored-by: Yuta Saito <uc4w6c@bma.biglobe.ne.jp>
Co-authored-by: yuneng-jiang <yuneng.jiang@gmail.com>
Co-authored-by: YutaSaito <36355491+uc4w6c@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
This commit is contained in:
houdataali
2026-01-14 03:29:10 +05:30
committed by GitHub
co-authored by Ephrim Stanley Yuta Saito yuneng-jiang YutaSaito Ishaan Jaff Sameer Kankute
parent 181c626d83
commit cbb72045a3
195 changed files with 1424 additions and 277 deletions
+3
View File
@@ -0,0 +1,3 @@
ignore:
- vulnerability: CVE-2019-1010022
reason: no fixed glibc package is available yet in the Wolfi repositories, so this is ignored temporarily until an upstream release exists
+7 -2
View File
@@ -101,12 +101,12 @@ run_grype_scans() {
# Build and scan Dockerfile.database
echo "Building and scanning Dockerfile.database..."
docker build --no-cache -t litellm-database:latest -f ./docker/Dockerfile.database .
grype litellm-database:latest --fail-on critical
grype litellm-database:latest --config ci_cd/.grype.yaml --fail-on critical
# Build and scan main Dockerfile
echo "Building and scanning main Dockerfile..."
docker build --no-cache -t litellm:latest .
grype litellm:latest --fail-on critical
grype litellm:latest --config ci_cd/.grype.yaml --fail-on critical
# Restore original .dockerignore
echo "Restoring original .dockerignore..."
@@ -129,6 +129,11 @@ run_grype_scans() {
"CVE-2025-13836" # Python 3.13 HTTP response reading OOM/DoS - no fix available in base image
"CVE-2025-12084" # Python 3.13 xml.dom.minidom quadratic algorithm - no fix available in base image
"CVE-2025-60876" # BusyBox wget HTTP request splitting - no fix available in Chainguard Wolfi base image
"CVE-2010-4756" # glibc glob DoS - awaiting patched Wolfi glibc build
"CVE-2019-1010022" # glibc stack guard bypass - awaiting patched Wolfi glibc build
"CVE-2019-1010023" # glibc ldd remap issue - awaiting patched Wolfi glibc build
"CVE-2019-1010024" # glibc ASLR mitigation bypass - awaiting patched Wolfi glibc build
"CVE-2019-1010025" # glibc pthread heap address leak - awaiting patched Wolfi glibc build
)
# Build JSON array of allowlisted CVE IDs for jq
+50 -1
View File
@@ -73,8 +73,21 @@ GOOGLE_CLIENT_SECRET=
```shell
MICROSOFT_CLIENT_ID="84583a4d-"
MICROSOFT_CLIENT_SECRET="nbk8Q~"
MICROSOFT_TENANT="5a39737
MICROSOFT_TENANT="5a39737"
```
**Optional: Custom Microsoft SSO Endpoints**
If you need to use custom Microsoft SSO endpoints (e.g., for a custom identity provider, sovereign cloud, or proxy), you can override the default endpoints:
```shell
MICROSOFT_AUTHORIZATION_ENDPOINT="https://your-custom-url.com/oauth2/v2.0/authorize"
MICROSOFT_TOKEN_ENDPOINT="https://your-custom-url.com/oauth2/v2.0/token"
MICROSOFT_USERINFO_ENDPOINT="https://your-custom-graph-api.com/v1.0/me"
```
If these are not set, the default Microsoft endpoints are used based on your tenant.
- Set Redirect URI on your App Registration on https://portal.azure.com/
- Set a redirect url = `<your proxy base url>/sso/callback`
```shell
@@ -98,6 +111,42 @@ To set up app roles:
4. Assign users to these roles in your Enterprise Application
5. When users sign in via SSO, LiteLLM will automatically assign them the corresponding role
**Advanced: Custom User Attribute Mapping**
For certain Microsoft Entra ID configurations, you may need to override the default user attribute field names. This is useful when your organization uses custom claims or non-standard attribute names in the SSO response.
**Step 1: Debug SSO Response**
First, inspect the JWT fields returned by your Microsoft SSO provider using the [SSO Debug Route](#debugging-sso-jwt-fields).
1. Add `/sso/debug/callback` as a redirect URL in your Azure App Registration
2. Navigate to `https://<proxy_base_url>/sso/debug/login`
3. Complete the SSO flow to see the returned user attributes
**Step 2: Identify Field Attribute Names**
From the debug response, identify the field names used for email, display name, user ID, first name, and last name.
**Step 3: Set Environment Variables**
Override the default attribute names by setting these environment variables:
| Environment Variable | Description | Default Value |
|---------------------|-------------|---------------|
| `MICROSOFT_USER_EMAIL_ATTRIBUTE` | Field name for user email | `userPrincipalName` |
| `MICROSOFT_USER_DISPLAY_NAME_ATTRIBUTE` | Field name for display name | `displayName` |
| `MICROSOFT_USER_ID_ATTRIBUTE` | Field name for user ID | `id` |
| `MICROSOFT_USER_FIRST_NAME_ATTRIBUTE` | Field name for first name | `givenName` |
| `MICROSOFT_USER_LAST_NAME_ATTRIBUTE` | Field name for last name | `surname` |
**Step 4: Restart the Proxy**
After setting the environment variables, restart the proxy:
```bash
litellm --config /path/to/config.yaml
```
</TabItem>
<TabItem value="Generic" label="Generic SSO Provider">
@@ -771,10 +771,18 @@ router_settings:
| MINIMUM_PROMPT_CACHE_TOKEN_COUNT | Minimum token count for caching a prompt. Default is 1024
| MISTRAL_API_BASE | Base URL for Mistral API. Default is https://api.mistral.ai
| MISTRAL_API_KEY | API key for Mistral API
| MICROSOFT_AUTHORIZATION_ENDPOINT | Custom authorization endpoint URL for Microsoft SSO (overrides default Microsoft OAuth authorization endpoint)
| MICROSOFT_CLIENT_ID | Client ID for Microsoft services
| MICROSOFT_CLIENT_SECRET | Client secret for Microsoft services
| MICROSOFT_TENANT | Tenant ID for Microsoft Azure
| MICROSOFT_SERVICE_PRINCIPAL_ID | Service Principal ID for Microsoft Enterprise Application. (This is an advanced feature if you want litellm to auto-assign members to Litellm Teams based on their Microsoft Entra ID Groups)
| MICROSOFT_TENANT | Tenant ID for Microsoft Azure
| MICROSOFT_TOKEN_ENDPOINT | Custom token endpoint URL for Microsoft SSO (overrides default Microsoft OAuth token endpoint)
| MICROSOFT_USER_DISPLAY_NAME_ATTRIBUTE | Field name for user display name in Microsoft SSO response. Default is `displayName`
| MICROSOFT_USER_EMAIL_ATTRIBUTE | Field name for user email in Microsoft SSO response. Default is `userPrincipalName`
| MICROSOFT_USER_FIRST_NAME_ATTRIBUTE | Field name for user first name in Microsoft SSO response. Default is `givenName`
| MICROSOFT_USER_ID_ATTRIBUTE | Field name for user ID in Microsoft SSO response. Default is `id`
| MICROSOFT_USER_LAST_NAME_ATTRIBUTE | Field name for user last name in Microsoft SSO response. Default is `surname`
| MICROSOFT_USERINFO_ENDPOINT | Custom userinfo endpoint URL for Microsoft SSO (overrides default Microsoft Graph userinfo endpoint)
| NO_DOCS | Flag to disable Swagger UI documentation
| NO_REDOC | Flag to disable Redoc documentation
| NO_PROXY | List of addresses to bypass proxy
@@ -8,6 +8,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union, cas
from fastapi import HTTPException
import litellm
from litellm import Router, verbose_logger
from litellm._uuid import uuid
from litellm.caching.caching import DualCache
@@ -836,15 +837,36 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
return response
async def afile_retrieve(
self, file_id: str, litellm_parent_otel_span: Optional[Span]
self, file_id: str, litellm_parent_otel_span: Optional[Span], llm_router=None
) -> OpenAIFileObject:
stored_file_object = await self.get_unified_file_id(
file_id, litellm_parent_otel_span
)
if stored_file_object:
return stored_file_object.file_object
else:
# Case 1 : This is not a managed file
if not stored_file_object:
raise Exception(f"LiteLLM Managed File object with id={file_id} not found")
# Case 2: Managed file and the file object exists in the database
if stored_file_object and stored_file_object.file_object:
return stored_file_object.file_object
# Case 3: Managed file exists in the database but not the file object (for. e.g the batch task might not have run)
# So we fetch the file object from the provider. We deliberately do not store the result to avoid interfering with batch cost tracking code.
if not llm_router:
raise Exception(
f"LiteLLM Managed File object with id={file_id} has no file_object "
f"and llm_router is required to fetch from provider"
)
try:
model_id, model_file_id = next(iter(stored_file_object.model_mappings.items()))
credentials = llm_router.get_deployment_credentials_with_provider(model_id) or {}
response = await litellm.afile_retrieve(file_id=model_file_id, **credentials)
response.id = file_id # Replace with unified ID
return response
except Exception as e:
raise Exception(f"Failed to retrieve file {file_id} from provider: {str(e)}") from e
async def afile_list(
self,
@@ -868,10 +890,11 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
[file_id], litellm_parent_otel_span
)
delete_response = None
specific_model_file_id_mapping = model_file_id_mapping.get(file_id)
if specific_model_file_id_mapping:
for model_id, model_file_id in specific_model_file_id_mapping.items():
await llm_router.afile_delete(model=model_id, file_id=model_file_id, **data) # type: ignore
delete_response = await llm_router.afile_delete(model=model_id, file_id=model_file_id, **data) # type: ignore
stored_file_object = await self.delete_unified_file_id(
file_id, litellm_parent_otel_span
@@ -879,6 +902,9 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):
if stored_file_object:
return stored_file_object
elif delete_response:
delete_response.id = file_id
return delete_response
else:
raise Exception(f"LiteLLM Managed File object with id={file_id} not found")
+17
View File
@@ -1285,3 +1285,20 @@ COROUTINE_CHECKER_MAX_SIZE_IN_MEMORY = int(
########################### RAG Text Splitter Constants ###########################
DEFAULT_CHUNK_SIZE = int(os.getenv("DEFAULT_CHUNK_SIZE", 1000))
DEFAULT_CHUNK_OVERLAP = int(os.getenv("DEFAULT_CHUNK_OVERLAP", 200))
########################### Microsoft SSO Constants ###########################
MICROSOFT_USER_EMAIL_ATTRIBUTE = str(
os.getenv("MICROSOFT_USER_EMAIL_ATTRIBUTE", "userPrincipalName")
)
MICROSOFT_USER_DISPLAY_NAME_ATTRIBUTE = str(
os.getenv("MICROSOFT_USER_DISPLAY_NAME_ATTRIBUTE", "displayName")
)
MICROSOFT_USER_ID_ATTRIBUTE = str(
os.getenv("MICROSOFT_USER_ID_ATTRIBUTE", "id")
)
MICROSOFT_USER_FIRST_NAME_ATTRIBUTE = str(
os.getenv("MICROSOFT_USER_FIRST_NAME_ATTRIBUTE", "givenName")
)
MICROSOFT_USER_LAST_NAME_ATTRIBUTE = str(
os.getenv("MICROSOFT_USER_LAST_NAME_ATTRIBUTE", "surname")
)
@@ -227,6 +227,7 @@ class BaseFileEndpoints(ABC):
self,
file_id: str,
litellm_parent_otel_span: Optional[Span],
llm_router: Optional[Router] = None,
) -> OpenAIFileObject:
pass
@@ -1329,6 +1329,24 @@
"supports_tool_choice": true,
"supports_vision": true
},
"azure_ai/claude-opus-4-5": {
"input_cost_per_token": 5e-06,
"litellm_provider": "azure_ai",
"max_input_tokens": 200000,
"max_output_tokens": 64000,
"max_tokens": 64000,
"mode": "chat",
"output_cost_per_token": 2.5e-05,
"supports_assistant_prefill": true,
"supports_computer_use": true,
"supports_function_calling": true,
"supports_pdf_input": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true
},
"azure_ai/claude-opus-4-1": {
"input_cost_per_token": 1.5e-05,
"litellm_provider": "azure_ai",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1979],{15143:function(e,n,r){Promise.resolve().then(r.bind(r,37492))},25512:function(e,n,r){"use strict";r.d(n,{P:function(){return l.Z},Q:function(){return t.Z}});var l=r(27281),t=r(43227)},37492:function(e,n,r){"use strict";r.r(n);var l=r(57437),t=r(66600),u=r(39760);n.default=()=>{let{token:e,accessToken:n,userRole:r,userId:i,premiumUser:o}=(0,u.Z)();return(0,l.jsx)(t.Z,{accessToken:n,token:e,userRole:r,userID:i,premiumUser:o})}},90246:function(e,n,r){"use strict";function l(e){let n=[e];return{all:n,lists:()=>[...n,"list"],list:e=>[...n,"list",{params:e}],details:()=>[...n,"detail"],detail:e=>[...n,"detail",e]}}r.d(n,{n:function(){return l}})},76191:function(e,n,r){"use strict";r.d(n,{p:function(){return i}});var l=r(19250),t=r(11713);let u=(0,r(90246).n)("uiConfig"),i=()=>(0,t.a)({queryKey:u.list({}),queryFn:async()=>await (0,l.getUiConfig)(),staleTime:864e5,gcTime:864e5})},39760:function(e,n,r){"use strict";var l=r(19250),t=r(3914),u=r(14474),i=r(99376),o=r(2265),a=r(76191);n.Z=()=>{var e,n,r,s,d,c;let m=(0,i.useRouter)(),{data:_,isLoading:p}=(0,a.p)(),f="undefined"!=typeof document?(0,t.e)("token"):null;(0,o.useEffect)(()=>{!p&&(!f||(null==_?void 0:_.admin_ui_disabled))&&m.replace("".concat((0,l.getProxyBaseUrl)(),"/ui/login"))},[f,m,p,_]);let v=(0,o.useMemo)(()=>{if(!f)return null;try{return(0,u.o)(f)}catch(e){return(0,t.b)(),m.replace("".concat((0,l.getProxyBaseUrl)(),"/ui/login")),null}},[f,m]);return{token:f,accessToken:null!==(e=null==v?void 0:v.key)&&void 0!==e?e:null,userId:null!==(n=null==v?void 0:v.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==v?void 0:v.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==v?void 0:v.user_role)&&void 0!==s?s:null),premiumUser:null!==(d=null==v?void 0:v.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(c=null==v?void 0:v.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==v?void 0:v.login_method)==="username_password"}}},10703:function(e,n,r){"use strict";r.d(n,{p:function(){return t}});var l=r(19250);let t=async e=>{try{let n=await (0,l.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},24199:function(e,n,r){"use strict";r.d(n,{Z:function(){return u}});var l=r(57437);r(2265);var t=r(30150),u=e=>{let{step:n=.01,style:r={width:"100%"},placeholder:u="Enter a numerical value",min:i,max:o,onChange:a,...s}=e;return(0,l.jsx)(t.Z,{onWheel:e=>e.currentTarget.blur(),step:n,style:r,placeholder:u,min:i,max:o,onChange:a,...s})}}},function(e){e.O(0,[1047,9028,9409,1713,4865,1442,2926,5333,1108,5733,9051,8049,6600,2971,2117,1744],function(){return e(e.s=15143)}),_N_E=e.O()}]);
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1979],{90286:function(e,n,r){Promise.resolve().then(r.bind(r,37492))},25512:function(e,n,r){"use strict";r.d(n,{P:function(){return l.Z},Q:function(){return t.Z}});var l=r(27281),t=r(57365)},37492:function(e,n,r){"use strict";r.r(n);var l=r(57437),t=r(66600),u=r(39760);n.default=()=>{let{token:e,accessToken:n,userRole:r,userId:i,premiumUser:o}=(0,u.Z)();return(0,l.jsx)(t.Z,{accessToken:n,token:e,userRole:r,userID:i,premiumUser:o})}},90246:function(e,n,r){"use strict";function l(e){let n=[e];return{all:n,lists:()=>[...n,"list"],list:e=>[...n,"list",{params:e}],details:()=>[...n,"detail"],detail:e=>[...n,"detail",e]}}r.d(n,{n:function(){return l}})},76191:function(e,n,r){"use strict";r.d(n,{p:function(){return i}});var l=r(19250),t=r(11713);let u=(0,r(90246).n)("uiConfig"),i=()=>(0,t.a)({queryKey:u.list({}),queryFn:async()=>await (0,l.getUiConfig)(),staleTime:864e5,gcTime:864e5})},39760:function(e,n,r){"use strict";var l=r(19250),t=r(3914),u=r(14474),i=r(99376),o=r(2265),a=r(76191);n.Z=()=>{var e,n,r,s,d,c;let m=(0,i.useRouter)(),{data:_,isLoading:p}=(0,a.p)(),f="undefined"!=typeof document?(0,t.e)("token"):null;(0,o.useEffect)(()=>{!p&&(!f||(null==_?void 0:_.admin_ui_disabled))&&m.replace("".concat((0,l.getProxyBaseUrl)(),"/ui/login"))},[f,m,p,_]);let v=(0,o.useMemo)(()=>{if(!f)return null;try{return(0,u.o)(f)}catch(e){return(0,t.b)(),m.replace("".concat((0,l.getProxyBaseUrl)(),"/ui/login")),null}},[f,m]);return{token:f,accessToken:null!==(e=null==v?void 0:v.key)&&void 0!==e?e:null,userId:null!==(n=null==v?void 0:v.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==v?void 0:v.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==v?void 0:v.user_role)&&void 0!==s?s:null),premiumUser:null!==(d=null==v?void 0:v.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(c=null==v?void 0:v.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==v?void 0:v.login_method)==="username_password"}}},10703:function(e,n,r){"use strict";r.d(n,{p:function(){return t}});var l=r(19250);let t=async e=>{try{let n=await (0,l.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},24199:function(e,n,r){"use strict";r.d(n,{Z:function(){return u}});var l=r(57437);r(2265);var t=r(30150),u=e=>{let{step:n=.01,style:r={width:"100%"},placeholder:u="Enter a numerical value",min:i,max:o,onChange:a,...s}=e;return(0,l.jsx)(t.Z,{onWheel:e=>e.currentTarget.blur(),step:n,style:r,placeholder:u,min:i,max:o,onChange:a,...s})}}},function(e){e.O(0,[1047,9028,9409,1713,4865,1442,2926,5333,1108,5733,9051,8049,6600,2971,2117,1744],function(){return e(e.s=90286)}),_N_E=e.O()}]);
@@ -1 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6061],{38997:function(n,t,u){Promise.resolve().then(u.bind(u,21933))},9513:function(n,t,u){"use strict";u.d(t,{Ct:function(){return r.Z},JO:function(){return c.Z},RM:function(){return o.Z},SC:function(){return a.Z},iA:function(){return i.Z},pj:function(){return f.Z},ss:function(){return s.Z},xs:function(){return Z.Z},xv:function(){return l.Z},zx:function(){return e.Z}});var r=u(41649),e=u(78489),c=u(47323),i=u(21626),o=u(97214),f=u(28241),s=u(58834),Z=u(69552),a=u(71876),l=u(84264)},45822:function(n,t,u){"use strict";u.d(t,{JO:function(){return i.Z},JX:function(){return e.Z},rj:function(){return c.Z},xv:function(){return o.Z},zx:function(){return r.Z}});var r=u(78489),e=u(49804),c=u(67101),i=u(47323),o=u(84264)},21933:function(n,t,u){"use strict";u.r(t);var r=u(57437),e=u(39145),c=u(39760);t.default=()=>{let{accessToken:n,userId:t,userRole:u}=(0,c.Z)();return(0,r.jsx)(e.Z,{accessToken:n,userID:t,userRole:u})}}},function(n){n.O(0,[1047,9028,9409,1713,4865,337,8135,1442,2409,3367,3709,353,1994,7138,2068,8565,5319,5333,8582,6609,4242,789,8049,5144,2202,9640,9145,2971,2117,1744],function(){return n(n.s=38997)}),_N_E=n.O()}]);
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6061],{86947:function(n,t,u){Promise.resolve().then(u.bind(u,21933))},9513:function(n,t,u){"use strict";u.d(t,{Ct:function(){return r.Z},JO:function(){return c.Z},RM:function(){return o.Z},SC:function(){return a.Z},iA:function(){return i.Z},pj:function(){return f.Z},ss:function(){return s.Z},xs:function(){return Z.Z},xv:function(){return l.Z},zx:function(){return e.Z}});var r=u(41649),e=u(78489),c=u(47323),i=u(21626),o=u(97214),f=u(28241),s=u(58834),Z=u(69552),a=u(71876),l=u(84264)},45822:function(n,t,u){"use strict";u.d(t,{JO:function(){return i.Z},JX:function(){return e.Z},rj:function(){return c.Z},xv:function(){return o.Z},zx:function(){return r.Z}});var r=u(78489),e=u(49804),c=u(67101),i=u(47323),o=u(84264)},21933:function(n,t,u){"use strict";u.r(t);var r=u(57437),e=u(39145),c=u(39760);t.default=()=>{let{accessToken:n,userId:t,userRole:u}=(0,c.Z)();return(0,r.jsx)(e.Z,{accessToken:n,userID:t,userRole:u})}}},function(n){n.O(0,[1047,9028,9409,1713,4865,337,8135,1442,2409,3367,3709,353,1994,7138,2068,8565,5319,5333,8582,6609,4242,789,8049,5144,2202,9640,9145,2971,2117,1744],function(){return n(n.s=86947)}),_N_E=n.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8021],{39793:function(e,n,r){Promise.resolve().then(r.bind(r,14809))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(78489)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return t.Z},nP:function(){return u.Z},td:function(){return i.Z},v0:function(){return l.Z},x4:function(){return o.Z}});var t=r(12485),l=r(18135),i=r(35242),o=r(29706),u=r(77991)},90246:function(e,n,r){"use strict";function t(e){let n=[e];return{all:n,lists:()=>[...n,"list"],list:e=>[...n,"list",{params:e}],details:()=>[...n,"detail"],detail:e=>[...n,"detail",e]}}r.d(n,{n:function(){return t}})},76191:function(e,n,r){"use strict";r.d(n,{p:function(){return o}});var t=r(19250),l=r(11713);let i=(0,r(90246).n)("uiConfig"),o=()=>(0,l.a)({queryKey:i.list({}),queryFn:async()=>await (0,t.getUiConfig)(),staleTime:864e5,gcTime:864e5})},39760:function(e,n,r){"use strict";var t=r(19250),l=r(3914),i=r(14474),o=r(99376),u=r(2265),s=r(76191);n.Z=()=>{var e,n,r,a,d,c;let m=(0,o.useRouter)(),{data:f,isLoading:p}=(0,s.p)(),_="undefined"!=typeof document?(0,l.e)("token"):null;(0,u.useEffect)(()=>{!p&&(!_||(null==f?void 0:f.admin_ui_disabled))&&m.replace("".concat((0,t.getProxyBaseUrl)(),"/ui/login"))},[_,m,p,f]);let v=(0,u.useMemo)(()=>{if(!_)return null;try{return(0,i.o)(_)}catch(e){return(0,l.b)(),m.replace("".concat((0,t.getProxyBaseUrl)(),"/ui/login")),null}},[_,m]);return{token:_,accessToken:null!==(e=null==v?void 0:v.key)&&void 0!==e?e:null,userId:null!==(n=null==v?void 0:v.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==v?void 0:v.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==v?void 0:v.user_role)&&void 0!==a?a:null),premiumUser:null!==(d=null==v?void 0:v.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(c=null==v?void 0:v.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==v?void 0:v.login_method)==="username_password"}}},14809:function(e,n,r){"use strict";r.r(n);var t=r(57437),l=r(65695),i=r(39760);n.default=()=>{let{accessToken:e,userRole:n,userId:r}=(0,i.Z)();return(0,t.jsx)(l.Z,{accessToken:e,userRole:n,userID:r,modelData:{}})}},21609:function(e,n,r){"use strict";r.d(n,{Z:function(){return d}});var t=r(57437),l=r(57840),i=r(22116),o=r(51653),u=r(76188),s=r(4260),a=r(2265);function d(e){let{isOpen:n,title:r,alertMessage:d,message:c,resourceInformationTitle:m,resourceInformation:f,onCancel:p,onOk:_,confirmLoading:v,requiredConfirmation:g}=e,{Title:x,Text:h}=l.default,[b,y]=(0,a.useState)("");return(0,a.useEffect)(()=>{n&&y("")},[n]),(0,t.jsx)(i.Z,{title:r,open:n,onOk:_,onCancel:p,confirmLoading:v,okText:v?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!g&&b!==g||v},cancelButtonProps:{disabled:v},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(o.Z,{message:d,type:"warning"}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,t.jsx)(x,{level:5,className:"mb-3 text-gray-900",children:m}),(0,t.jsx)(u.Z,{column:1,size:"small",children:f&&f.map(e=>{let{label:n,value:r,...l}=e;return(0,t.jsx)(u.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:n}),children:(0,t.jsx)(h,{...l,children:null!=r?r:"-"})},n)})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(h,{children:c})}),g&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsxs)(h,{className:"block text-base font-medium text-gray-700 mb-2",children:[(0,t.jsx)(h,{children:"Type "}),(0,t.jsx)(h,{strong:!0,type:"danger",children:g}),(0,t.jsx)(h,{children:" to confirm deletion:"})]}),(0,t.jsx)(s.default,{value:b,onChange:e=>y(e.target.value),placeholder:g,className:"rounded-md text-base border-gray-200",autoFocus:!0})]})]})})}},10703:function(e,n,r){"use strict";r.d(n,{p:function(){return l}});var t=r(19250);let l=async e=>{try{let n=await (0,t.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}}},function(e){e.O(0,[9028,9409,1713,4865,337,8135,1442,2926,2409,7851,7271,2500,8049,5695,2971,2117,1744],function(){return e(e.s=39793)}),_N_E=e.O()}]);
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8021],{40915:function(e,n,r){Promise.resolve().then(r.bind(r,14809))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(78489)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return t.Z},nP:function(){return u.Z},td:function(){return i.Z},v0:function(){return l.Z},x4:function(){return o.Z}});var t=r(12485),l=r(18135),i=r(35242),o=r(29706),u=r(77991)},90246:function(e,n,r){"use strict";function t(e){let n=[e];return{all:n,lists:()=>[...n,"list"],list:e=>[...n,"list",{params:e}],details:()=>[...n,"detail"],detail:e=>[...n,"detail",e]}}r.d(n,{n:function(){return t}})},76191:function(e,n,r){"use strict";r.d(n,{p:function(){return o}});var t=r(19250),l=r(11713);let i=(0,r(90246).n)("uiConfig"),o=()=>(0,l.a)({queryKey:i.list({}),queryFn:async()=>await (0,t.getUiConfig)(),staleTime:864e5,gcTime:864e5})},39760:function(e,n,r){"use strict";var t=r(19250),l=r(3914),i=r(14474),o=r(99376),u=r(2265),s=r(76191);n.Z=()=>{var e,n,r,a,d,c;let m=(0,o.useRouter)(),{data:f,isLoading:p}=(0,s.p)(),_="undefined"!=typeof document?(0,l.e)("token"):null;(0,u.useEffect)(()=>{!p&&(!_||(null==f?void 0:f.admin_ui_disabled))&&m.replace("".concat((0,t.getProxyBaseUrl)(),"/ui/login"))},[_,m,p,f]);let v=(0,u.useMemo)(()=>{if(!_)return null;try{return(0,i.o)(_)}catch(e){return(0,l.b)(),m.replace("".concat((0,t.getProxyBaseUrl)(),"/ui/login")),null}},[_,m]);return{token:_,accessToken:null!==(e=null==v?void 0:v.key)&&void 0!==e?e:null,userId:null!==(n=null==v?void 0:v.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==v?void 0:v.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"org_admin":return"Org Admin";case"internal_user":return"Internal User";case"internal_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==v?void 0:v.user_role)&&void 0!==a?a:null),premiumUser:null!==(d=null==v?void 0:v.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(c=null==v?void 0:v.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==v?void 0:v.login_method)==="username_password"}}},14809:function(e,n,r){"use strict";r.r(n);var t=r(57437),l=r(65695),i=r(39760);n.default=()=>{let{accessToken:e,userRole:n,userId:r}=(0,i.Z)();return(0,t.jsx)(l.Z,{accessToken:e,userRole:n,userID:r,modelData:{}})}},21609:function(e,n,r){"use strict";r.d(n,{Z:function(){return d}});var t=r(57437),l=r(57840),i=r(22116),o=r(51653),u=r(76188),s=r(4260),a=r(2265);function d(e){let{isOpen:n,title:r,alertMessage:d,message:c,resourceInformationTitle:m,resourceInformation:f,onCancel:p,onOk:_,confirmLoading:v,requiredConfirmation:g}=e,{Title:x,Text:h}=l.default,[b,y]=(0,a.useState)("");return(0,a.useEffect)(()=>{n&&y("")},[n]),(0,t.jsx)(i.Z,{title:r,open:n,onOk:_,onCancel:p,confirmLoading:v,okText:v?"Deleting...":"Delete",cancelText:"Cancel",okButtonProps:{danger:!0,disabled:!!g&&b!==g||v},cancelButtonProps:{disabled:v},children:(0,t.jsxs)("div",{className:"space-y-4",children:[d&&(0,t.jsx)(o.Z,{message:d,type:"warning"}),(0,t.jsxs)("div",{className:"mt-4 p-4 bg-red-50 rounded-lg border border-red-200",children:[(0,t.jsx)(x,{level:5,className:"mb-3 text-gray-900",children:m}),(0,t.jsx)(u.Z,{column:1,size:"small",children:f&&f.map(e=>{let{label:n,value:r,...l}=e;return(0,t.jsx)(u.Z.Item,{label:(0,t.jsx)("span",{className:"font-semibold text-gray-700",children:n}),children:(0,t.jsx)(h,{...l,children:null!=r?r:"-"})},n)})})]}),(0,t.jsx)("div",{children:(0,t.jsx)(h,{children:c})}),g&&(0,t.jsxs)("div",{className:"mb-6 mt-4 pt-4 border-t border-gray-200",children:[(0,t.jsxs)(h,{className:"block text-base font-medium text-gray-700 mb-2",children:[(0,t.jsx)(h,{children:"Type "}),(0,t.jsx)(h,{strong:!0,type:"danger",children:g}),(0,t.jsx)(h,{children:" to confirm deletion:"})]}),(0,t.jsx)(s.default,{value:b,onChange:e=>y(e.target.value),placeholder:g,className:"rounded-md text-base border-gray-200",autoFocus:!0})]})]})})}},10703:function(e,n,r){"use strict";r.d(n,{p:function(){return l}});var t=r(19250);let l=async e=>{try{let n=await (0,t.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}}},function(e){e.O(0,[9028,9409,1713,4865,337,8135,1442,2926,2409,7851,7271,2500,8049,5695,2971,2117,1744],function(){return e(e.s=40915)}),_N_E=e.O()}]);
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More