Use overridden config to query for key data on settings form

Created on 28 October 2025, 14 days ago

Problem/Motivation

LiteLLM host and api_key are usually environment-specific. A typical use case is to expose their values as environment variables and then map the envs to config in settings.php.
The settings form of the module always uses the non-overridden values to query for key data, resulting in errors on environments where the host or the key was overridden.

Steps to reproduce

Override the host configuration in settings.php, like: $config['ai_provider_litellm.settings']['host'] = getenv('LITELLM_HOST');. The keyInfo call used on LiteLlmAiConfigForm always uses the stored config, instead of the overridden ones.

Proposed resolution

Load the overridden configuration to call the keyInfo endpoint in the settings form.

Remaining tasks

implement it

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇮🇹Italy lussoluca Italy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024