Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
interactions:
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- br, gzip, deflate
X-GDC-VALIDATE-RELATIONS:
- 'true'
X-Requested-With:
- XMLHttpRequest
method: GET
uri: http://localhost:3000/api/v1/entities/llmProviders
response:
body:
string:
data: []
links:
next: http://localhost:3000/api/v1/entities/llmProviders?page=1&size=20
self: http://localhost:3000/api/v1/entities/llmProviders?page=0&size=20
headers:
Content-Type:
- application/json
DATE: &id001
- PLACEHOLDER
Expires:
- '0'
Pragma:
- no-cache
X-Content-Type-Options:
- nosniff
X-GDC-TRACE-ID: *id001
status:
code: 200
message: OK
version: 1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
CatalogCspDirective,
CatalogDeclarativeNotificationChannel,
CatalogJwk,
CatalogLlmProvider,
CatalogOrganization,
CatalogOrganizationSetting,
CatalogRsaSpecification,
Expand Down Expand Up @@ -563,3 +564,19 @@ def test_layout_notification_channels(test_config, snapshot_notification_channel
# sdk.catalog_organization.put_declarative_identity_providers([])
# idps = sdk.catalog_organization.get_declarative_identity_providers()
# assert len(idps) == 0


@gd_vcr.use_cassette(str(_fixtures_dir / "list_llm_providers.yaml"))
def test_list_llm_providers(test_config):
"""LLM provider entities replace the permanently-removed llmEndpoints API.

Exercises ``catalog_organization.list_llm_providers`` and verifies that
the response is deserialized into a proper list of ``CatalogLlmProvider``
objects. The list may be empty on a fresh staging environment.
"""
sdk = GoodDataSdk.create(host_=test_config["host"], token_=test_config["token"])
providers = sdk.catalog_organization.list_llm_providers()
assert isinstance(providers, list)
for provider in providers:
assert isinstance(provider, CatalogLlmProvider)
assert provider.id
Loading