Severity: Medium (strategic) — no Vercel AI SDK provider / LangChain.js integration; the openai-compatible path can't carry video or custom response fields
The SDK wraps openai; it ships no @ai-sdk provider and no @langchain/* integration. Framework users fall back to @ai-sdk/openai-compatible / ChatOpenAI({configuration:{baseURL}}), where (source-verified against vercel/ai and langchainjs main):
Vercel AI SDK v6 (spec V3) / v7 (spec V4):
- Request
precontext: works via providerOptions.<name> (openai-compatible spreads unknown keys into the top-level body). A base-URL swap on @ai-sdk/openai forwards nothing.
- Custom response fields: reach the typed result only via a
metadataExtractor (→ providerMetadata); otherwise only in raw result.response.body. The response is a closed typed union.
- Video hard-fails:
convert-to-openai-compatible-chat-messages throws UnsupportedFunctionalityError on any video/* (also audio-by-URL, pdf-by-URL). Middleware can't fix it (throws pre-HTTP).
LangChain.js: request precontext via modelKwargs (no extra_body field exists — issue #8845 closed); custom response fields silently dropped unless the converter is overridden (or __includeRawResponse:true); unsupported modality source_types throw.
Both also leak the inline <precontext>/<think> tags.
Recommendation
To deliver an "own SDK" for these ecosystems, ship a custom provider — LanguageModelV3 (v6) + LanguageModelV4 (v7), one class per spec generation — with your own message converter (accept video/*), supportedUrls declaring video/*/audio, response mapping into providerMetadata (v7: first-class type:"custom" content for OCR bounds/task output), and self-owned doStream SSE parsing. Optionally subclass OpenAICompatibleChatLanguageModel and override the converter to inherit its error/usage handling. Plus a @interfaze/langchain package.
Severity: Medium (strategic) — no Vercel AI SDK provider / LangChain.js integration; the openai-compatible path can't carry video or custom response fields
The SDK wraps
openai; it ships no@ai-sdkprovider and no@langchain/*integration. Framework users fall back to@ai-sdk/openai-compatible/ChatOpenAI({configuration:{baseURL}}), where (source-verified againstvercel/aiandlangchainjsmain):Vercel AI SDK v6 (spec V3) / v7 (spec V4):
precontext: works viaproviderOptions.<name>(openai-compatible spreads unknown keys into the top-level body). A base-URL swap on@ai-sdk/openaiforwards nothing.metadataExtractor(→providerMetadata); otherwise only in rawresult.response.body. The response is a closed typed union.convert-to-openai-compatible-chat-messagesthrowsUnsupportedFunctionalityErroron anyvideo/*(also audio-by-URL, pdf-by-URL). Middleware can't fix it (throws pre-HTTP).LangChain.js: request
precontextviamodelKwargs(noextra_bodyfield exists — issue #8845 closed); custom response fields silently dropped unless the converter is overridden (or__includeRawResponse:true); unsupported modalitysource_types throw.Both also leak the inline
<precontext>/<think>tags.Recommendation
To deliver an "own SDK" for these ecosystems, ship a custom provider —
LanguageModelV3(v6) +LanguageModelV4(v7), one class per spec generation — with your own message converter (acceptvideo/*),supportedUrlsdeclaringvideo/*/audio, response mapping intoproviderMetadata(v7: first-classtype:"custom"content for OCR bounds/task output), and self-owneddoStreamSSE parsing. Optionally subclassOpenAICompatibleChatLanguageModeland override the converter to inherit its error/usage handling. Plus a@interfaze/langchainpackage.