Skip to content

Update ai-experience plugin to query AiModelServerAPI entities #4254

Description

@gabemontero

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions