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
Expand Up @@ -312,8 +312,8 @@ def init(

@define(kw_only=True)
class CatalogLlmProviderAttributes(Base):
models: list[CatalogLlmProviderModel]
provider_config: CatalogLlmProviderConfig
models: list[CatalogLlmProviderModel] | None = None
provider_config: CatalogLlmProviderConfig | None = None
name: str | None = None
description: str | None = None
default_model_id: str | None = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
CatalogDeclarativeNotificationChannel,
CatalogJwk,
CatalogLlmEndpoint,
CatalogLlmProvider,
CatalogLlmProviderPatch,
CatalogOrganization,
CatalogOrganizationSetting,
CatalogRsaSpecification,
Expand Down Expand Up @@ -556,6 +558,21 @@ def test_delete_llm_endpoint(test_config):
pass


@gd_vcr.use_cassette(str(_fixtures_dir / "patch_llm_provider.yaml"))
def test_patch_llm_provider_name_only(test_config):
sdk = GoodDataSdk.create(host_=test_config["host"], token_=test_config["token"])

provider_id = "openai-provider"
patched_name = "Patched OpenAI Provider"

llm_provider_patch = CatalogLlmProviderPatch.init(id=provider_id, name=patched_name)
updated_provider = sdk.catalog_organization.update_llm_provider(llm_provider_patch)

assert isinstance(updated_provider, CatalogLlmProvider)
assert updated_provider.id == provider_id
assert updated_provider.attributes.name == patched_name


#
# The following tests are commented out as they require the organization to have the FEDERATED_IDENTITY_MANAGEMENT
# entitlement enabled which cannot be done via SDK and must be done by GoodData support.
Expand Down
Loading