Skip to content

Comments

feat(gooddata-sdk): [AUTO] add allowed_relationship_types to ai_chat, ai_chat_stream, and search_ai#1349

Open
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P004-allowed-relationship-types
Open

feat(gooddata-sdk): [AUTO] add allowed_relationship_types to ai_chat, ai_chat_stream, and search_ai#1349
yenkins-admin wants to merge 1 commit intomasterfrom
feature/auto-P004-allowed-relationship-types

Conversation

@yenkins-admin
Copy link
Contributor

@yenkins-admin yenkins-admin commented Feb 19, 2026

Expose the new allowedRelationshipTypes field in the ComputeService wrapper methods so SDK consumers can restrict which workspace object relationship types the GenAI service may reference when filtering search results.

Problem: P004 | Workflow: https://github.com/gooddata/gdc-nas/actions/runs/22181963264

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/compute/fixtures/ai_chat_with_allowed_relationship_types.yaml
  • packages/gooddata-sdk/tests/compute/fixtures/ai_chat_stream_with_allowed_relationship_types.yaml
  • packages/gooddata-sdk/tests/compute/fixtures/ai_search_with_allowed_relationship_types.yaml

What changed in gdc-nas

PR #20108 (merge commit 85777a0) added:

  • allowedRelationshipTypes: List<AllowedRelationshipType>? field to ChatRequest Kotlin model and OpenAPI spec
  • Propagation through GenAIProcessor to the gRPC proto (repeated AllowedRelationshipType allowed_relationship_types = 26 in gen_ai.proto)
  • New relationship_filter.py domain module in the gen-ai Python service, invoked from SearchRequestHandler and SearchService
  • The gooddata-api-client was already regenerated to include AllowedRelationshipType model and the new field in ChatRequest/SearchRequest

Related Jira: GDAI-1166, GDAI-1089, QA-26995

What was implemented in SDK

  • Added allowed_relationship_types: Optional[list[AllowedRelationshipType]] = None parameter to ai_chat(), ai_chat_stream(), and search_ai() in ComputeService, forwarding it to the underlying ChatRequest/SearchRequest API client models
  • AllowedRelationshipType (from gooddata_api_client.model.allowed_relationship_type) is now imported in service.py and re-exported from gooddata_sdk.__init__ so SDK consumers can construct filter objects without reaching into the generated client package
  • Three new VCR-cassette-based test functions added to test_compute_service.py covering the new parameter in each affected method

Files modified

  • packages/gooddata-sdk/src/gooddata_sdk/compute/service.py
  • packages/gooddata-sdk/src/gooddata_sdk/__init__.py
  • packages/gooddata-sdk/tests/compute/test_compute_service.py

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

… ai_chat_stream, and search_ai

Expose the new allowedRelationshipTypes field from the regenerated API client
in ComputeService methods ai_chat(), ai_chat_stream(), and search_ai(). Also
re-export AllowedRelationshipType from gooddata_sdk.__init__ so SDK consumers
can construct filter objects without importing from the generated client directly.

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.

1 participant