@runtypelabs/mixlayer-ai-provider weekly downloads statistics
By runtypelabs · npm · AI SDKs
AI SDK (Vercel) provider for Mixlayer — open-weight text and vision model inference over an OpenAI-compatible endpoint.
@runtypelabs/mixlayer-ai-provider has 447 recorded weekly downloads on npm, a decrease of 20.9% over the past 30 days, ranking #1567 of 2,322 tracked listings.
About @runtypelabs/mixlayer-ai-provider
@runtypelabs/mixlayer-ai-provider
An AI SDK provider for Mixlayer, which serves open-weight models over an OpenAI-compatible endpoint. Mixlayer's current catalog includes Qwen and GLM models. This provider accepts any model id and adds family-specific behavior only for models it recognizes.
It wraps @ai-sdk/openai-compatible
for Chat Completions and @ai-sdk/openai
for Responses API models, baking in everything Mixlayer needs to behave
correctly out of the box:
- the Mixlayer base URL
- the Qwen thinking toggle (Chat Completions
thinkingfield / Responsesreasoning.effort), scoped to the Qwen 3.5 / 3.6 models - reasoning support —
<think>tags and nativereasoning_contentboth surface as AI SDK reasoning parts - image input through standard AI SDK file parts on vision-capable models
- Responses API models and a Responses WebSocket
fetchadapter for lower latency streaming on repeat calls - tolerant model-id handling (strips a leading
mixlayer/prefix)
Install
pnpm add @runtypelabs/mixlayer-ai-provider ai@^7.0.127
This package requires AI SDK 7.0.127 or later in the v7 series and is ESM-only.
For Node.js applications, use Node.js 22+. The package avoids Node-only
WebSocket dependencies so it
can be bundled for standards-based runtimes such as Cloudflare Workers. ai is
a peer dependency, so your app dedupes a single AI SDK version.
Usage
import { mixlayer } from '@runtypelabs/mixlayer-ai-provider'
import { streamText } from 'ai'
const result = streamText({
model: mixlayer('qwen/qwen3.8-27b'),
prompt: 'Explain reasoning models in one paragraph.',
})
for await (const text of result.textStream) process.stdout.write(text)
The default mixlayer instance reads MIXLAYER_API_KEY from the environment
(Node). To set the key (or any other option) explicitly, create your own
provider with createMixlayer:
import { createMixlayer } from '@runtypelabs/mixlayer-ai-provider'
const provider = createMixlayer({
apiKey: process.env.MIXLAYER_API_KEY,
thinking: false, // disable Qwen 3.5 / 3.6 thinking
})
const model = provider('qwen/qwen3.5-9b')
Vision
Models in MIXLAYER_VISION_MODEL_IDS accept image inputs through standard AI
SDK file parts. The same message shape works with Chat Completions and
Responses models:
import { readFile } from 'node:fs/promises'
import { generateText } from 'ai'
import { mixlayer } from '@runtypelabs/mixlayer-ai-provider'
const image = await readFile('./diagram.png')
const result = await generateText({
model: mixlayer('qwen/qwen3.6-27b'),
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'What does this diagram show?' },
{ type: 'file', mediaType: 'image/png', data: image },
],
},
],
})
console.log(result.text)
Mixlayer also accepts supported remote image URLs. See the Mixlayer vision guide for current formats and limits. Text-only models return a media error when sent an image.
Responses API and WebSocket mode
The callable provider and provider.languageModel(id) use Chat Completions by
default for backwards compatibility. Use provider.responses(id) for Mixlayer's
OpenAI-compatible Responses API:
import { createMixlayer } from '@runtypelabs/mixlayer-ai-provider'
import { streamText } from 'ai'
const provider = createMixlayer({
apiKey: process.env.MIXLAYER_API_KEY,
thinking: false, // for Qwen 3.5 / 3.6, maps to reasoning.effort: 'none'
})
const result = streamText({
model: provider.responses('qwen/qwen3.5-9b'),
prompt: 'Say hello via the Responses API.',
})
To route streaming Responses API requests over Mixlayer's WebSocket endpoint,
pass createMixlayerWebSocketFetch() as the provider fetch:
import {
createMixlayer,
createMixlayerWebSocketFetch,
} from '@runtypelabs/mixlayer-ai-provider'
import { streamText } from 'ai'
const wsFetch = createMixlayerWebSocketFetch()
const provider = createMixlayer({
apiKey: process.env.MIXLAYER_API_KEY,
thinking: false,
fetch: wsFetch,
})
try {
const result = streamText({
model: provider.responses('qwen/qwen3.5-9b'),
prompt: 'Say hello over WebSocket.',
})
for await (const text of result.textStream) process.stdout.write(text)
} finally {
wsFetch.close()
}
createMixlayerWebSocketFetch() is designed to be Workers-friendly by default:
it performs a fetch() request with Upgrade: websocket, uses
Response.webSocket, and calls accept() before sending the response.create
event. That matches Cloudflare Workers' outbound WebSocket API and keeps this
package free of a hard ws / Node.js dependency.
Runtimes that do not expose Response.webSocket on upgraded fetch responses
(for example, typical Node.js fetch implementations) can pass a custom
connect option. Browsers also cannot attach arbitrary Authorization headers
to direct WebSocket handshakes, so browser apps should use a server/Worker
connector or proxy rather than connecting directly with a secret API key.
If you want provider registries or provider(id) to use Responses API models,
set defaultModelApi: 'responses' in createMixlayer(...).
The provider also slots into createProviderRegistry:
import { createProviderRegistry } from 'ai'
const registry = createProviderRegistry({ mixlayer })
const model = registry.languageModel('mixlayer:qwen/qwen3.6-27b')
Models…
Description from the npm listing.
- ai
- ai-sdk
- vercel-ai-sdk
- mixlayer
- qwen
- vision
- multimodal
- llm
- provider
- openai-compatible
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm AI SDKs plugins
All 20 @runtypelabs/mixlayer-ai-provider alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@runtypelabs/mixlayer-ai-provider. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.