unstale

npm / @ai-sdk/moonshotai

@ai-sdk/moonshotai

What changed in @ai-sdk/moonshotai 0.0 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

1 breaking7 new APIs and options5 behavior and defaults14 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@ai-sdk/moonshotai 39 changes

New APIs and options 1

  • Adds max as a portable reasoning level, widening LanguageModelV4CallOptions['reasoning'] and the derived ReasoningLevel type. Exhaustive switches and mappings must handle it.

    3.0.64release notes

Behavior and default changes 1

  • Unknown model IDs retain JSON schemas for structured output instead of silently falling back to JSON object mode, supporting future Moonshot models.

    0.0.31, 2.0.63, 3.0.68release notesrelease notesrelease notes

Fixes and other changes 7

@ai-sdk/moonshotai 214 changes

Breaking changes 1

  • Strict validation is enabled by default for Moonshot structured outputs.

    2.0.51release notes

New APIs and options 4

  • Adds provider-specific names for Moonshot AI system, user, and assistant messages.

    0.0.24, 2.0.53release notesrelease notes

  • Adds first-class support for Moonshot V1 auto and vision-preview model IDs while retaining support for custom and retired model IDs.

    0.0.24, 2.0.53release notesrelease notes

  • Adds Moonshot AI Partial Mode support for continuing a final assistant message.

    2.0.53release notes

  • Adds predicted output support.

    2.0.53release notes

Behavior and default changes 3

  • Adds support for Kimi K3 dynamic tool-loading system messages.

    0.0.24, 2.0.53release notesrelease notes

  • Maximum output tokens are sent using the current Moonshot request field.

    2.0.51release notes

  • Official Moonshot V1 models use native JSON Schema structured outputs.

    2.0.51release notes

Fixes and other changes 6

  • Choice-level usage is preserved in Moonshot streaming responses.

    2.0.51release notes

  • Moonshot streaming tool calls without indices are accepted.

    2.0.51release notes

  • Moonshot structured output schemas are normalized.

    2.0.51release notes

  • Unsupported image and video media types are rejected before Moonshot chat requests are sent.

    2.0.51release notes

  • Non-object root schemas now fail with a clear client-side error instead of Moonshot's opaque 400.

    2.0.47release notes

  • Tool schemas are normalized for Moonshot's MFJS validator: tuple items become prefixItems, and type next to anyOf moves into the branches. The original schema remains in use for AI SDK result validation.

    2.0.47release notes

@ai-sdk/moonshotai 0.04 changes

New APIs and options 2

Behavior and default changes 1

  • Supports Partial Mode for final assistant message prefixes.

    0.0.24release notes

Fixes and other changes 1

  • Preserves Moonshot chat response metadata in generated and streamed responses.

    0.0.24release notes