feat: add Baidu Qianfan as a first-class LLM provider#2354
Open
jimmyzhuu wants to merge 1 commit intoarc53:mainfrom
Open
feat: add Baidu Qianfan as a first-class LLM provider#2354jimmyzhuu wants to merge 1 commit intoarc53:mainfrom
jimmyzhuu wants to merge 1 commit intoarc53:mainfrom
Conversation
|
@jimmyzhuu is attempting to deploy a commit to the Arc53 Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature
Why was this change needed?
DocsGPT already supports several first-class cloud LLM providers, but Baidu Qianfan users still had to rely on the generic OpenAI-compatible configuration path.
This change adds Qianfan as a dedicated provider so it can be configured more clearly in
.env, registered in the model registry, and documented alongside the other supported providers.To keep the initial integration easy to review and maintain, this first version is intentionally scoped to text chat with
ernie-5.0. Attachments, tool calling, and structured output remain disabled until they are verified end-to-end against the Qianfan API.What changed:
QianfanLLMprovider underapplication/llmqianfanin the LLM creator, handler creator, settings, and model utilitiesQIANFAN_API_KEYsupport for multi-provider deploymentsernie-5.0as the first built-in Qianfan modelUser-facing configuration:
LLM_PROVIDER=qianfanQIANFAN_API_KEY=YOUR_QIANFAN_API_KEYLLM_NAME=ernie-5.0The initial integration is intentionally scoped to text chat only.
Tests / validation:
qianfanFocused test subset run locally:
tests/llm/test_qianfan_llm.pytests/llm/handlers/test_handler_creator.pytests/core/test_model_settings.pytests/core/test_model_utils.pytests/test_utils.py -k qianfanNotes for reviewers:
tiktokendownload failures in utility tests