File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
dev-packages/cloudflare-integration-tests/suites/tracing/langchain Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export interface CallbackHandler {
88 runId : string ,
99 parentRunId ?: string ,
1010 extraParams ?: Record < string , unknown > ,
11- tags ?: string [ ] ,
11+ tags ?: string [ ] | Record < string , unknown > ,
1212 metadata ?: Record < string , unknown > ,
1313 runName ?: string ,
1414 ) => unknown ;
@@ -82,6 +82,7 @@ export class MockChatModel {
8282
8383 // Call handleChatModelStart
8484 // Pass tags as a record with invocation_params for proper extraction
85+ // The callback handler's getInvocationParams utility accepts both string[] and Record<string, unknown>
8586 for ( const callback of callbacks ) {
8687 if ( callback . handleChatModelStart ) {
8788 await callback . handleChatModelStart (
@@ -90,7 +91,7 @@ export class MockChatModel {
9091 runId ,
9192 undefined ,
9293 undefined ,
93- { invocation_params : invocationParams } as unknown as string [ ] , // LangChain can pass tags as either string[] or record
94+ { invocation_params : invocationParams } ,
9495 { ls_model_name : this . _model , ls_provider : 'anthropic' } ,
9596 ) ;
9697 }
You can’t perform that action at this time.
0 commit comments