[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-10-09 08:18:17 +00:00
committed by GitHub
parent 9b81d15b0c
commit 8de5001471
2 changed files with 11 additions and 11 deletions
+6 -6
View File
@@ -62,12 +62,12 @@ export const aiRouter = createTRPCRouter({
case "ollama": case "ollama":
response = await fetch(`${input.apiUrl}/api/tags`, { headers }); response = await fetch(`${input.apiUrl}/api/tags`, { headers });
break; break;
case "gemini": case "gemini":
response = await fetch( response = await fetch(
`${input.apiUrl}/models?key=${encodeURIComponent(input.apiKey)}`, `${input.apiUrl}/models?key=${encodeURIComponent(input.apiKey)}`,
{ headers: {} } { headers: {} },
); );
break; break;
default: default:
if (!input.apiKey) if (!input.apiKey)
throw new TRPCError({ throw new TRPCError({
@@ -69,11 +69,11 @@ export function selectAIProvider(config: { apiUrl: string; apiKey: string }) {
}); });
case "gemini": case "gemini":
return createOpenAICompatible({ return createOpenAICompatible({
name:"gemini", name: "gemini",
baseURL:config.apiUrl, baseURL: config.apiUrl,
queryParams:{ key: config.apiKey}, queryParams: { key: config.apiKey },
headers:{} headers: {},
}) });
case "custom": case "custom":
return createOpenAICompatible({ return createOpenAICompatible({
name: "custom", name: "custom",