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
Issue fork ai_provider_litellm-3554855
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lussolucaComment #4
lussolucaComment #5
gxleano commentedComment #6
gxleano commentedLook good to me, Luca!
Nice addition, thanks.
Comment #8
dan2k3k4 commentedMerged
Comment #10
dan2k3k4 commented