- Issue created by @andrewbelcher
- 🇬🇧United Kingdom MrDaleSmith
The easiest fix for this would be to allow the model to be a null value, but it feels like this would lead to more issues further down the line. Rather than this being a separate issue to how we handle keys that can't access model lists, I think that's the issue we need to focus on: if we decide that these keys can't be used, this specific issue goes away.
I think we need a discussion here about whether there are circumstances under which a key that can't list models can still be used by the AI modules, and if not block them from being used. If we decide they can be used, that's going to need a bit of thought about how we handle the fact that we might not know which model can be used.
- 🇩🇪Germany marcus_johansson
In this case its actually that AWS have such detailed permission layers, that its possible to create a user that can use a model, but not list the models available.
I have created this in the AWS module, since third party modules might run into it:
https://www.drupal.org/project/ai_provider_aws_bedrock/issues/3504540 📌 ListFoundation is not always available (step 1) Active
https://www.drupal.org/project/ai_provider_aws_bedrock/issues/3504541 📌 ListFoundation is not always available (step 2) ActiveOllama has something similar, where you might have turned of your server where Ollama is running, so it handles this case.
I'm not sure if there is a more general solution to it - but for AWS it is anyway good that you can override and set models manually if you don't have access to the models listing endpoint.