Skip to content

feat(gooddata-sdk): [AUTO] Remove LLM endpoint schemas and replace with 410 Gone#1620

Open
yenkins-admin wants to merge 2 commits into
masterfrom
auto/openapi-sync-C003-20260518-r25465
Open

feat(gooddata-sdk): [AUTO] Remove LLM endpoint schemas and replace with 410 Gone#1620
yenkins-admin wants to merge 2 commits into
masterfrom
auto/openapi-sync-C003-20260518-r25465

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Summary

Added CatalogResolvedLlmProvider model and resolve_llm_providers() method to CatalogWorkspaceContentService as the SDK-level replacement for the now-removed resolveLlmEndpoints endpoint (which now returns 410 Gone). The old LlmEndpoint-based endpoints were never wrapped in the SDK wrapper layer; this change adds the new resolveLlmProviders action wrapper and exports the result type publicly.

Impact: modification | Services: gooddata-afm-client

Source commits (gdc-nas):

  • 0d015ba by Jan Kadlec — Merge pull request #22495 from hkad98/jkd/llm-entity-removal

Files changed

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.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_workspace_content.py

Agent decisions

Decisions (3)

where to add resolve_llm_providers method — CatalogWorkspaceContentService in content_service.py

  • Alternatives: ComputeService (handles AI workspace actions), CatalogOrganizationService (handles LLM provider CRUD)
  • Why: resolve_llm_providers is a workspace-level configuration query. CatalogWorkspaceContentService already owns workspace-level action calls via _actions_api. ComputeService was the alternative but its AI methods are compute/inference operations, not configuration resolution.

no_changes vs new_feature for removed endpoints — Implement resolve_llm_providers as the replacement wrapper

  • Alternatives: status=no_changes (the removed endpoints were never in the SDK wrapper)
  • Why: The old resolveLlmEndpoints was never wrapped in the SDK. Per task instructions, when sdk_impact=modification but no integration test exists for the changed endpoint, treat as new_feature. The replacement resolveLlmProviders endpoint is the natural SDK addition.

CatalogResolvedLlmProvider model placement — Added to llm_provider.py in the organization entity_model directory

  • Alternatives: Separate file in workspace/entity_model/, Inline dict return from resolve_llm_providers
  • Why: The resolved provider is conceptually related to the LlmProvider domain. Co-locating it with other LLM provider models keeps the domain coherent. It reuses CatalogLlmProviderModel for the models list.
Assumptions to verify (3)
  • The ty check errors in execution.py (pyarrow unresolved import) and filter.py (EmptyValueHandling return type) are pre-existing and not caused by this PR.
  • resolve_llm_providers returns None when the workspace has no LLM provider configured (data field absent or null in response).
  • CatalogLlmProviderModel.id and .family are always non-empty strings per the OpenAPI spec (both are required fields in LlmModel).
Risks (2)
  • ResolvedLlms.data is a oneOf[ResolvedLlmEndpoint, ResolvedLlmProvider] in the current generated client. After the api-client is regenerated to match the new spec (removing ResolvedLlmEndpoint), the discriminator logic changes. The SDK's from_api uses safeget which is type-agnostic, so it should continue to work.
  • The response field 'data' could be missing entirely when no provider is configured; the safeget None-guard handles this.
Layers touched (3)
  • entity_model — Added CatalogResolvedLlmProvider read-only response model.
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.py
  • public_api — Added resolve_llm_providers() to CatalogWorkspaceContentService and exported CatalogResolvedLlmProvider from init.py.
    • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
    • packages/gooddata-sdk/src/gooddata_sdk/catalog/workspace/content_service.py
  • tests — Added test_resolve_llm_providers_integration integration test.
    • packages/gooddata-sdk/tests/catalog/test_catalog_workspace_content.py
OpenAPI diff
--- a/gooddata-afm-client.json
+++ b/gooddata-afm-client.json
@@ -5429,45 +5528,6 @@
-      "ResolvedLlmEndpoint": {
-        "allOf": [
-          { "$ref": "#/components/schemas/ResolvedLlm" },
-          {
-            "properties": {
-              "id": { "description": "Endpoint Id", "type": "string" },
-              "title": { "description": "Endpoint Title", "type": "string" }
-            },
-            "type": "object"
-          }
-        ],
-        "required": [ "id", "title" ],
-        "type": "object"
-      },
-      "ResolvedLlmEndpoints": {
-        "properties": {
-          "data": {
-            "items": { "$ref": "#/components/schemas/ResolvedLlmEndpoint" },
-            "type": "array"
-          }
-        },
-        "required": [ "data" ],
-        "type": "object"
-      },
-      "ValidateLLMEndpointByIdRequest": { ... },
-      "ValidateLLMEndpointRequest": { ... },
-      "ValidateLLMEndpointResponse": { ... },
@@ -6920,31 +6912,14 @@
     "/api/v1/actions/ai/llmEndpoint/test": {
       "post": {
         "deprecated": true,
-        "description": "Will be soon removed and replaced by testLlmProvider.",
+        "description": "Permanently removed. Use POST /api/v1/actions/ai/llmProvider/test instead. Always returns 410 Gone.",
         "responses": {
-          "200": { ... }
+          "410": { "description": "Gone" }
         },
-        "summary": "Validate LLM Endpoint",
+        "summary": "Validate LLM Endpoint (Removed)",
@@ -7654,7 +7613,7 @@
     "/api/v1/actions/workspaces/{workspaceId}/ai/resolveLlmEndpoints": {
       "get": {
         "deprecated": true,
-        "description": "Will be soon removed and replaced by LlmProvider-based resolution.",
+        "description": "Permanently removed. Use GET /api/v1/actions/workspaces/{workspaceId}/ai/resolveLlmProviders instead. Always returns 410 Gone.",
         "responses": {
-          "200": { ... }
+          "410": { "description": "Gone" }
         },
-        "summary": "Get Active LLM Endpoints for this workspace",
+        "summary": "Get Active LLM Endpoints for this workspace (Removed)",

Workflow run


Generated by SDK OpenAPI Sync workflow

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.01%. Comparing base (38b0798) to head (cdf837c).

Files with missing lines Patch % Lines
.../catalog/organization/entity_model/llm_provider.py 80.00% 2 Missing ⚠️
.../gooddata_sdk/catalog/workspace/content_service.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1620   +/-   ##
=======================================
  Coverage   79.01%   79.01%           
=======================================
  Files         231      231           
  Lines       15619    15635   +16     
=======================================
+ Hits        12341    12354   +13     
- Misses       3278     3281    +3     

☔ 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