Skip to content

feat(gooddata-sdk): [AUTO] deprecate LlmEndpoint, add ResolvedLlmProvider wrappers and resolveLlmProviders#1425

Closed
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P002-llm-provider-deprecation
Closed

feat(gooddata-sdk): [AUTO] deprecate LlmEndpoint, add ResolvedLlmProvider wrappers and resolveLlmProviders#1425
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P002-llm-provider-deprecation

Conversation

@yenkins-admin
Copy link
Copy Markdown
Contributor

Migrate gooddata-sdk to reflect gdc-nas LlmEndpoint deprecation: make default_model_id mandatory on CatalogLlmProviderAttributes, add CatalogResolvedLlm* wrapper classes, and expose a new resolve_llm_providers() service method.

Problem: P002 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/23137028021

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/resolve_llm_providers.yaml

What changed in gdc-nas

A multi-phase migration deprecated LlmEndpoint in favor of LlmProvider across afm-exec-api and metadata-api:

  • 31290c9 — Phase 1: Gate LlmEndpoint/LlmProvider behind feature flag ENABLE_LLM_ENDPOINT_REPLACEMENT; refactor AIController for active LLM resolution
  • a19eb19 — Phase 2: Mark LlmEndpoint model and all five metadata-api CRUD operations + three afm-exec-api action endpoints as deprecated in OpenAPI specs
  • 699c75c — Phase 3: Add new GET /api/v1/actions/workspaces/{workspaceId}/ai/resolveLlmProviders endpoint with new ResolvedLlm, ResolvedLlmProvider, and ResolvedLlms models
  • 6b89041 — Phase 4: Make defaultModelId mandatory (non-nullable) on LlmProvider; throws BadRequestException if null on create or PATCH

What was implemented in SDK

  • Made default_model_id mandatory (str, not str | None) in CatalogLlmProviderAttributes to match the backend constraint that now throws BadRequestException for null values
  • Added new CatalogResolvedLlm, CatalogResolvedLlmProvider, and CatalogResolvedLlms wrapper classes in a new resolved_llm_provider.py module
  • Added resolve_llm_providers(workspace_id) service method on CatalogOrganizationService
  • Exported all new classes from gooddata_sdk.__init__
  • Added test_resolve_llm_providers integration test (cassette must be recorded once API client is regenerated with the new endpoint)

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/llm_provider.py
  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/entity_model/resolved_llm_provider.py (new)
  • packages/gooddata-sdk/src/gooddata_sdk/catalog/organization/service.py
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • packages/gooddata-sdk/tests/catalog/test_catalog_organization.py

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

…ider wrappers and resolveLlmProviders

- Make default_model_id required (non-nullable) in CatalogLlmProviderAttributes to match backend constraint
- Add CatalogResolvedLlm, CatalogResolvedLlmProvider, CatalogResolvedLlms wrappers for the new resolveLlmProviders endpoint
- Add resolve_llm_providers(workspace_id) service method on CatalogOrganizationService
- Export new classes from gooddata_sdk.__init__
- Add test_resolve_llm_providers integration test (cassette to be recorded)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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