Summary
Kimi K2.7-Code supports video input via OpenAI-style video_url content blocks with base64 data URLs on the official Moonshot API. dreb currently has no video modality at all. We should add video as a first-class input type, starting with the same pattern used for the Kimi OAuth image fix in #247.
Current Behavior
Model.input is typed as ("text" | "image")[]; there is no "video" modality.
- No
VideoContent type exists; UserMessage and ToolResultMessage content only supports text and images.
packages/coding-agent/src/cli/file-processor.ts treats video files as text attachments.
- The
openai-completions provider does not serialize video_url blocks.
- The Kimi OAuth provider forces the
image input capability in modifyModels(), but not video.
Proposed Behavior
- Users can attach video files (MP4, WebM, MOV, etc.) via
@path or --file.
- Video attachments serialize as base64
video_url data URL blocks for models that declare video input support.
- The
kimi-for-coding OAuth model exposes video capability alongside image.
- Models that do not support video receive explicit placeholder text instead of silently dropping video content (matching the image fix pattern).
Acceptance Criteria
Context
Technical Notes
- The Kimi K2.7-Code chat template shows
video_url content blocks are rendered as <|kimi_k25_video_placeholder|>, confirming OpenAI-style video_url is the correct payload shape.
- Video files are significantly larger than images, so we will likely need a max file size limit or a separate size cap distinct from image resizing.
- This work makes dreb ready for other providers that adopt OpenAI-style
video_url blocks in the future.
Summary
Kimi K2.7-Code supports video input via OpenAI-style
video_urlcontent blocks with base64 data URLs on the official Moonshot API. dreb currently has no video modality at all. We should addvideoas a first-class input type, starting with the same pattern used for the Kimi OAuth image fix in #247.Current Behavior
Model.inputis typed as("text" | "image")[]; there is no"video"modality.VideoContenttype exists;UserMessageandToolResultMessagecontent only supports text and images.packages/coding-agent/src/cli/file-processor.tstreats video files as text attachments.openai-completionsprovider does not serializevideo_urlblocks.imageinput capability inmodifyModels(), but notvideo.Proposed Behavior
@pathor--file.video_urldata URL blocks for models that declarevideoinput support.kimi-for-codingOAuth model exposesvideocapability alongsideimage.Acceptance Criteria
VideoContenttype and"video"input modality added topackages/ai/src/types.ts.UserMessageandToolResultMessagecontent unions includeVideoContent.openai-completionsprovider serializes video blocks asvideo_urldata URLs and adds placeholder text for unsupported models.packages/ai/src/utils/oauth/kimi-coding.ts) forcesvideocapability alongsideimage.file-processor.tsdetects common video MIME types and attaches them asVideoContent.scripts/generate-models.tsparses video modality from upstream model sources (OpenRouter, models.dev, etc.).packages/coding-agent/README.md,providers.md,models.md).Context
Technical Notes
video_urlcontent blocks are rendered as<|kimi_k25_video_placeholder|>, confirming OpenAI-stylevideo_urlis the correct payload shape.video_urlblocks in the future.