Skip to content

AiProviders with a dynamic model list / only visible with apiKey is never re-evaluated #26

Description

@foppelfb

The only place where $catalog->getModels() is executed is in the SymfonyAiCompilerPass Class during Dependency Injection in the method buildBridgeDefinition. It handles the missing list (no apiKey at this point) gracefully and adds the provider to the list of providers. The set Flag $catalogIsDynamic is not passed to the configuration though.

Additionally at no point the model List is re-evaluated once an apiKey is set.

The Problem in itself manifests in the Model [model] drop-down when creating an AI Provider Configuration (tx_aim_configuration), which is never populated in this case.

Additionally the models capabilities are never re-evaluated as well.

I don't see a good solution for this problem as long as the models are evaluated during DependencyInjection, and not during runtime with all configurations available. It probably needs to move into the runtime and be cached via the cachingframework..

Maybe if the catalogIsDynamic flag could be passed to the provider/bridge configuration during the DependencyInjection, to be checked at a later point..

I see this as a problem going forward especially in the DACH region as most of my customers choose to host AI themselves or buy the service from 3rd party hosters in the region, which will only provide an apiKey and potentially a static list of models.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions