Skip to content

fix(gooddata-sdk): [AUTO] make LlmProvider models and providerConfig nullable#1446

Merged
hkad98 merged 1 commit intomasterfrom
feature/auto-P020-fix-llm-provider-nullable-fields
Mar 17, 2026
Merged

fix(gooddata-sdk): [AUTO] make LlmProvider models and providerConfig nullable#1446
hkad98 merged 1 commit intomasterfrom
feature/auto-P020-fix-llm-provider-nullable-fields

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

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

Make CatalogLlmProviderAttributes.models and .provider_config optional to match the updated metadata-api OpenAPI spec where both fields are no longer required.

P020 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23194184862

What changed in gdc-nas

  • abb5c41 — Regenerated OpenAPI spec: providerConfig gains nullable: true and models/providerConfig removed from required arrays in JsonApiLlmProviderIn, JsonApiLlmProviderInPatch, and JsonApiLlmProviderOut schemas
  • 06ec721LlmProvider.providerConfig and LlmProvider.models changed from required non-nullable fields to nullable optional (default null) to fix a PATCH 500 error caused by the stock framework attempting to reflectively construct a sealed class via private constructor

Related Jira: GDAI-1350

What was implemented in SDK

  • CatalogLlmProviderAttributes.models: List[CatalogLlmProviderModel]List[CatalogLlmProviderModel] | None = None
  • CatalogLlmProviderAttributes.provider_config: CatalogLlmProviderConfigCatalogLlmProviderConfig | None = None
  • CatalogLlmProvider.from_api(): fixed null-safety — returns None for models and provider_config when the API response contains null, instead of constructing CatalogLlmProviderConfig from an empty dict or iterating over None
  • Aligns CatalogLlmProviderAttributes with the already-correct CatalogLlmProviderPatchAttributes pattern

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

…nullable

CatalogLlmProviderAttributes.models and .provider_config are now
Optional (| None = None) to match the updated OpenAPI spec where
providerConfig and models are no longer required fields. from_api()
now sets both to None (instead of empty list/dict) when the API
returns null, preventing incorrect construction of default objects.

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

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.24%. Comparing base (4dc3f87) to head (a271ae6).

Files with missing lines Patch % Lines
.../catalog/organization/entity_model/llm_provider.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1446   +/-   ##
=======================================
  Coverage   77.24%   77.24%           
=======================================
  Files         227      227           
  Lines       14672    14672           
=======================================
  Hits        11334    11334           
  Misses       3338     3338           

☔ 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 merged commit 8501160 into master Mar 17, 2026
11 of 12 checks passed
@hkad98 hkad98 deleted the feature/auto-P020-fix-llm-provider-nullable-fields branch March 17, 2026 13:53
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