Skip to content

fix(gooddata-sdk): [AUTO] make CatalogLlmProviderAttributes.models and provider_config nullable#1420

Closed
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P003-nullable-llm-provider-fields
Closed

fix(gooddata-sdk): [AUTO] make CatalogLlmProviderAttributes.models and provider_config nullable#1420
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P003-nullable-llm-provider-fields

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Make CatalogLlmProviderAttributes.models and provider_config nullable to align with updated OpenAPI spec from GDAI-1350.
Problem ID: P003 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23137028021

What changed in gdc-nas

Two commits landed in gdc-nas to fix a 500 error on PATCH LlmProvider operations (GDAI-1350):

  • 06ec721 — Made LlmProvider.providerConfig and LlmProvider.models nullable in the Kotlin model (LlmProviderConfig? = null, List<LlmModel>? = null). Added requireNotNull validation in LlmProviderValidator for POST/PUT. Updated EncryptionService and OrganizationApiStockService for null-safe calls. Added patch.json test fixture that patches only the name field.
  • abb5c41 — Regenerated OpenAPI spec: removed models and providerConfig from required[] in LlmProvider attributes schema; removed attributes from required[] in JsonApiLlmProviderPatch, JsonApiLlmProviderIn, and JsonApiLlmProviderOut documents; added nullable: true to providerConfig in those three schema locations.

What was implemented in SDK

Updated CatalogLlmProviderAttributes in the SDK wrapper to reflect the updated OpenAPI schema:

  • models: list[CatalogLlmProviderModel]list[CatalogLlmProviderModel] | None = None
  • provider_config: CatalogLlmProviderConfigCatalogLlmProviderConfig | None = None

CatalogLlmProviderPatchAttributes already had both fields optional — no change needed there. CatalogLlmProvider.from_api() already used safeget with fallbacks, so it handles null values from API responses safely.

Files modified

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

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

…d provider_config nullable

Makes models and provider_config fields optional (| None = None) in
CatalogLlmProviderAttributes to match the updated OpenAPI spec that removed
these fields from the required[] array and added nullable:true to providerConfig.
This fixes deserialization of PATCH responses where these fields may be absent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.36%. Comparing base (b95ca11) to head (3c9b3c1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1420   +/-   ##
=======================================
  Coverage   77.36%   77.36%           
=======================================
  Files         228      228           
  Lines       14775    14775           
=======================================
  Hits        11430    11430           
  Misses       3345     3345           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hkad98 hkad98 closed this Mar 17, 2026
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.

2 participants