Polyweave

@polyweave/mistral (1.0.4)

Published 2026-07-10 18:30:58 +00:00 by Dvorak

Installation

@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/
npm install @polyweave/mistral@1.0.4
"@polyweave/mistral": "1.0.4"

About this package

@polyweave/mistral

Mistral AI adapter for Polyweave - supports chat (streaming, tools, vision, reasoning), embeddings, FIM code completion, and audio transcription via Mistral API.

Synopsis

import { createMistralAdapter } from '@polyweave/mistral';

const adapter = createMistralAdapter({ apiKey: 'YOUR_API_KEY' });
adapter.source.pipe(someSink);
adapter.sink.write({ type: 'PARAM', content: { key: 'model', value: 'mistral-small-latest' } });
adapter.sink.write({ type: 'TEXT', content: { text: 'What is the capital of France?' } });

Install

npm install @polyweave/mistral

API

createMistralAdapter(config)

Returns an IFrameDuplex stream adapter. Configuration options:

Option Type Default Description
apiKey string process.env.MISTRAL_API_KEY Mistral API key
baseURL string 'https://api.mistral.ai' API base URL
timeout number 60000 Request timeout in ms

Frame Types

  • Input: TEXT, AUDIO, EMBEDDING, FIM, TOOL_RESULT, PARAM, COST_CHECK, START, END
  • Output: TEXT, TOOL_CALL, RECEIPT, ERROR, COST, END

Tasks

Route via task PARAM: embeddings/embed, fim/code/completion. Default: chat completion with tool calling support.

Tests

npm test

Requirements

  • Node.js >= 18.0.0
  • @polyweave/core (peer)
  • @polyweave/errors (peer)

License

MIT

Dependencies

Development Dependencies

ID Version
@rigor/core *

Peer Dependencies

ID Version
@polyweave/core *
@polyweave/costs *
@polyweave/errors *

Keywords

polyweave mistral ai adapter
Details
npm
2026-07-10 18:30:58 +00:00
4
John Dvorak
SEE LICENSE IN LICENSE
13 KiB
Assets (1)
Versions (5) View all
1.0.8 2026-07-11
1.0.5 2026-07-10
1.0.4 2026-07-10
1.0.3 2026-07-10
1.0.2 2026-07-10