-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
39 lines (35 loc) · 1.24 KB
/
config.yaml
File metadata and controls
39 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
model_list:
- model_name: model1
llm_params:
api_type: openai # openai, anthropic, gemini
model: qwen3-8b
api_base: https://dashscope.aliyuncs.com/compatible-mode/v1
api_key: sk-1234
rewrite_header: '{"X-Request-ID": "12345"}' # 非必填
rewrite_body: '{"enable_thinking": false, "max_tokens": 8192}' # 非必填
- model_name: model2
llm_params:
api_type: anthropic
model: glm-4.5-flash
api_base: https://open.bigmodel.cn/api/anthropic
api_key: sk-1234
- model_name: model3
llm_params:
api_type: gemini
model: gemini-2.5-pro
api_base: https://generativelanguage.googleapis.com/v1beta
api_key: sk-1234
router_settings:
strategy: roundrobin # roundrobin,random,leastconn
model_groups:
- name: gpt_models # 调用api的时候使用的名称
models:
- name: model1 # model_list中定义的model_name。weight默认100
selector: '.tools | length == 0'
- name: model2
weight: 100
selector: '.tools | length > 0' # jq表达式返回true时才可能会选择该模型,规则参考https://jqlang.org/manual/
- name: gpt_models2
models:
- name: model1
- name: model3