Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Order/disable endpoints with ENDPOINTS env var #1206

Merged
merged 3 commits into from
Nov 22, 2023

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Nov 22, 2023

Summary

In your .env file,

Uncomment the ENDPOINTS variable to determine which endpoints are available.
Listed here are the only accepted values, which are all enabled if an authentication
option is provided, whether user provided or admin provided in this .env file.
Note: the first value is considered the default value.

Also note that clicking on a conversation will make that conversation's endpoint the target endpoint for a new chat, and saves this in local storage.

# ENDPOINTS=openAI,azureOpenAI,bingAI,chatGPTBrowser,google,gptPlugins,anthropic

Also closes #1205

From discussion #1158

Change Type

  • New feature (non-breaking change which adds functionality)

Testing

Manual testing

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.

@danny-avila danny-avila merged commit f340240 into main Nov 22, 2023
@danny-avila danny-avila deleted the default-endpoints branch November 22, 2023 18:56
@zimmra
Copy link
Contributor

zimmra commented Jan 31, 2024

@danny-avila this seems to not handle custom endpoints

Observations:

  • The custom endpoints are always grouped together in the list
  • The custom endpoints adhere to the order they are in within librechat.yaml
  • The custom endpoints order within all available endpoints cannot be set, they seemingly completely disregard the ENDPOINTS variable and they 'want' to be at the top of the list. The only thing that overrides this behavior is setting a different natively supported provider in the list first.

You can test this by having a custom provider and typing any random string as your first ENDPOINTS value.
In these examples I have OpenRouter configured as my first entry within librechat.yaml and OpenAI via Copilot as my second entry

  • ENDPOINTS=bingAI,google,OpenRouter,OpenAI via Copilot,openAI,gptPlugins
    • This results in the following order: Bing > OpenRouter > OpenAI via Copilot > Google > OpenAI > GPT Plugins
  • ENDPOINTS=randomstring,bingAI,google,OpenRouter,OpenAI via Copilot,openAI,gptPlugins
    • This results in the order OpenRouter > OpenAI via Copilot > Bing > Google > OpenAI > GPT Plugins

If I change the order of OpenRouter and OpenAI via Copilot within the librechat.yaml they adhere to that and change places.

cnkang pushed a commit to cnkang/LibreChat that referenced this pull request Feb 6, 2024
* fix: endpoint will not be select if disabled

* feat: order and disable endpoints with ENDPOINTS env var

* chore: remove console.log
jinzishuai pushed a commit to aitok-ai/LibreChat that referenced this pull request May 20, 2024
* fix: endpoint will not be select if disabled

* feat: order and disable endpoints with ENDPOINTS env var

* chore: remove console.log
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
* fix: endpoint will not be select if disabled

* feat: order and disable endpoints with ENDPOINTS env var

* chore: remove console.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: OpenAI ChatGPT is default model when not enabled
2 participants