Skip to content

feat(gooddata-sdk): [AUTO] Add LlmProvider entity (Bedrock/Azure/OpenAI) and deprecate LlmEndpoint#1566

Open
yenkins-admin wants to merge 2 commits intomasterfrom
auto/openapi-sync-C004-20260420-r82171
Open

feat(gooddata-sdk): [AUTO] Add LlmProvider entity (Bedrock/Azure/OpenAI) and deprecate LlmEndpoint#1566
yenkins-admin wants to merge 2 commits intomasterfrom
auto/openapi-sync-C004-20260420-r82171

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added CatalogResolvedLlm and CatalogListLlmProviderModelsResponse response model classes; added resolve_llm_providers() to CatalogWorkspaceContentService and list_llm_provider_models_by_id() to CatalogOrganizationService; exported both new classes from the public init.py; wrote 4 unit tests (no cassettes) and 1 integration test stub. The LlmProvider entity CRUD (get/list/create/update/delete) was already fully implemented; no LlmEndpoint SDK wrappers existed to deprecate.

Impact: deprecation | Services: gooddata-metadata-client

Files changed

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

Agent decisions

Decisions (4)

resolve_llm_providers placement — Added to CatalogWorkspaceContentService (workspace-scoped)

  • Alternatives: Add to CatalogOrganizationService, Create a separate AI/LLM service
  • Why: The API endpoint /api/v1/actions/workspaces/{workspaceId}/ai/resolveLlmProviders is workspace-scoped, matching the responsibility boundary of CatalogWorkspaceContentService.

list_llm_provider_models_by_id placement — Added to CatalogOrganizationService (org-scoped)

  • Alternatives: Add to workspace content service
  • Why: The API endpoint /api/v1/actions/ai/llmProvider/{llmProviderId}/listModels has no workspace scope, matching the responsibility of CatalogOrganizationService which already owns LlmProvider CRUD.

Response class inheritance — CatalogResolvedLlm and CatalogListLlmProviderModelsResponse do NOT extend Base

  • Alternatives: Extend Base and implement client_class() returning NotImplemented
  • Why: These are pure read-only response objects never sent to the API. They don't need client_class(), to_api(), or from_dict() from Base.

LlmEndpoint deprecation handling — No SDK changes for LlmEndpoint deprecation

  • Alternatives: Add deprecation warnings to the generated client (not allowed — auto-generated)
  • Why: The SDK never had LlmEndpoint CRUD wrappers, so there is nothing in the SDK to mark deprecated. The API-level deprecation on /api/v1/entities/llmEndpoints does not require SDK action.
Assumptions to verify (4)
  • The response.data attribute from resolve_llm_providers() exposes id, title, models fields accessible via safeget (both dict and OpenApiModel are supported by safeget).
  • list_llm_provider_models_by_id() returns an object where success, message, models are accessible by safeget.
  • The LlmProvider entity CRUD already implemented prior to this cluster is correct and complete.
  • The ResolvedLlmsData oneOf (endpoint or provider) always returns id, title, models fields, so CatalogResolvedLlm covers both shapes.
Risks (2)
  • test_list_llm_provider_models_by_id will be skipped if the test environment has no LLM providers configured.
  • resolve_llm_providers returns different shape depending on ENABLE_LLM_ENDPOINT_REPLACEMENT feature flag; CatalogResolvedLlm assumes both shapes share id/title/models.
Layers touched (3)
  • entity_model — Added CatalogResolvedLlm and CatalogListLlmProviderModelsResponse read-only response classes
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.py
  • public_api — Added list_llm_provider_models_by_id() to org service, resolve_llm_providers() to workspace content service, exported new public classes
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/service.py
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/content_service.py
    • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • tests — 4 unit tests for model deserialization + 1 integration test stub needing cassette
    • packages/gooddata-sdk/tests/catalog/test_catalog_organization.py

Source commits (gdc-nas)

  • 31290c9 Merge pull request #21147 from hkad98/jkd/llm-endpoint-to-provider-phase1
  • f15a954 Merge pull request #21038 from hkad98/jkd/llm-provider
  • a19eb19 Merge pull request #21393 from hkad98/jkd/llm-endpoint-deprecation
  • 699c75c Merge pull request #21420 from hkad98/jkd/resolve-llm-provider
  • 456d25a Merge pull request #21526 from gooddata/jkd/llm-provider-sync-default-on
  • c84a24a Merge pull request #21232 from hkad98/jkd/llm-provider-setting
  • 6fe3b97 Merge pull request #20938 from hkad98/jkd/llm-provider-model-listing
  • 151ac81 Merge pull request #21566 from gooddata/rkis/phase4-pr9b-remaining-org-model
  • e06d415 Merge pull request #21533 from gooddata/rkis/phase4-pr9a-org-model-controllers
  • 6d6b21f Merge pull request #21127 from gooddata/rkis/entity-controllers-phase2
  • e822d57 Merge pull request #21064 from gooddata/rkis/entity-controllers-phase1
OpenAPI diff
+      "JsonApiLlmProviderIn": { ... },
+      "JsonApiLlmProviderOut": { ... },
+      "AwsBedrockProviderConfig": {
+        "properties": {
+          "accessKeyId": { "type": "string" },
+          "secretAccessKey": { "type": "string" },
+          "region": { "type": "string" }
+        }
+      },
+      "AzureOpenAiProviderConfig": { ... },
+      "OpenAIProviderConfig": { ... },
+    paths:
+      "/api/v1/entities/llmProviders": { "get": {...}, "post": {...} },
+      "/api/v1/entities/llmProviders/{id}": { "get": {...}, "patch": {...}, "delete": {...} },
     paths:
       "/api/v1/entities/llmEndpoints": {
+        "deprecated": true,
+        "description": "Will be soon removed and replaced by LlmProvider."
       }

Workflow run


Generated by SDK OpenAPI Sync workflow

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 20, 2026

Codecov Report

❌ Patch coverage is 70.96774% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.70%. Comparing base (c00ca3b) to head (6b43dda).
⚠️ Report is 170 commits behind head on master.

Files with missing lines Patch % Lines
.../gooddata_sdk/catalog/workspace/content_service.py 22.22% 7 Missing ⚠️
...k/src/gooddata_sdk/catalog/organization/service.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1566       +/-   ##
===========================================
+ Coverage    0.00%   78.70%   +78.70%     
===========================================
  Files         158      230       +72     
  Lines       11048    15436     +4388     
===========================================
+ Hits            0    12149    +12149     
+ Misses      11048     3287     -7761     

☔ 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.

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