nonImageBinaryFateFor
nonImageBinaryFateFor(
provider):NonImageBinaryFate
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/middleware/binaryContentInjectionMiddleware.ts:122
The measured fate of a non-image binary block, per provider label.
Measured CFG-63, not inferred. Every arm below comes from handing the installed client the
exact block createContentBlock emits, with globalThis.fetch replaced by a capture stub
(no network, no vendor calls), and reading either the thrown error or the request body that was
built. The value is the same for file, audio, video and binary, because what separates the
arms is whether the converter has a branch for the block at all — not which format it carries.
xai-responses→ silently-discarded.@langchain/xai@1.4.10dist/converters/responses.js:30-33— the human-message branch recognisestextandimage_urland returns{ type:'input_text', text:'' }for everything else. The probe againsthttps://api.x.ai/v1/responsesbuilt a body carrying no trace of the base64 payload for all four format types. There is no shape that would work instead: xAI’s Responses union offers onlyinput_filecarrying a Files-APIfile_id, and gth has no upload path to produce one.anthropic→ delivered-or-loud.@langchain/anthropic@1.5.8dist/utils/content.js:78(fromStandardFileBlock) converts a PDF to adocumentblock; a non-PDF non-image mime throwsUnsupported file mime type for file base64 source, audio throwsConverter for anthropic does not implement fromStandardAudioBlock method, and video/binary throw from@langchain/core’s dispatcher.openai,openrouter,deepseek,xai,huggingface→ delivered-or-loud. All reach@langchain/openai@1.5.10dist/converters/completions.js:72(fromStandardFileBlock→ afilepart carryingfile_data) and:34(fromStandardAudioBlock→input_audiofor wav/mp3, a throw otherwise).openaion the Responses path (GS2-74) converts a file atdist/converters/responses.js:1081-1097intoinput_fileinstead; both wire paths deliver it.google-genai,vertexai,google→ delivered-or-loud.@langchain/google@0.2.3dist/converters/messages.js:80and:49turn file and audio intoinlineData; video and binary throw from the dispatcher.ollama→ delivered-or-loud.@langchain/ollama@1.3.0dist/utils.js:92throwsUnsupported content type: <type>for every non-text/image_urlpart.groq→ delivered-or-loud, and this is the one arm measured on the SERVER rather than the client.@langchain/groq@1.3.1dist/chat_models.js:82assignscontent: message.contentverbatim, so the block reaches the wire unchanged and only Groq’s API can decide. Measured live 2026-09-08 againstqwen/qwen3.8-27bwith a PDF: the API rejects it — HTTP 400invalid_request_error, naming the content-part types it accepts,text/image_url/document. The user reads that error, so nothing is discarded and nothing is refused here. Note what the rejection also reveals: Groq has adocumentpart type, and gth emits the standard block’sfile, which is not one of the three — so a shape Groq would accept plausibly exists and gth does not build it. Whether any Groq model then reads adocumentis a separate question and is NOT established; do not treat the accepted type as a working feature.
Everything else is unmeasured, and like imageBlockFor’s fallback arm it must stay
permissive. Who lands there, precisely: any label this switch does not enumerate — a custom or
fake provider, a future vendor package, a LangChain class whose _llmType() nobody has measured
— plus the empty string, which resolveVisionProvider yields only when there is no llm or its
_llmType() is missing or throws. (A module config supplying an already-built LLM does NOT
generally give '': modelProviderType is unset there, so the _llmType() fallback runs and
returns that class’s own label — which is exactly how xai-responses arrives above.) Refusing on
a label nobody has measured would break configurations that work today, so this leaves a
debugLog trace instead and an unenumerated label is discoverable in a /debug-dump.
Exported so each arm can be unit-tested directly.
Parameters
Section titled “Parameters”provider
Section titled “provider”string