Reported on X (@liuzhengdong99, magpie 0.1.4146): in DSH, Devin's Gemini 4 Hydrogen often fails with "an empty reply ... (502)" or hangs; SWE-2 works. Diffing the plugin's GetChatMessage against the official devin CLI's (captured through a proxy, same account, gemini-4-hydrogen-medium, a tool turn): Devin streams Hydrogen's thought signature (field 10, type "gemini" in 21) and no visible thinking. The CLI sends it back on the assistant prompt that carries the call: signature (12), signature_type "gemini" (18) and the model that wrote it (22). The plugin dropped Gemini signatures, on the chat wire and the Messages wire, so every later turn went back to Gemini without them. Google documents thought signatures as required for Gemini 3-class function calling. Neither a chat completion nor a Messages tool_use carries a signature, so the plugin keeps each Gemini reply's signature in memory by its call ids (or by its words, for a reply with no call), up to 4096, and puts it back on the matching assistant prompt with field 22. Other models are unchanged; an unknown call, or one after a restart, goes back unsigned as before. Run: - gemini-thought.test.mjs (7 tests, fixture = a real Hydrogen tool reply captured from the CLI, testdata/gemini-tool-reply.bin, no credentials): 7/7 on mica. Broken by hand: against origin/main's index.mjs the 5 signature tests fail (Received: undefined); the 2 "goes back unsigned" tests pass on both. - Whole plugins suite on mica, HOME=$(mktemp -d) bun test, as CI: 8796 pass, 0 fail (8816 tests, 615 files); bun scripts/check.mjs ok. packages/devin alone: 220/220. - Real account (sandbox HOME, plugin through a chat-completions shim): a 4-step tool loop on the new code signed every assistant prompt (1/1 .. 4/4), all 200, right answer. dsh headless (sandbox HOME) on Hydrogen through the shim: a JSON-parser coding task on old and new code, both finished with tests passing, every request 200. Not reproduced: on the old code, 127 Hydrogen requests through dsh (up to 170 messages, a 434KB request) all answered 200, with no empty reply. So this restores what the official client sends; it is not proven to be the reporter's cause. The "hang" is likely Hydrogen's hidden thinking: the plugin waits for the first real content and Hydrogen streams no thinking text. No retry was added.
1.4 KiB
1.4 KiB