OpenAI-compatible and Anthropic-compatible chat/tool-calling instability under Sourcebot Ask workflow
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript, node.js
Piste de recherche
Start by reviewing the captured upstream traffic linked in the issue and the OpenAI-compatible /v1/chat/completions and Anthropic-compatible /anthropic/v1/messages request and response behavior. Check streaming termination and tool argument handling under the described Sourcebot Ask workflow, including tools, large multi-turn results, and Anthropic thinking. Done means identifying which compatibility behavior causes the malformed arguments or unterminated streams and documenting or fixing it; the issue does not name repository files or tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
We integrated MiniMax through Sourcebot Ask and captured the real upstream traffic with a transparent proxy. We found two classes of failures under the real tool-calling workflow:
- Streaming requests sometimes return
200 OKwithtext/event-streambut never terminate correctly, eventually ending in client-side timeout. - In OpenAI-compatible tool-calling mode, some requests fail because the model / compatibility layer emits invalid function argument JSON.
This is reproducible under a real tool-calling workload, not only with trivial prompts.
Client context
Client stack:
- Sourcebot Ask
- Node 24
- AI SDK-based provider integration
- tested with both:
- OpenAI-compatible
/v1/chat/completions - Anthropic-compatible
/anthropic/v1/messages
- OpenAI-compatible
Failure 1: stream starts, then never ends
Observed behavior
For some requests, the server returns:
200 OKcontent-type: text/event-stream
Streaming begins, but the response never completes normally. The client later fails with read timeout:
read ETIMEDOUT- surface symptom in client:
terminated
This is not a generic network issue:
- the same host/container can complete independent long
fetch/undicistreams successfully - the problem appears only under the real Ask/tool-calling workflow
Request characteristics when this happens
Typical requests include:
stream=true- tool calling enabled
- accumulated multi-turn messages
- large tool result payloads
- in Anthropic-compatible mode,
thinkingmay also be enabled
Example sanitized evidence: https://gist.github.com/leozhengliu-pixel/6252d9b8415ab65dd106d11e2bf59da0
Failure 2: invalid function arguments in OpenAI-compatible mode
Observed behavior
A real OpenAI-compatible request produced this tool call:
{
"id": "call_function_j32rtdm8f446_1",
"type": "function",
"function": {
"name": "read_file",
"arguments": "\"{\""
}
}
This is not valid function argument JSON for the declared tool schema. The client then fails tool execution with:
Invalid input for tool read_file: JSON parsing failed: Text: {.
Error message: Expected property name or '}' in JSON at position 1 (line 1 column 2)
The upstream response for that request is 400 Bad Request.
Important detail
This is not only a small-model quality issue. We are seeing both:
- malformed tool arguments
- hanging SSE streams
So the compatibility problem appears broader than prompt quality.
What we need clarified
- In your OpenAI-compatible API, what exact guarantees do you provide for:
tool_calls[].function.arguments- streaming termination semantics
- chunk / finish events
- In your Anthropic-compatible API, are there known limitations with:
- tool use
- thinking
- long-running streamed responses
- Are there specific unsupported combinations such as:
thinking + tools- large multi-turn tool-result context
- streaming + tool calling under compatibility mode
- Do you recommend disabling any of the following for compatibility:
- streaming
- thinking
- automatic tool choice
- title-generation style side requests
Evidence available
We have captured:
- exact request payload characteristics
- exact response status/headers
- cases where stream starts but never completes
- cases where tool arguments are malformed and rejected
I can provide more sanitized payloads if needed.
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 2.6k
- Forks
- 216
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de MiniMax-AI/MiniMax-M2
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 1/100
MiniMax-AI/MiniMax-M2#133 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 1/100
MiniMax-AI/MiniMax-M2#132 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 1/100
MiniMax-AI/MiniMax-M2#130 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 1/100
MiniMax-AI/MiniMax-M2#129 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
MiniMax-AI/MiniMax-M2#126 ·
Toutes les issues de MiniMax-AI/MiniMax-M2
Issues similaires
-
status:needs-triage type:bug workstream:refimpl
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
GenAI-Security-Project/agent-control-standard#764 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
radarhound/radarhound#3 ·
-
good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
99LevelsUp/hermes-flow#98 · 2 commentaires ·
-
check: T2 good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
srpadmanabhuni/agentest#566 ·
Les mainteneurs répondent en général sous 1 jour
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
MervinPraison/PraisonAI#6993 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour