Skip to content

Commit e0d4ec8

Browse files
committed
chore: indentation fi and headers order fix
1 parent 3ab37c7 commit e0d4ec8

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

src/api/providers/fetchers/__tests__/litellm.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ describe("getLiteLLMModels", () => {
3333
headers: {
3434
Authorization: "Bearer test-api-key",
3535
"Content-Type": "application/json",
36-
...DEFAULT_HEADERS,
37-
36+
...DEFAULT_HEADERS,
3837
},
39-
4038
timeout: 5000,
4139
})
4240
})
@@ -87,8 +85,7 @@ describe("getLiteLLMModels", () => {
8785
headers: {
8886
Authorization: "Bearer test-api-key",
8987
"Content-Type": "application/json",
90-
...DEFAULT_HEADERS,
91-
88+
...DEFAULT_HEADERS,
9289
},
9390
timeout: 5000,
9491
})
@@ -131,8 +128,7 @@ describe("getLiteLLMModels", () => {
131128
expect(mockedAxios.get).toHaveBeenCalledWith("http://localhost:4000/v1/model/info", {
132129
headers: {
133130
"Content-Type": "application/json",
134-
...DEFAULT_HEADERS,
135-
131+
...DEFAULT_HEADERS,
136132
},
137133
timeout: 5000,
138134
})

src/api/providers/fetchers/litellm.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ export async function getLiteLLMModels(apiKey: string, baseUrl: string): Promise
1919
try {
2020
const headers: Record<string, string> = {
2121
"Content-Type": "application/json",
22-
...DEFAULT_HEADERS,
23-
22+
...DEFAULT_HEADERS
2423
}
2524

2625
if (apiKey) {

src/api/providers/router-provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ export abstract class RouterProvider extends BaseProvider {
5050
baseURL,
5151
apiKey,
5252
defaultHeaders: {
53-
...DEFAULT_HEADERS,
54-
...(options.openAiHeaders || {})
53+
...(options.openAiHeaders || {}),
54+
...DEFAULT_HEADERS
5555
}
5656
}) }
5757

0 commit comments

Comments
 (0)