Skip to content

Commit cdfe2fb

Browse files
committed
Update to models handler path, added ai in the path.
1 parent e0e17dd commit cdfe2fb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This extension is composed of a Python package named `jupyter_ai_litellm` that e
1616

1717
### Chat Models
1818

19-
- `GET /api/models/chat` - Returns a list of all available chat models
19+
- `GET /api/ai/models/chat` - Returns a list of all available chat models
2020

2121
The response includes model IDs in LiteLLM format (e.g., `openai/gpt-4`, `anthropic/claude-3-sonnet`, etc.)
2222

jupyter_ai_litellm/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ def setup_handlers(web_app):
2525
route_pattern = url_path_join(base_url, "jupyter-ai-litellm", "get-example")
2626
handlers = [
2727
(route_pattern, RouteHandler),
28-
(url_path_join(base_url, "api/models/chat") + r"(?:\?.*)?", ChatModelsRestAPI)
28+
(url_path_join(base_url, "api/ai/models/chat") + r"(?:\?.*)?", ChatModelsRestAPI)
2929
]
3030
web_app.add_handlers(host_pattern, handlers)

jupyter_ai_litellm/tests/test_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async def test_get_example(jp_fetch):
1414

1515
async def test_get_chat_models(jp_fetch):
1616
# When
17-
response = await jp_fetch("api", "models", "chat")
17+
response = await jp_fetch("api", "ai", "models", "chat")
1818

1919
# Then
2020
assert response.code == 200

0 commit comments

Comments
 (0)