set promptCacheKey for openai compatible providers (#4203)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Shantur Rathore
2025-11-14 17:41:01 +00:00
committed by GitHub
parent 5fc26c958a
commit 986c60353e
2 changed files with 9 additions and 4 deletions

View File

@@ -128,10 +128,15 @@ export namespace ProviderTransform {
return undefined
}
export function options(providerID: string, modelID: string, sessionID: string): Record<string, any> | undefined {
export function options(
providerID: string,
modelID: string,
npm: string,
sessionID: string,
): Record<string, any> | undefined {
const result: Record<string, any> = {}
if (providerID === "openai") {
if (providerID === "openai" || npm.includes("openai")) {
result["promptCacheKey"] = sessionID
}