Files
gbrain/test
eb1812cbc5 fix(recipes/minimax): embedding wire-shape compat fetch + chat touchpoint (#1977)
MiniMax's /v1/embeddings endpoint is not OpenAI-compatible: it requires
texts (not input) plus a type field and returns {vectors} instead of
{data:[{embedding}]}. The recipe shipped no transport shim, so every
embed call failed with an invalid-params error, and it declared no chat
touchpoint, so assertTouchpoint blocked gbrain think even though
MiniMax chat is genuinely OpenAI-compatible.

Fix (takeover of #2882, corrected):
- minimaxCompatFetch via the DeepSeek-style compat.fetch seam (keeps
  cfg.base_urls overrides working; no new env var), gated on the
  /embeddings path so chat requests/responses pass through untouched.
- Response rewrite parses via resp.clone() and rebuilds with fresh
  headers — never returns a body-consumed Response (the flaw in #2882's
  wrapper, which broke every non-streaming chat completion).
- chat touchpoint with the /v1/models list from #1977.

Fixes #1977

Co-authored-by: ArthurHeung <ArthurHeung@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:23:38 -07:00
..