Repository navigation
[Feature Request]: LLMConfig respect None api key value #815
CatBraaain
started this conversation in
Feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
What needs to be done?
This goes
{'provider': 'openrouter/deepseek/deepseek-r1:free', 'api_token': 'no-token', 'base_url': None}But i need
{'provider': 'openrouter/deepseek/deepseek-r1:free', 'api_token': None, 'base_url': None}Because api_token must be None for LiteLLM resolving api key automatically from reading
.envfile.What problem does this solve?
This feature solve the problem LLMConfig not supporting all providers/models of LiteLLM supported.
Target users/beneficiaries
Users
Current alternatives/workarounds
Overwrite api_token prop after constructor
Proposed approach
Make api key argument Noneable.
Even passing only provider/model name to LiteLLM, LiteLLM read
.envfile and set api key automatically.This is useful to use fallbacks.
using fallbacks like this
All reactions