Behavior (not a mimocode bug)
MiMo models / inference parser have a fixed behavior on tool-call top-level (or nested) parameters:
- If the schema node has no explicit
type (e.g. only anyOf / union arms), the parser returns a string for that field instead of a structured object.
This is not something mimocode needs to “fix” in the model or wire format.
What mimocode should do
Handle a string payload correctly at the tool boundary:
- If the tool expects an object, accept
object | string
- When it is a string,
JSON.parse (or equivalent) then validate with the same schema
- Do not teach the model in prompts/errors that “string is allowed” — that is a parser-side phenomenon
Desktop tts_speech.voice already does this (parseMaybeString + zod). Same pattern applies to any nested union tool arg.
Closed
Documenting behavior only; no engine work tracked here.
Behavior (not a mimocode bug)
MiMo models / inference parser have a fixed behavior on tool-call top-level (or nested) parameters:
type(e.g. onlyanyOf/ union arms), the parser returns a string for that field instead of a structured object.This is not something mimocode needs to “fix” in the model or wire format.
What mimocode should do
Handle a string payload correctly at the tool boundary:
object | stringJSON.parse(or equivalent) then validate with the same schemaDesktop
tts_speech.voicealready does this (parseMaybeString+ zod). Same pattern applies to any nested union tool arg.Closed
Documenting behavior only; no engine work tracked here.