mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 13:19:44 +08:00
#652 added a guard so the gateway adapter only sends encoding_format when set, but it was a no-op: EmbeddingRequest.encoding_format defaulted to the truthy "float", so the guard always fired and the param was still posted — leaving the #651 HTTP 400 from gateways like SiliconFlow intact. Fix the root cause: default encoding_format to None. The gateway adapter now omits it unless a caller explicitly opts in, while the official OpenAI SDK path keeps pinning "float" (that API expects it). The intentional divergence is documented at both call sites. Adds a payload test proving the gateway omits it by default and includes it when set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>