redhat-developer / redhat-developer/rhdh-plugins

Update ai-experience plugin to query AiModelServerAPI entities

Open
#4,254 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked workspace/ai-integrations
Dominant language
TypeScript
Stars
48
Forks
120
Avg merge
2d 6h
Merged PRs (30d)
337

Description

Summary

After PR #4211 (issue #4209), the model catalog entity provider emits AiModelServerAPI entities with spec.type: 'ai-model-server' instead of the previous Resource entities with spec.type: 'ai-model' (plus Component and API entities). The ai-experience plugin still queries for the old entity shapes and needs to be updated.

Affected code

  1. plugins/ai-experience-backend/src/services/ModelService/ModelService.ts:73-74 — queries { kind: 'Resource', 'spec.type': 'ai-model' }, which will return zero results after the entity provider change.

  2. plugins/ai-experience/src/components/ModelSection/ModelSection.tsx:54-55 — builds a catalog link with filters[kind]=resource&filters[type]=ai-model, which will show no results in the UI.

What to change

Update both locations to query for { kind: 'AiModelServerAPI', 'spec.type': 'ai-model-server' } and adjust any response handling for the new entity shape (models are now in spec.models.available instead of being separate Resource entities).

Context

  • PR #4211 / issue #4209 introduced the AiModelServerAPI kind
  • The ai-experience plugin is expected to be replaced, but should be updated in the interim to avoid a broken model section

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with plugins/ai-experience-backend/src/services/ModelService/ModelService.ts:73-74 and plugins/ai-experience/src/components/ModelSection/ModelSection.tsx:54-55, then review PR #4211 or issue #4209 for the AiModelServerAPI entity shape. Update both queries and response handling for spec.models.available, and verify that the model section displays the available models and its catalog link returns results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.