fix(gooddata-sdk): [AUTO] make LlmProvider models and provider_config optional for PATCH support#1405
Open
yenkins-admin wants to merge 1 commit intomasterfrom
Open
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make
CatalogLlmProviderAttributes.modelsandprovider_configoptional (| None = None) to align with the updated OpenAPI spec that removes these fields fromrequiredinJsonApiLlmProviderIn/Patchattributes.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.yamlWhat changed in gdc-nas
LlmProvider.providerConfigandLlmProvider.modelsfields nullable in the Kotlin model. Updated grpc client extension and services for null-safe access. AddedrequireNotNullvalidation inLlmProviderValidator.validate()for POST/PUT so these fields remain required there. Added a PATCH test with only thenamefield.modelsandproviderConfigfromrequiredfields inJsonApiLlmProviderInandJsonApiLlmProviderPatchattributes, addednullable: truetoproviderConfig, and madeattributesoptional (onlyidandtyperequired) forJsonApiLlmProviderIn,JsonApiLlmProviderPatch, andJsonApiLlmProviderOut.Related PRs: #21121, #21128
JIRA: GDAI-1350
What was implemented in SDK
CatalogLlmProviderAttributes.modelsfromlist[CatalogLlmProviderModel]tolist[CatalogLlmProviderModel] | None = NoneCatalogLlmProviderAttributes.provider_configfromCatalogLlmProviderConfigtoCatalogLlmProviderConfig | None = Nonetest_patch_llm_provider_name_onlytest using a VCR cassette that sends only thenamefield (noproviderConfig, nomodels)Files modified
packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.pypackages/gooddata-sdk/tests/catalog/test_catalog_organization.pyJIRA: PENDING (Jira ticket will be created after review)
Risk: Low