Skip to content

Commit dd1a635

Browse files
authored
🐛 fix: remove debug logging from ModelRuntime and async caller (#8525)
1 parent d87919e commit dd1a635

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

src/libs/model-runtime/ModelRuntime.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { log } from 'debug';
21
import { ClientOptions } from 'openai';
32

43
import type { TracePayload } from '@/const/trace';
@@ -112,13 +111,6 @@ class ModelRuntime {
112111
LobeCloudflareParams & { apiKey?: string; apiVersion?: string; baseURL?: string }
113112
>,
114113
) {
115-
// @ts-expect-error ignore
116-
if (providerRuntimeMap[provider]) {
117-
log('Provider runtime map found for provider: %s', provider);
118-
} else {
119-
log('Provider runtime map not found for provider: %s', provider);
120-
}
121-
122114
// @ts-expect-error runtime map not include vertex so it will be undefined
123115
const providerAI = providerRuntimeMap[provider] ?? LobeOpenAI;
124116
const runtimeModel: LobeRuntimeAI = new providerAI(params);

src/server/routers/async/caller.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { createTRPCClient, httpLink } from '@trpc/client';
2-
import debug from 'debug';
32
import superjson from 'superjson';
43
import urlJoin from 'url-join';
54

@@ -14,11 +13,7 @@ import { KeyVaultsGateKeeper } from '@/server/modules/KeyVaultsEncrypt';
1413
import { asyncRouter } from './index';
1514
import type { AsyncRouter } from './index';
1615

17-
const log = debug('lobe-image:async-caller');
18-
1916
export const createAsyncServerClient = async (userId: string, payload: JWTPayload) => {
20-
log('Creating async server client for userId: %s', userId);
21-
2217
const gateKeeper = await KeyVaultsGateKeeper.initWithEnvKey();
2318
const headers: Record<string, string> = {
2419
Authorization: `Bearer ${serverDBEnv.KEY_VAULTS_SECRET}`,
@@ -39,7 +34,6 @@ export const createAsyncServerClient = async (userId: string, payload: JWTPayloa
3934
],
4035
});
4136

42-
log('Async server client created successfully for userId: %s', userId);
4337
return client;
4438
};
4539

0 commit comments

Comments
 (0)