Feat/support 302ai provider (#8742)

### What problem does this PR solve?

Support 302.AI provider.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
JI4JUN
2025-07-31 14:48:30 +08:00
committed by GitHub
parent 46ded9d329
commit aeaeb169e4
10 changed files with 205 additions and 13 deletions

View File

@ -0,0 +1 @@
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>302.AI</title><path d="M13.086 23.25c5.614 0 10.164-4.559 10.164-10.182 0-5.624-4.55-10.182-10.164-10.182-5.613 0-10.163 4.558-10.163 10.182 0 5.623 4.55 10.182 10.163 10.182z" fill="#3F3FAA"></path><path d="M10.914 21.114c5.613 0 10.163-4.559 10.163-10.182S16.527.75 10.914.75C5.3.75.75 5.309.75 10.932S5.3 21.114 10.914 21.114z" fill="#8E47FF"></path><path d="M10.755 17.708c-.722 0-1.416-.24-1.995-.69a3.25 3.25 0 01-1.23-2.177 3.248 3.248 0 01-.006-.782c-.201.04-.407.056-.618.056a3.265 3.265 0 01-3.261-3.262A3.27 3.27 0 017.65 7.67a3.27 3.27 0 013.241-3.638 3.266 3.266 0 013.242 3.577 3.269 3.269 0 012.694 5.693 3.227 3.227 0 01-2.365.782 3.26 3.26 0 01-.466-.066c0 .008.005.014.005.02a3.254 3.254 0 01-.664 2.41 3.235 3.235 0 01-2.583 1.259zm-1.808-4.313c-.228.397-.32.847-.263 1.304a2.092 2.092 0 002.335 1.826 2.086 2.086 0 001.398-.791 2.08 2.08 0 00.425-1.548 2.091 2.091 0 00-.405-1.004 3.253 3.253 0 01-.39-.462.58.58 0 11.947-.675c.044.062.088.117.137.173a.61.61 0 01.111.101l.056.071a2.096 2.096 0 003.49-1.405 2.096 2.096 0 00-1.93-2.248 2.076 2.076 0 00-1.251.304.579.579 0 01-.648.061.59.59 0 01-.233-.796A2.102 2.102 0 0010.888 5.2 2.1 2.1 0 009.14 8.457l.03.056c.61.594.993 1.42.993 2.339A3.273 3.273 0 018.947 13.4v-.005zM6.901 8.752a2.098 2.098 0 00-2.092 2.1c0 1.16.936 2.101 2.092 2.101a2.1 2.1 0 000-4.201z" fill="#fff"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -50,6 +50,7 @@ export enum LLMFactory {
GPUStack = 'GPUStack',
VLLM = 'VLLM',
GiteeAI = 'GiteeAI',
Ai302 = '302.AI',
DeepInfra = 'DeepInfra',
}
@ -106,5 +107,6 @@ export const IconMap = {
[LLMFactory.GPUStack]: 'gpustack',
[LLMFactory.VLLM]: 'vllm',
[LLMFactory.GiteeAI]: 'gitee-ai',
[LLMFactory.Ai302]: 'ai302',
[LLMFactory.DeepInfra]: 'deepinfra',
};

View File

@ -43,6 +43,7 @@ const orderFactoryList = [
LLMFactory.ZhipuAI,
LLMFactory.Ollama,
LLMFactory.Xinference,
LLMFactory.Ai302,
];
export const sortLLmFactoryListBySpecifiedOrder = (list: IFactory[]) => {