mistral.ts from stackblitz-labs/bolt.diy
// Source: https://github.com/stackblitz-labs/bolt.diy | License: MIT | Copyright 2024 StackBlitz, Inc. and bolt.diy contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { createMistral } from '@ai-sdk/mistral';
import type { LanguageModel } from 'ai';
import { BaseProvider } from '~/lib/modules/llm/base-provider';
import type { ModelInfo } from '~/lib/modules/llm/types';
import type { IProviderSetting } from '~/types/model';
export default class MistralProvider extends BaseProvider {
name = 'Mistral';
getApiKeyLink = 'https://console.mistral.ai/api-keys/';
config = {
apiTokenKey: 'MISTRAL_API_KEY',
};
staticModels: ModelInfo[] = [
{
name: 'mistral-medium-latest',
label: 'Mistral Medium 3.5',
provider: 'Mistral',
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key