Skip to content

Commit 7c8acb1

Browse files
committed
fix: Update LLM Endpoints
jira: GDAI-269
1 parent 32e0cea commit 7c8acb1

File tree

8 files changed

+202
-676
lines changed

8 files changed

+202
-676
lines changed

gooddata-sdk/gooddata_sdk/catalog/organization/entity_model/llm_endpoint.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def init(
5353
base_url: Optional[str] = None,
5454
llm_organization: Optional[str] = None,
5555
llm_model: Optional[str] = None,
56-
workspace_ids: Optional[list[str]] = None,
5756
) -> CatalogLlmEndpoint:
5857
return cls(
5958
id=id,
@@ -65,7 +64,6 @@ def init(
6564
base_url=base_url,
6665
llm_organization=llm_organization,
6766
llm_model=llm_model,
68-
workspace_ids=workspace_ids,
6967
),
7068
)
7169

@@ -80,7 +78,6 @@ def from_api(cls, entity: dict[str, Any]) -> CatalogLlmEndpoint:
8078
base_url=safeget(ea, ["baseUrl"]),
8179
llm_organization=safeget(ea, ["llmOrganization"]),
8280
llm_model=safeget(ea, ["llmModel"]),
83-
workspace_ids=safeget(ea, ["workspaceIds"]),
8481
)
8582
return cls(
8683
id=entity["id"],
@@ -108,7 +105,6 @@ def init(
108105
base_url: Optional[str] = None,
109106
llm_organization: Optional[str] = None,
110107
llm_model: Optional[str] = None,
111-
workspace_ids: Optional[list[str]] = None,
112108
) -> CatalogLlmEndpointPatch:
113109
return cls(
114110
id=id,
@@ -120,7 +116,6 @@ def init(
120116
base_url=base_url,
121117
llm_organization=llm_organization,
122118
llm_model=llm_model,
123-
workspace_ids=workspace_ids,
124119
),
125120
)
126121

@@ -134,7 +129,6 @@ class CatalogLlmEndpointAttributes(Base):
134129
base_url: Optional[str] = None
135130
llm_organization: Optional[str] = None
136131
llm_model: Optional[str] = None
137-
workspace_ids: Optional[list[str]] = None
138132

139133
@staticmethod
140134
def client_class() -> type[JsonApiLlmEndpointInAttributes]:
@@ -150,7 +144,6 @@ class CatalogLlmEndpointPatchAttributes(Base):
150144
base_url: Optional[str] = None
151145
llm_organization: Optional[str] = None
152146
llm_model: Optional[str] = None
153-
workspace_ids: Optional[list[str]] = None
154147

155148
@staticmethod
156149
def client_class() -> type[JsonApiLlmEndpointPatchAttributes]:

gooddata-sdk/gooddata_sdk/catalog/organization/service.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ def create_llm_endpoint(
579579
base_url: Optional[str] = None,
580580
llm_organization: Optional[str] = None,
581581
llm_model: Optional[str] = None,
582-
workspace_ids: Optional[list[str]] = None,
583582
) -> CatalogLlmEndpoint:
584583
"""
585584
Create a new LLM endpoint.
@@ -593,8 +592,6 @@ def create_llm_endpoint(
593592
base_url: Optional base URL for custom LLM endpoint
594593
llm_organization: Optional LLM organization identifier
595594
llm_model: Optional LLM default model override
596-
workspace_ids: Optional list of workspace IDs for which LLM endpoint is valid.
597-
If empty, it is valid for all workspaces.
598595
599596
Returns:
600597
CatalogLlmEndpoint: Created LLM endpoint
@@ -608,7 +605,6 @@ def create_llm_endpoint(
608605
base_url=base_url,
609606
llm_organization=llm_organization,
610607
llm_model=llm_model,
611-
workspace_ids=workspace_ids,
612608
)
613609
llm_endpoint_document = CatalogLlmEndpointDocument(data=llm_endpoint)
614610
response = self._entities_api.create_entity_llm_endpoints(
@@ -626,7 +622,6 @@ def update_llm_endpoint(
626622
base_url: Optional[str] = None,
627623
llm_organization: Optional[str] = None,
628624
llm_model: Optional[str] = None,
629-
workspace_ids: Optional[list[str]] = None,
630625
) -> CatalogLlmEndpoint:
631626
"""
632627
Update an existing LLM endpoint.
@@ -640,8 +635,6 @@ def update_llm_endpoint(
640635
base_url: Base URL for custom LLM endpoint
641636
llm_organization: LLM organization identifier
642637
llm_model: LLM default model override
643-
workspace_ids: List of workspace IDs for which LLM endpoint is valid.
644-
If empty, it is valid for all workspaces.
645638
646639
Returns:
647640
CatalogLlmEndpoint: Updated LLM endpoint
@@ -655,7 +648,6 @@ def update_llm_endpoint(
655648
base_url=base_url,
656649
llm_organization=llm_organization,
657650
llm_model=llm_model,
658-
workspace_ids=workspace_ids,
659651
)
660652
llm_endpoint_patch_document = CatalogLlmEndpointPatchDocument(data=llm_endpoint_patch)
661653
response = self._entities_api.patch_entity_llm_endpoints(

gooddata-sdk/tests/catalog/fixtures/organization/create_llm_endpoint.yaml

Lines changed: 37 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -27,55 +27,35 @@ interactions:
2727
code: 201
2828
message: Created
2929
headers:
30-
Access-Control-Allow-Credentials:
31-
- 'true'
32-
Access-Control-Expose-Headers:
33-
- Content-Disposition, Content-Length, Content-Range, Set-Cookie
3430
Cache-Control:
3531
- no-cache, no-store, max-age=0, must-revalidate
36-
Connection:
37-
- keep-alive
3832
Content-Length:
3933
- '207'
40-
Content-Security-Policy:
41-
- 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline''
42-
''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com
43-
src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com;
44-
img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
45-
cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com
46-
*.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src
47-
''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src
48-
''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com
49-
*.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net
50-
matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com
51-
*.wistia.net embedwistia-a.akamaihd.net'
5234
Content-Type:
5335
- application/vnd.gooddata.api+json
5436
DATE: &id001
5537
- PLACEHOLDER
5638
Expires:
5739
- '0'
58-
GoodData-Deployment:
59-
- aio
60-
Permission-Policy:
61-
- geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera
62-
'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment
63-
'none';
40+
Featurepolicy:
41+
- geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr
42+
'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope
43+
'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none';
6444
Pragma:
6545
- no-cache
6646
Referrer-Policy:
67-
- no-referrer
68-
Server:
69-
- nginx
47+
- same-origin
7048
Vary:
7149
- Origin
7250
- Access-Control-Request-Method
7351
- Access-Control-Request-Headers
7452
X-Content-Type-Options:
7553
- nosniff
54+
X-Frame-Options:
55+
- SAMEORIGIN
7656
X-GDC-TRACE-ID: *id001
77-
X-XSS-Protection:
78-
- '0'
57+
X-Xss-Protection:
58+
- 1; mode=block
7959
body:
8060
string:
8161
data:
@@ -100,9 +80,6 @@ interactions:
10080
baseUrl: https://api.example.com
10181
llmOrganization: org1
10282
llmModel: gpt-4
103-
workspaceIds:
104-
- workspace1
105-
- workspace2
10683
id: endpoint2
10784
type: llmEndpoint
10885
headers:
@@ -121,54 +98,34 @@ interactions:
12198
code: 201
12299
message: Created
123100
headers:
124-
Access-Control-Allow-Credentials:
125-
- 'true'
126-
Access-Control-Expose-Headers:
127-
- Content-Disposition, Content-Length, Content-Range, Set-Cookie
128101
Cache-Control:
129102
- no-cache, no-store, max-age=0, must-revalidate
130-
Connection:
131-
- keep-alive
132103
Content-Length:
133-
- '312'
134-
Content-Security-Policy:
135-
- 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline''
136-
''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com
137-
src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com;
138-
img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
139-
cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com
140-
*.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src
141-
''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src
142-
''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com
143-
*.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net
144-
matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com
145-
*.wistia.net embedwistia-a.akamaihd.net'
104+
- '269'
146105
Content-Type:
147106
- application/vnd.gooddata.api+json
148107
DATE: *id001
149108
Expires:
150109
- '0'
151-
GoodData-Deployment:
152-
- aio
153-
Permission-Policy:
154-
- geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera
155-
'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment
156-
'none';
110+
Featurepolicy:
111+
- geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr
112+
'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope
113+
'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none';
157114
Pragma:
158115
- no-cache
159116
Referrer-Policy:
160-
- no-referrer
161-
Server:
162-
- nginx
117+
- same-origin
163118
Vary:
164119
- Origin
165120
- Access-Control-Request-Method
166121
- Access-Control-Request-Headers
167122
X-Content-Type-Options:
168123
- nosniff
124+
X-Frame-Options:
125+
- SAMEORIGIN
169126
X-GDC-TRACE-ID: *id001
170-
X-XSS-Protection:
171-
- '0'
127+
X-Xss-Protection:
128+
- 1; mode=block
172129
body:
173130
string:
174131
data:
@@ -179,9 +136,6 @@ interactions:
179136
baseUrl: https://api.example.com
180137
llmOrganization: org1
181138
llmModel: gpt-4
182-
workspaceIds:
183-
- workspace1
184-
- workspace2
185139
title: Test Endpoint 2
186140
links:
187141
self: http://localhost:3000/api/v1/entities/llmEndpoints/endpoint2
@@ -201,50 +155,30 @@ interactions:
201155
code: 204
202156
message: No Content
203157
headers:
204-
Access-Control-Allow-Credentials:
205-
- 'true'
206-
Access-Control-Expose-Headers:
207-
- Content-Disposition, Content-Length, Content-Range, Set-Cookie
208158
Cache-Control:
209159
- no-cache, no-store, max-age=0, must-revalidate
210-
Connection:
211-
- keep-alive
212-
Content-Security-Policy:
213-
- 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline''
214-
''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com
215-
src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com;
216-
img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
217-
cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com
218-
*.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src
219-
''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src
220-
''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com
221-
*.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net
222-
matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com
223-
*.wistia.net embedwistia-a.akamaihd.net'
224160
DATE: *id001
225161
Expires:
226162
- '0'
227-
GoodData-Deployment:
228-
- aio
229-
Permission-Policy:
230-
- geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera
231-
'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment
232-
'none';
163+
Featurepolicy:
164+
- geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr
165+
'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope
166+
'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none';
233167
Pragma:
234168
- no-cache
235169
Referrer-Policy:
236-
- no-referrer
237-
Server:
238-
- nginx
170+
- same-origin
239171
Vary:
240172
- Origin
241173
- Access-Control-Request-Method
242174
- Access-Control-Request-Headers
243175
X-Content-Type-Options:
244176
- nosniff
177+
X-Frame-Options:
178+
- SAMEORIGIN
245179
X-GDC-TRACE-ID: *id001
246-
X-XSS-Protection:
247-
- '0'
180+
X-Xss-Protection:
181+
- 1; mode=block
248182
body:
249183
string: ''
250184
- request:
@@ -263,49 +197,29 @@ interactions:
263197
code: 204
264198
message: No Content
265199
headers:
266-
Access-Control-Allow-Credentials:
267-
- 'true'
268-
Access-Control-Expose-Headers:
269-
- Content-Disposition, Content-Length, Content-Range, Set-Cookie
270200
Cache-Control:
271201
- no-cache, no-store, max-age=0, must-revalidate
272-
Connection:
273-
- keep-alive
274-
Content-Security-Policy:
275-
- 'default-src ''self'' *.wistia.com *.wistia.net; script-src ''self'' ''unsafe-inline''
276-
''unsafe-eval'' *.wistia.com *.wistia.net *.hsforms.net *.hsforms.com
277-
src.litix.io matomo.anywhere.gooddata.com *.jquery.com unpkg.com cdnjs.cloudflare.com;
278-
img-src * data: blob:; style-src ''self'' ''unsafe-inline'' fonts.googleapis.com
279-
cdn.jsdelivr.net fast.fonts.net; font-src ''self'' data: fonts.gstatic.com
280-
*.alicdn.com *.wistia.com cdn.jsdelivr.net info.gooddata.com; frame-src
281-
''self'' *.hsforms.net *.hsforms.com; object-src ''none''; worker-src
282-
''self'' blob:; child-src blob:; connect-src ''self'' *.tiles.mapbox.com
283-
*.mapbox.com *.litix.io *.wistia.com *.hsforms.net *.hsforms.com embedwistia-a.akamaihd.net
284-
matomo.anywhere.gooddata.com; media-src ''self'' blob: data: *.wistia.com
285-
*.wistia.net embedwistia-a.akamaihd.net'
286202
DATE: *id001
287203
Expires:
288204
- '0'
289-
GoodData-Deployment:
290-
- aio
291-
Permission-Policy:
292-
- geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera
293-
'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'none'; payment
294-
'none';
205+
Featurepolicy:
206+
- geolocation 'none'; midi 'none'; notifications 'none'; push 'none'; sync-xhr
207+
'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope
208+
'none'; speaker 'none'; vibrate 'none'; fullscreen 'none'; payment 'none';
295209
Pragma:
296210
- no-cache
297211
Referrer-Policy:
298-
- no-referrer
299-
Server:
300-
- nginx
212+
- same-origin
301213
Vary:
302214
- Origin
303215
- Access-Control-Request-Method
304216
- Access-Control-Request-Headers
305217
X-Content-Type-Options:
306218
- nosniff
219+
X-Frame-Options:
220+
- SAMEORIGIN
307221
X-GDC-TRACE-ID: *id001
308-
X-XSS-Protection:
309-
- '0'
222+
X-Xss-Protection:
223+
- 1; mode=block
310224
body:
311225
string: ''

0 commit comments

Comments
 (0)