import r from"@contractspec/lib.ui-link";import{ChevronRight as a}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function n(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Mistral"}),e("p",{className:"text-muted-foreground",children:"Integrate Mistral models for chat, reasoning, embeddings, speech-to-text, and conversational voice workflows. ContractSpec ships first-class Mistral support across contracts, provider runtime wiring, and CLI provider selection."})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Setup"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`# .env
MISTRAL_API_KEY=...`})})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Chat and reasoning"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`capabilityId: mistral-chat
provider:
  type: mistral
  operation: chatCompletion

inputs:
  messages:
    type: array
  model:
    type: string
    default: "mistral-large-latest"
  temperature:
    type: number
    optional: true

outputs:
  content:
    type: string
  usage:
    type: object`})})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Embeddings"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`capabilityId: mistral-embeddings
provider:
  type: mistral
  operation: createEmbedding

inputs:
  text:
    type: string
  model:
    type: string
    default: "mistral-embed"

outputs:
  embedding:
    type: array
    items:
      type: number`})})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Speech-to-Text (Voxtral)"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`capabilityId: mistral-stt
provider:
  type: mistral
  operation: transcribe

inputs:
  audio:
    type: bytes
  format:
    type: string
  language:
    type: string
    optional: true

outputs:
  text:
    type: string
  segments:
    type: array
  language:
    type: string`})})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Conversational voice sessions"}),e("p",{className:"text-muted-foreground",children:"Use the conversational provider for session-based realtime voice flows (turn handling, events, and interruption-safe streaming)."})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Best practices"}),t("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[e("li",{children:"Choose model families by workload: coding, reasoning, or speech"}),e("li",{children:"Persist session IDs for conversational continuity across turns"}),e("li",{children:"Capture token and latency telemetry for provider-level tuning"}),e("li",{children:"Set explicit fallbacks for network and rate-limit failures"})]})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[e(r,{href:"/docs/integrations/openai",className:"btn-ghost",children:"Previous: OpenAI"}),t(r,{href:"/docs/integrations/elevenlabs",className:"btn-primary",children:["Next: ElevenLabs ",e(a,{size:16})]})]})]})}export{n as IntegrationsMistralPage};
