Skip to content

Conversation

@julien-nc
Copy link
Member

closes #272

This prevents the model list to be obtained with a network request to the external service when populating the enum values of the task processing providers (which is a problem when the remote service is unreachable).

We now store the model list in a permanent storage (the DB) and it is only refreshed:

  • when the settings page is accessed
  • on upgrade to 3.9.0
  • once a day in a bg job

Copy link
Contributor

@kyteinsky kyteinsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

if (!$refresh) {
if ($this->modelsMemoryCache !== null) {
$this->logger->debug('Getting OpenAI models from the memory cache');
return $this->modelsMemoryCache;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The memory cache is never populated when the value is retrieved from the distributed cache. Might be nice to do that

@julien-nc julien-nc requested a review from marcelklehr October 8, 2025 07:54
Copy link
Member

@marcelklehr marcelklehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not test. looks good.

…e is accessed and on upgrade to 3.9.0 and once a day in a bg job

Signed-off-by: Julien Veyssier <[email protected]>
@julien-nc julien-nc force-pushed the fix/272/unreachable-service branch from 461afcc to ead25f3 Compare October 8, 2025 11:53
@julien-nc julien-nc merged commit 26fedab into main Oct 8, 2025
29 checks passed
@julien-nc julien-nc deleted the fix/272/unreachable-service branch October 8, 2025 11:58
@kyteinsky kyteinsky mentioned this pull request Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

App Causes Dashboard Hang Due to Blocking Network Request When LocalAI Server is Unreachable

4 participants