Commit 36a986d
authored
refactor: migrate featherless provider to AI SDK (#11265)
* refactor: migrate featherless provider to AI SDK
* fix: merge consecutive same-role messages in featherless R1 path
convertToAiSdkMessages does not merge consecutive same-role messages
like convertToR1Format did. When the system prompt is prepended as a
user message and the conversation already starts with a user message,
DeepSeek R1 can reject the request.
Add mergeConsecutiveSameRoleMessages helper that collapses adjacent
Anthropic messages sharing the same role before AI SDK conversion.
Includes a test that verifies no two successive messages share a role.1 parent a3a9048 commit 36a986d
2 files changed
Lines changed: 399 additions & 275 deletions
0 commit comments