SIGN IN SIGN UP

feat: support Kimi K3 dynamic tool loading in system messages (#19579)

## Background

Kimi K3 users can now load complete function tools at specific points in
a conversation, reducing unnecessary tool context while preserving
conversation order and prompt caching.

## Summary

Added the exported MoonshotAISystemMessageProviderOptions type, K3
dynamic system-message serialization without content, shared MFJS tool
normalization, and actionable warnings with message omission for
unsupported models.

## Testing

Added converter, tool preparation, generate, stream, model-gating,
schema-normalization, runtime-validation, and compile-time public API
tests.

## End-to-end Validation

- Added and ran the focused Moonshot dynamic-tool-loading example
against the live Kimi K3 API.
- Confirmed the accepted request contained a mid-conversation `{ role:
'system', tools: [...] }` message without `content`.

## Documentation

Expanded the Moonshot provider documentation with typed usage, model
limitations, request-local persistence, prompt-cache, context-cost, and
security guidance.

## Related Issues

Fixes #19557

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
A
ai-sdk-factory[bot] committed
3da2b7d37bf71633cecff27c89f628ebe330bf00
Parent: b580642
Committed by GitHub <noreply@github.com> on 8/26/2026, 4:39:17 PM