Skip to content

Commit 429130d

Browse files
committed
[RHOAIENG-34715] - Expose model listing endpoint as top-level
Update base model endpoint to be MAAS_GATEWAY_URL/v1/models. Signed-off-by: Filippe Spolti <[email protected]>
1 parent 100fbdf commit 429130d

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

deployment/infrastructure/kustomize-templates/maas-api/07-maas-api-routing.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,27 @@ spec:
1515
hostnames:
1616
- "maas-api.${CLUSTER_DOMAIN}"
1717
rules:
18+
# OpenAI-compatible /v1/models endpoint at top level
1819
- matches:
1920
- path:
2021
type: PathPrefix
21-
value: /
22+
value: /v1/models
23+
backendRefs:
24+
- name: maas-api
25+
namespace: platform-services
26+
port: 80
27+
weight: 100
28+
# All other maas-api endpoints remain under /maas-api prefix
29+
- matches:
30+
- path:
31+
type: PathPrefix
32+
value: /maas-api
33+
filters:
34+
- type: URLRewrite
35+
urlRewrite:
36+
path:
37+
type: ReplacePrefixMatch
38+
replacePrefixMatch: /
2239
backendRefs:
2340
- name: maas-api
2441
namespace: platform-services

maas-api/deploy/overlays/dev/infra/networking/httproute.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ spec:
77
- name: openshift-ai-inference
88
namespace: openshift-ingress
99
rules:
10+
# OpenAI-compatible /v1/models endpoint at top level
11+
- matches:
12+
- path:
13+
type: PathPrefix
14+
value: /v1/models
15+
backendRefs:
16+
- name: maas-api
17+
port: 8080
18+
weight: 100
19+
# All other maas-api endpoints remain under /maas-api prefix
1020
- matches:
1121
- path:
1222
type: PathPrefix

0 commit comments

Comments
 (0)