1. 01 Apr, 2026 1 commit
    • YanzheL's avatar
      test(gateway): add tests for content-based session hash fallback · 4fb16030
      YanzheL authored
      - 20 unit tests for deriveOpenAIContentSessionSeed covering:
        - Empty/nil inputs, model-only, stable across turns
        - Different model/system/first-user produce different seeds
        - Tools, functions, developer role, structured content
        - Responses API: input string, input array, instructions, input_text typed items
        - JSON canonicalization (whitespace/key-order insensitive)
        - Prefix presence, empty tools ignored, messages preferred over input
      - 3 integration tests for GenerateSessionHash content fallback:
        - Content fallback produces stable hash
        - Explicit signals override content fallback
        - Empty body still returns empty hash
      4fb16030