Roo-Code/packages/types
Roo Code 6fe9a9eb4f feat(litellm): add flatten content option for auto_router compatibility
LiteLLM's auto_router feature passes user content to embedding models for
semantic routing. However, embedding models expect plain strings, not arrays
of content blocks. This causes errors when Roo Code sends messages with array
content format.

This commit adds a new `litellmFlattenContent` option (enabled by default)
that flattens array content to simple string format before sending to LiteLLM.

Changes:
- Add litellmFlattenContent option to provider-settings.ts schema
- Add flattenMessageContent method to LiteLLMHandler
- Apply flattening in createMessage when option is enabled (default: true)
- Add UI checkbox in LiteLLM settings component
- Add translations for all supported languages
- Add comprehensive tests for the flattening logic

Users who need multimodal content (images) can disable this option.

Fixes #11132
2026-01-31 04:48:11 +00:00
..
npm Release: v1.106.0 (#10749) 2026-01-15 01:44:14 -05:00
scripts Fix publish-npm script (#7093) 2025-08-14 03:17:56 -07:00
src feat(litellm): add flatten content option for auto_router compatibility 2026-01-31 04:48:11 +00:00
.gitignore Task metadata (#7092) 2025-08-14 03:14:17 -07:00
eslint.config.mjs Task metadata (#7092) 2025-08-14 03:14:17 -07:00
package.json feat: add AI SDK dependencies and message conversion utilities (#11047) 2026-01-28 14:05:53 -05:00
tsconfig.json Task metadata (#7092) 2025-08-14 03:14:17 -07:00
tsup.config.ts Bump @roo-code/types to v1.42.0 (#6610) 2025-08-02 13:27:59 -07:00
vitest.config.ts Convert jest tests to vitest and disable default watch mode for vitest (#4568) 2025-06-11 14:48:01 -07:00