Skip to content

fix(gooddata-sdk): [AUTO] make LlmProvider models and provider_config optional for PATCH support#1405

Open
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P001-fix-llm-provider-nullable-fields
Open

fix(gooddata-sdk): [AUTO] make LlmProvider models and provider_config optional for PATCH support#1405
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P001-fix-llm-provider-nullable-fields

Conversation

@yenkins-admin
Copy link
Contributor

@yenkins-admin yenkins-admin commented Mar 12, 2026

Make CatalogLlmProviderAttributes.models and provider_config optional (| None = None) to align with the updated OpenAPI spec that removes these fields from required in JsonApiLlmProviderIn/Patch attributes.

P001 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/22995241596

Caution

Test fixtures need recording. The following fixture files are referenced by tests but do not exist yet.
They must be recorded against a live GoodData server before merging:

  • packages/gooddata-sdk/tests/catalog/fixtures/organization/patch_llm_provider.yaml

What changed in gdc-nas

  • 06ec721: Made LlmProvider.providerConfig and LlmProvider.models fields nullable in the Kotlin model. Updated grpc client extension and services for null-safe access. Added requireNotNull validation in LlmProviderValidator.validate() for POST/PUT so these fields remain required there. Added a PATCH test with only the name field.
  • abb5c41: Regenerated the metadata-api OpenAPI spec — removed models and providerConfig from required fields in JsonApiLlmProviderIn and JsonApiLlmProviderPatch attributes, added nullable: true to providerConfig, and made attributes optional (only id and type required) for JsonApiLlmProviderIn, JsonApiLlmProviderPatch, and JsonApiLlmProviderOut.

Related PRs: #21121, #21128
JIRA: GDAI-1350

What was implemented in SDK

  • Changed CatalogLlmProviderAttributes.models from list[CatalogLlmProviderModel] to list[CatalogLlmProviderModel] | None = None
  • Changed CatalogLlmProviderAttributes.provider_config from CatalogLlmProviderConfig to CatalogLlmProviderConfig | None = None
  • Added test_patch_llm_provider_name_only test using a VCR cassette that sends only the name field (no providerConfig, no models)

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.py
  • packages/gooddata-sdk/tests/catalog/test_catalog_organization.py

JIRA: PENDING (Jira ticket will be created after review)
Risk: Low

… optional

Updated CatalogLlmProviderAttributes to declare models and provider_config
as Optional (| None = None) to align with the updated OpenAPI spec that
removes these from required fields, enabling valid PATCH requests that
omit these fields. Added test for PATCH with name-only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant