• erio's avatar
    fix: parse Gemini native request format in ParseGatewayRequest for correct session hash generation · 35598d56
    erio authored
    ParseGatewayRequest only parsed Anthropic format (system/messages),
    ignoring Gemini native format (systemInstruction/contents). This caused
    GenerateSessionHash to produce identical hashes for all Gemini sessions.
    
    Add protocol parameter to ParseGatewayRequest to branch between
    Anthropic and Gemini parsing. Update GenerateSessionHash message
    traversal to extract text from both formats.
    35598d56
gemini_v1beta_handler.go 23.1 KB