Add proxy configuration to more network fetches. (#7328)
This commit is contained in:
1 parent
ba98b44504
commit
67bc9932e5
21 files changed
+48
-11
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { EmptyRequest } from "@shared/proto/cline/common"
|
||||
import { OpenRouterCompatibleModelInfo, OpenRouterModelInfo } from "@shared/proto/cline/models"
|
||||
import axios from "axios"
|
||||
import { getAxiosSettings } from "@/shared/net"
|
||||
import { Controller } from ".."
|
||||
|
||||
/**
|
||||
@@ -11,7 +12,7 @@ import { Controller } from ".."
|
||||
*/
|
||||
export async function getAihubmixModels(_controller: Controller, _request: EmptyRequest): Promise<OpenRouterCompatibleModelInfo> {
|
||||
try {
|
||||
const response = await axios.get("https://aihubmix.com/call/mdl_info_platform?tag=coding")
|
||||
const response = await axios.get("https://aihubmix.com/call/mdl_info_platform?tag=coding", getAxiosSettings())
|
||||
|
||||
if (!response.data?.success || !Array.isArray(response.data?.data)) {
|
||||
console.error("Invalid response from AIhubmix API:", response.data)
|
||||
|
||||
Reference in new issue
Block a user