mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
fix: allowlist /xai, resync dashboard types
CI was red on two checks after adding the /xai pass-through
route. proxy-infra / Run tests failed on
test_gateway_plus_backend_covers_full_app because
gateway/routes/allowlist.py never got the new prefix, so
/xai/{endpoint:path} wasn't exposed on either component. Added
"/xai/" next to the other provider entries (/mistral/, /cohere/,
/vllm/, /openai_passthrough/) and that's fixed.
Second one was the "Verify schema.d.ts matches the proxy OpenAPI
spec" check, since a new route changes the spec and the dashboard's
generated types were stale. Ran npm run gen:api from
ui/litellm-dashboard and committed the regenerated
src/lib/http/schema.d.ts, 191 lines added, nothing else touched.
btw gen:api shells out to python3 to import litellm, so it needs
the project venv on PATH or it blows up with ModuleNotFoundError on
dotenv, took me a min to figure that out.
Ran the component allowlist suite, the new
TestXAIPassthroughRoute cases and the lazy OpenAPI snapshot test
together locally, 23 passed.
This commit is contained in:
parent
73c4f689c5
commit
cfeb54e654
2 changed files with 192 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ GATEWAY_PATH_PREFIXES: tuple[str, ...] = (
|
|||
"/cursor/",
|
||||
"/milvus/",
|
||||
"/openai_passthrough/",
|
||||
"/xai/",
|
||||
# Dynamic provider / toolset passthrough (path templates)
|
||||
"/{provider}/",
|
||||
"/toolset/",
|
||||
|
|
|
|||
191
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
191
ui/litellm-dashboard/src/lib/http/schema.d.ts
generated
vendored
|
|
@ -22634,6 +22634,42 @@ export interface paths {
|
|||
patch: operations["watsonx_proxy_route_watsonx__endpoint__patch"];
|
||||
trace?: never;
|
||||
};
|
||||
"/xai/{endpoint}": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Xai Proxy Route
|
||||
* @description [Docs](https://docs.litellm.ai/docs/pass_through/xai)
|
||||
*/
|
||||
get: operations["xai_proxy_route_xai__endpoint__get"];
|
||||
/**
|
||||
* Xai Proxy Route
|
||||
* @description [Docs](https://docs.litellm.ai/docs/pass_through/xai)
|
||||
*/
|
||||
put: operations["xai_proxy_route_xai__endpoint__put"];
|
||||
/**
|
||||
* Xai Proxy Route
|
||||
* @description [Docs](https://docs.litellm.ai/docs/pass_through/xai)
|
||||
*/
|
||||
post: operations["xai_proxy_route_xai__endpoint__post"];
|
||||
/**
|
||||
* Xai Proxy Route
|
||||
* @description [Docs](https://docs.litellm.ai/docs/pass_through/xai)
|
||||
*/
|
||||
delete: operations["xai_proxy_route_xai__endpoint__delete"];
|
||||
options?: never;
|
||||
head?: never;
|
||||
/**
|
||||
* Xai Proxy Route
|
||||
* @description [Docs](https://docs.litellm.ai/docs/pass_through/xai)
|
||||
*/
|
||||
patch: operations["xai_proxy_route_xai__endpoint__patch"];
|
||||
trace?: never;
|
||||
};
|
||||
"/{mcp_server_name}/authorize": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -70611,6 +70647,161 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
xai_proxy_route_xai__endpoint__get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
endpoint: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xai_proxy_route_xai__endpoint__put: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
endpoint: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xai_proxy_route_xai__endpoint__post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
endpoint: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xai_proxy_route_xai__endpoint__delete: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
endpoint: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
xai_proxy_route_xai__endpoint__patch: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path: {
|
||||
endpoint: string;
|
||||
};
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": unknown;
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
authorize__mcp_server_name__authorize_get: {
|
||||
parameters: {
|
||||
query: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue