mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-21 23:24:46 +08:00
fix: 修复gpt->claude转换无法命中codex缓存问题
This commit is contained in:
@@ -29,6 +29,13 @@ func openAIStickyCompatStats() (legacyReadFallbackTotal, legacyReadFallbackHit,
|
||||
openAIStickyLegacyDualWriteTotal.Load()
|
||||
}
|
||||
|
||||
// DeriveSessionHashFromSeed computes the current-format sticky-session hash
|
||||
// from an arbitrary seed string.
|
||||
func DeriveSessionHashFromSeed(seed string) string {
|
||||
currentHash, _ := deriveOpenAISessionHashes(seed)
|
||||
return currentHash
|
||||
}
|
||||
|
||||
func deriveOpenAISessionHashes(sessionID string) (currentHash string, legacyHash string) {
|
||||
normalized := strings.TrimSpace(sessionID)
|
||||
if normalized == "" {
|
||||
|
||||
Reference in New Issue
Block a user