SIGN IN SIGN UP

fix: enable native structured outputs for official Moonshot V1 models (#19583)

## Background

Moonshot V1 schema requests were silently downgraded from native JSON
Schema structured outputs to JSON object mode.

## Root Cause

Structured-output capability detection recognized only `kimi-k` model
IDs. The reproduction confirmed that all seven official Moonshot V1 IDs
consequently sent `json_object` while Kimi models correctly sent
`json_schema`.

## Summary

Added explicit structured-output support for the seven official Moonshot
V1 text, auto, and vision IDs while preserving the fallback for unknown
IDs. Updated model types, documentation, the example, and added a patch
changeset.

## Testing

Added capability and request-body regression coverage for every official
Moonshot V1 ID, plus coverage ensuring unknown model IDs retain the JSON
object fallback.

## End-to-end Validation

- `pnpm -C packages/moonshotai build && pnpm -C examples/ai-functions
exec tsx src/reproduction/moonshot-v1-structured-output.ts` completed
successfully and confirmed all seven official IDs sent `json_schema`.
- `pnpm -C examples/ai-functions exec tsx
src/generate-text/moonshot/structured-outputs.ts` completed against the
live Moonshot API and returned schema-valid structured output.

## Related Issues

Fixes #19558

Closes #19569

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
8037158f5e688043ce906a3ad865f23796dcd959
Parent: d53589a
Committed by GitHub <noreply@github.com> on 8/26/2026, 1:39:18 AM