Documentation
¶
Index ¶
- Constants
- func CacheCodexReasoningReplayItem(modelName, sessionKey string, item []byte) bool
- func CacheCodexReasoningReplayItems(modelName, sessionKey string, items [][]byte) bool
- func CacheSignature(modelName, text, signature string)
- func ClearCodexReasoningReplayCache()
- func ClearSignatureCache(modelName string)
- func DeleteCodexReasoningReplayItem(modelName, sessionKey string)
- func GetCachedSignature(modelName, text string) string
- func GetCodexReasoningReplayItem(modelName, sessionKey string) ([]byte, bool)
- func GetCodexReasoningReplayItems(modelName, sessionKey string) ([][]byte, bool)
- func GetModelGroup(modelName string) string
- func HasValidSignature(modelName, signature string) bool
- func SetSignatureBypassStrictMode(strict bool)
- func SetSignatureCacheEnabled(enabled bool)
- func SignatureBypassStrictMode() bool
- func SignatureCacheEnabled() bool
- type SignatureEntry
Constants ¶
const ( // CodexReasoningReplayCacheTTL limits how long encrypted reasoning replay // items stay in process memory. CodexReasoningReplayCacheTTL = 1 * time.Hour // CodexReasoningReplayCacheMaxEntries bounds process memory for replay // continuity. Oldest entries are evicted first. CodexReasoningReplayCacheMaxEntries = 10240 // CodexReasoningReplayCacheEvictBatchSize leaves headroom after the cache // reaches capacity so high write volume does not rescan the map every turn. CodexReasoningReplayCacheEvictBatchSize = 128 )
const ( // SignatureCacheTTL is how long signatures are valid SignatureCacheTTL = 3 * time.Hour // SignatureTextHashLen is the length of the hash key (16 hex chars = 64-bit key space) SignatureTextHashLen = 16 // MinValidSignatureLen is the minimum length for a signature to be considered valid MinValidSignatureLen = 50 // CacheCleanupInterval controls how often stale entries are purged CacheCleanupInterval = 10 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func CacheCodexReasoningReplayItem ¶ added in v7.1.40
CacheCodexReasoningReplayItem stores a final GPT/Codex reasoning item for stateless replay. The stored item is normalized to the minimal shape accepted by Responses input replay.
func CacheCodexReasoningReplayItems ¶ added in v7.1.40
CacheCodexReasoningReplayItems stores the final GPT/Codex assistant output items needed to replay a stateless next turn.
func CacheSignature ¶
func CacheSignature(modelName, text, signature string)
CacheSignature stores a thinking signature for a given model group and text. Used for Claude models that require signed thinking blocks in multi-turn conversations.
func ClearCodexReasoningReplayCache ¶ added in v7.1.40
func ClearCodexReasoningReplayCache()
ClearCodexReasoningReplayCache clears all Codex reasoning replay state.
func ClearSignatureCache ¶
func ClearSignatureCache(modelName string)
ClearSignatureCache clears signature cache for a specific model group or all groups.
func DeleteCodexReasoningReplayItem ¶ added in v7.1.40
func DeleteCodexReasoningReplayItem(modelName, sessionKey string)
DeleteCodexReasoningReplayItem removes one replay item after upstream rejects it or the caller otherwise knows it is stale.
func GetCachedSignature ¶
GetCachedSignature retrieves a cached signature for a given model group and text. Returns empty string if not found or expired.
func GetCodexReasoningReplayItem ¶ added in v7.1.40
GetCodexReasoningReplayItem retrieves a normalized reasoning replay item.
func GetCodexReasoningReplayItems ¶ added in v7.1.40
GetCodexReasoningReplayItems retrieves normalized assistant output items.
func GetModelGroup ¶
func HasValidSignature ¶
HasValidSignature checks if a signature is valid (non-empty and long enough)
func SetSignatureBypassStrictMode ¶
func SetSignatureBypassStrictMode(strict bool)
SetSignatureBypassStrictMode controls whether bypass mode uses strict protobuf-tree validation.
func SetSignatureCacheEnabled ¶
func SetSignatureCacheEnabled(enabled bool)
SetSignatureCacheEnabled switches Antigravity signature handling between cache mode and bypass mode.
func SignatureBypassStrictMode ¶
func SignatureBypassStrictMode() bool
SignatureBypassStrictMode returns whether bypass mode uses strict protobuf-tree validation.
func SignatureCacheEnabled ¶
func SignatureCacheEnabled() bool
SignatureCacheEnabled returns whether signature cache validation is enabled.
Types ¶
type SignatureEntry ¶
SignatureEntry holds a cached thinking signature with timestamp