Spaces:
Paused
Paused
icebear0828 Claude Opus 4.6 commited on
Commit ·
2b84f47
1
Parent(s): 4355a35
fix: move /v1/models/catalog route before :modelId param route
Browse files- src/routes/models.ts +6 -5
src/routes/models.ts
CHANGED
|
@@ -47,6 +47,12 @@ export function createModelRoutes(): Hono {
|
|
| 47 |
return c.json(response);
|
| 48 |
});
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
app.get("/v1/models/:modelId", (c) => {
|
| 51 |
const modelId = c.req.param("modelId");
|
| 52 |
const catalog = getModelCatalog();
|
|
@@ -78,11 +84,6 @@ export function createModelRoutes(): Hono {
|
|
| 78 |
});
|
| 79 |
});
|
| 80 |
|
| 81 |
-
// Full catalog with reasoning efforts (for dashboard UI)
|
| 82 |
-
app.get("/v1/models/catalog", (c) => {
|
| 83 |
-
return c.json(getModelCatalog());
|
| 84 |
-
});
|
| 85 |
-
|
| 86 |
// Extended endpoint: model details with reasoning efforts
|
| 87 |
app.get("/v1/models/:modelId/info", (c) => {
|
| 88 |
const modelId = c.req.param("modelId");
|
|
|
|
| 47 |
return c.json(response);
|
| 48 |
});
|
| 49 |
|
| 50 |
+
// Full catalog with reasoning efforts (for dashboard UI)
|
| 51 |
+
// Must be before :modelId to avoid being matched as a model ID
|
| 52 |
+
app.get("/v1/models/catalog", (c) => {
|
| 53 |
+
return c.json(getModelCatalog());
|
| 54 |
+
});
|
| 55 |
+
|
| 56 |
app.get("/v1/models/:modelId", (c) => {
|
| 57 |
const modelId = c.req.param("modelId");
|
| 58 |
const catalog = getModelCatalog();
|
|
|
|
| 84 |
});
|
| 85 |
});
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
// Extended endpoint: model details with reasoning efforts
|
| 88 |
app.get("/v1/models/:modelId/info", (c) => {
|
| 89 |
const modelId = c.req.param("modelId");
|