mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
chore(proxy): regenerate the lazy OpenAPI snapshot and drop an assert in except
The Cursor model listing docstring changed, so the snapshot served for unloaded features is regenerated. The model_info test helper re-raises a non-404 instead of asserting inside the except block (PT017).
This commit is contained in:
parent
5437b86a5e
commit
47b80b6a3d
2 changed files with 4 additions and 3 deletions
|
|
@ -25220,7 +25220,7 @@
|
|||
},
|
||||
"/cursor/models": {
|
||||
"get": {
|
||||
"description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler.",
|
||||
"description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler with\nwildcard routes left out, since Cursor offers every listed id as a callable model.",
|
||||
"operationId": "cursor_model_list_cursor_models_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
|
@ -25245,7 +25245,7 @@
|
|||
},
|
||||
"/cursor/v1/models": {
|
||||
"get": {
|
||||
"description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler.",
|
||||
"description": "OpenAI-compatible model listing for the Cursor BYOK base URL.\n\nClients pointed at `<proxy>/cursor` as an OpenAI-compatible base URL resolve and\nverify models via `GET {base}/models` (the OpenAI SDK contract). Without this\nroute those requests fall through to the Cursor Cloud Agents passthrough, which\ndemands a Cursor API key and 401s, so key verification silently fails before any\nchat request is ever sent. Delegates to the standard `/v1/models` handler with\nwildcard routes left out, since Cursor offers every listed id as a callable model.",
|
||||
"operationId": "cursor_model_list_cursor_v1_models_get",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
|
|
|||
|
|
@ -3186,7 +3186,8 @@ async def _model_info_resolves(model_id: str, **query: bool) -> bool:
|
|||
**query,
|
||||
)
|
||||
except HTTPException as e:
|
||||
assert e.status_code == 404, e.detail
|
||||
if e.status_code != 404:
|
||||
raise
|
||||
return False
|
||||
return response["id"] == model_id
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue