File size: 8,236 Bytes
c5a9402
 
 
 
d7c13d5
 
 
 
 
 
3c5cb2c
d7c13d5
 
 
 
3c5cb2c
d7c13d5
 
 
 
3c5cb2c
d7c13d5
 
 
 
3c5cb2c
d7c13d5
a2afbad
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8613c25
3c5cb2c
 
 
 
 
 
 
 
6e42a29
 
8613c25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c5a9402
8613c25
 
3c5cb2c
 
 
 
 
 
 
 
6e42a29
 
c5a9402
3c5cb2c
 
 
 
 
 
 
 
6e42a29
 
af413b3
8613c25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
af413b3
 
 
c5a9402
88aceaf
c5a9402
 
5931289
c5a9402
 
6e42a29
88aceaf
 
9e1a125
88aceaf
 
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# aistudio gemini free, Rate Limits https://ai.google.dev/pricing#1_5pro
# gemini-1.5-pro: 2 rpm, 32,000 tpm, 1,500 RPD
# gemini-1.5-flash: 15 rpm, 1,000,000 tpm, 50 RPD

model_list:
# northflank
  - model_name: gpt-4o-mini-northflank
    litellm_params:
      model: openai/gpt-4o-mini
      api_base: https://yc--northflank-duckapi--b69bn8cbbs7k.code.run/v1
      api_key: os.environ/NF_API_KEY
  - model_name: gpt-4o-mini
    litellm_params:
      model: openai/gpt-4o-mini
      api_base: https://yc--northflank-duckapi--b69bn8cbbs7k.code.run/v1
      api_key: os.environ/NF_API_KEY
  - model_name: gpt-3.5-turbo-northflank
    litellm_params:
      model: openai/gpt-3.5-turbo
      api_base: https://yc--northflank-duckapi--b69bn8cbbs7k.code.run/v1
      api_key: os.environ/NF_API_KEY
  - model_name: gpt-3.5-turbo
    litellm_params:
      model: openai/gpt-3.5-turbo
      api_base: https://yc--northflank-duckapi--b69bn8cbbs7k.code.run/v1
      api_key: os.environ/NF_API_KEY

# github
  - model_name: gpt-4o-k1
    litellm_params:
      model: github/gpt-4o
      api_base: https://models.inference.ai.azure.com
      api_key: os.environ/GITHUB_API_KEY1
  - model_name: gpt-4o-mini-K1
    litellm_params:
      model: github/gpt-4o-mini
      api_base: https://models.inference.ai.azure.com
      api_key: os.environ/GITHUB_API_KEY1
  - model_name: gpt-4o-k2
    litellm_params:
      model: github/gpt-4o
      api_base: https://models.inference.ai.azure.com
      api_key: os.environ/GITHUB_API_KEY2
  - model_name: gpt-4o-mini-K2
    litellm_params:
      model: github/gpt-4o-mini
      api_base: https://models.inference.ai.azure.com
      api_key: os.environ/GITHUB_API_KEY2

# --------------gemini-1.5-pro--------------------
  - model_name: gemini-1.5-pro-k1
    litellm_params:
      model: gemini/gemini-1.5-pro
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-pro
    litellm_params:
      model: gemini/gemini-1.5-pro
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 4  # 2 * # of keys
      tpm: 6400 # 32,000 * # of keys
  - model_name: gemini-1.5-pro-k2
    litellm_params:
      model: gemini/gemini-1.5-pro
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-pro
    litellm_params:
      model: gemini/gemini-1.5-pro
      api_key: os.environ/GEMINI_API_KEY
      rpm: 4  # 2 * # of keys
      tpm: 6400 # 32,000 * # of keys

  - model_name: gemini-1.5-pro-002-k1
    litellm_params:
      model: gemini/gemini-1.5-pro-002
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-pro-002
    litellm_params:
      model: gemini/gemini-1.5-flash-002
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys
      
  - model_name: gemini-1.5-pro-002-k2
    litellm_params:
      model: gemini/gemini-1.5-pro-002
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-pro-002
    litellm_params:
      model: gemini/gemini-1.5-pro-002
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-pro-exp-k1
    litellm_params:
      model: gemini/gemini-1.5-pro-exp
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-pro-exp
    litellm_params:
      model: gemini/gemini-1.5-pro-exp
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-pro-exp-k2
    litellm_params:
      model: gemini/gemini-1.5-pro-exp
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-pro-exp
    litellm_params:
      model: gemini/gemini-1.5-pro-exp
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys
      
# --------------gemini-exp-1121--------------------
  - model_name: gemini-exp-1121-k1
    litellm_params:
      model: gemini/gemini-exp-1121
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-exp-1121
    litellm_params:
      model: gemini/gemini-exp-1121
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 10  # 2 * # of keys
      tpm: 5000000 # 32,000 * # of keys

  - model_name: gemini-exp-1121-k2
    litellm_params:
      model: gemini/gemini-exp-1121
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-exp-1121
    litellm_params:
      model: gemini/gemini-exp-1121
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 10  # 2 * # of keys
      tpm: 5000000 # 32,000 * # of keys

# --------------gemini-exp-1114--------------------
  - model_name: gemini-exp-1114-k1
    litellm_params:
      model: gemini/gemini-exp-1114
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-exp-1114
    litellm_params:
      model: gemini/gemini-exp-1114
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 10  # 2 * # of keys
      tpm: 5000000 # 32,000 * # of keys

  - model_name: gemini-exp-1114-k2
    litellm_params:
      model: gemini/gemini-exp-1114
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-exp-1114
    litellm_params:
      model: gemini/gemini-exp-1114
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 10  # 2 * # of keys
      tpm: 5000000 # 32,000 * # of keys

# --------------gemini-1.5-flash--------------------
      
  - model_name: gemini-1.5-flash-k1
    litellm_params:
      model: gemini/gemini-1.5-flash
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-flash
    litellm_params:
      model: gemini/gemini-1.5-flash
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 30  # 15 * # of keys
      tpm: 2000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-flash-k2
    litellm_params:
      model: gemini/gemini-1.5-flash
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-flash
    litellm_params:
      model: gemini/gemini-1.5-flash
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 30  # 15 * # of keys
      tpm: 2000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-flash-002-k1
    litellm_params:
      model: gemini/gemini-1.5-flash-002
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-flash-002
    litellm_params:
      model: gemini/gemini-1.5-flash-002
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys
      
  - model_name: gemini-1.5-flash-002-k2
    litellm_params:
      model: gemini/gemini-1.5-flash-002
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-flash-002
    litellm_params:
      model: gemini/gemini-1.5-flash-002
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-flash-exp-k1
    litellm_params:
      model: gemini/gemini-1.5-flash-exp
      api_key: os.environ/GEMINI_API_KEY1
  - model_name: gemini-1.5-flash-exp
    litellm_params:
      model: gemini/gemini-1.5-flash-exp
      api_key: os.environ/GEMINI_API_KEY1
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys

  - model_name: gemini-1.5-flash-exp-k2
    litellm_params:
      model: gemini/gemini-1.5-flash-exp
      api_key: os.environ/GEMINI_API_KEY2
  - model_name: gemini-1.5-flash-exp
    litellm_params:
      model: gemini/gemini-1.5-flash-exp
      api_key: os.environ/GEMINI_API_KEY2
      rpm: 75  # 15 * # of keys
      tpm: 5000000 # 1,000,000 * # of keys

litellm_settings:
  # Networking settings
  request_timeout: 20 # (int) llm request timeout in seconds. Raise Timeout error if call takes longer than 10s. Sets litellm.request_timeout
  num_retries: 3
  fallbacks: [{"gemini-1.5-pro": ["gemini-1.5-flash"]}]
  allowed_fails: 3 # cooldown model if it fails > 1 call in a minute.
  cooldown_time: 30 # how long to cooldown model if fails/min > allowed_fails
  drop_params: true

general_settings:
  master_key: os.environ/MASTER_KEY  # sk-1234 # [OPTIONAL] Only use this if you require all calls to contain this key (Authorization: Bearer sk-1234)

router_settings:
  fallbacks: [{"gpt-4o-mini": ["gemini-1.5-flash"]}, {"gpt-3.5-turbo": ["gemini-1.5-flash"]}]
  model_group_alias: {"gpt-4": "gemini-1.5-pro"}
  routing_strategy: simple-shuffle