Skip to content

Commit dd7f528

Browse files
core[patch]: Bugfix: cache missed because callback _parentRunId passed in to cache key function (_getSerializedCacheKeyParametersForCall) (#5205)
* bugfix: cache missed because callback info (incl _parentRunId) was included in cache key * Fix type --------- Co-authored-by: jacoblee93 <[email protected]>
1 parent 4b08337 commit dd7f528

File tree

1 file changed

+2
-1
lines changed
  • langchain-core/src/language_models

1 file changed

+2
-1
lines changed

langchain-core/src/language_models/base.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ export abstract class BaseLanguageModel<
457457
* @returns A unique cache key.
458458
*/
459459
protected _getSerializedCacheKeyParametersForCall(
460-
callOptions: CallOptions
460+
// TODO: Fix when we remove the RunnableLambda backwards compatibility shim.
461+
{ config, ...callOptions }: CallOptions & { config?: RunnableConfig }
461462
): string {
462463
// eslint-disable-next-line @typescript-eslint/no-explicit-any
463464
const params: Record<string, any> = {

0 commit comments

Comments
 (0)