← Back to PRs

#20867: fix: allow 'video' and 'audio' in models.input config

by pierreeurope open 2026-02-19 11:02 View on GitHub →
agents size: XS
The zod schema for model input modalities only accepted 'text' and 'image', but the codebase already supports video and audio through MediaUnderstandingCapabilitiesSchema and related constants. Trying to configure a model with video or audio input would fail validation. This adds 'video' and 'audio' as valid values in both the zod schema and the TypeScript type. Also updates the Bedrock discovery module to pass through video/audio modalities from the AWS API instead of dropping them. Fixes #20721 <!-- greptile_comment --> <h3>Greptile Summary</h3> Extended model input modalities to support `video` and `audio` in addition to `text` and `image`. The codebase already supported these modalities through `MediaUnderstandingCapabilitiesSchema` (src/config/zod-schema.core.ts:408-410), but the `ModelDefinitionSchema.input` field was limited to `text` and `image`, causing validation failures when configuring models with video or audio capabilities. This change aligns the model configuration schema with existing media understanding capabilities throughout the codebase. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The changes are straightforward type additions that align the model input schema with existing media capabilities. The modifications are consistent across all three affected files (TypeScript type, Zod schema, and Bedrock discovery), with no breaking changes to existing functionality. The code already handles video and audio throughout the media understanding system. - No files require special attention <sub>Last reviewed commit: 4906ac0</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs