Skip to content

Commit 443a294

Browse files
committed
types
1 parent 93b06e4 commit 443a294

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/core/src/tracing/anthropic-ai/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
339339
const value = (obj as Record<string, unknown>)[prop];
340340
const methodPath = buildMethodPath(currentPath, String(prop));
341341

342-
const instrumentedMethod = ANTHROPIC_METHOD_REGISTRY[methodPath];
342+
const instrumentedMethod = ANTHROPIC_METHOD_REGISTRY[methodPath as keyof typeof ANTHROPIC_METHOD_REGISTRY];
343343
if (typeof value === 'function' && instrumentedMethod) {
344344
return instrumentMethod(
345345
value as (...args: unknown[]) => unknown | Promise<unknown>,

packages/core/src/tracing/google-genai/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
334334
const value = Reflect.get(t, prop, receiver);
335335
const methodPath = buildMethodPath(currentPath, String(prop));
336336

337-
const instrumentedMethod = GOOGLE_GENAI_METHOD_REGISTRY[methodPath];
337+
const instrumentedMethod = GOOGLE_GENAI_METHOD_REGISTRY[methodPath as keyof typeof GOOGLE_GENAI_METHOD_REGISTRY];
338338
if (typeof value === 'function' && instrumentedMethod) {
339339
// Special case: chats.create is synchronous but needs both instrumentation AND result proxying
340340
if (methodPath === CHATS_CREATE_METHOD) {

packages/core/src/tracing/openai/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function createDeepProxy<T extends object>(target: T, currentPath = '', options:
272272
const value = (obj as Record<string, unknown>)[prop];
273273
const methodPath = buildMethodPath(currentPath, String(prop));
274274

275-
const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath];
275+
const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath as keyof typeof OPENAI_METHOD_REGISTRY];
276276
if (typeof value === 'function' && instrumentedMethod) {
277277
return instrumentMethod(
278278
value as (...args: unknown[]) => Promise<unknown>,

0 commit comments

Comments
 (0)