fix: working

This commit is contained in:
ali00209
2024-10-29 08:19:30 +05:00
parent 3c7bf8c259
commit a544611a56
9 changed files with 93 additions and 20 deletions

View File

@@ -80,8 +80,8 @@ export function getOpenRouterModel(apiKey: string, model: string) {
return openRouter.chat(model);
}
export function getModel(provider: string, model: string, env: Env) {
const apiKey = getAPIKey(env, provider);
export function getModel(provider: string, model: string, env: Env, apiKeys?: Record<string, string>) {
const apiKey = getAPIKey(env, provider, apiKeys);
const baseURL = getBaseURL(env, provider);
switch (provider) {