@@ -636,11 +636,7 @@ describe('convertCbToModelMessages', () => {
636636 content : [
637637 {
638638 type : 'text' ,
639- text : 'M' ,
640- } ,
641- {
642- type : 'text' ,
643- text : 'ore context' ,
639+ text : 'More context' ,
644640 providerOptions : expect . objectContaining ( {
645641 openaiCompatible : {
646642 cache_control : {
@@ -682,11 +678,7 @@ describe('convertCbToModelMessages', () => {
682678 content : [
683679 {
684680 type : 'text' ,
685- text : 'I' ,
686- } ,
687- {
688- type : 'text' ,
689- text : 'nstructions' ,
681+ text : 'Instructions' ,
690682 providerOptions : expect . objectContaining ( {
691683 openaiCompatible : {
692684 cache_control : {
@@ -724,11 +716,7 @@ describe('convertCbToModelMessages', () => {
724716 content : [
725717 {
726718 type : 'text' ,
727- text : 'M' ,
728- } ,
729- {
730- type : 'text' ,
731- text : 'ore context' ,
719+ text : 'More context' ,
732720 providerOptions : expect . objectContaining ( {
733721 openaiCompatible : {
734722 cache_control : {
@@ -768,11 +756,7 @@ describe('convertCbToModelMessages', () => {
768756 { type : 'text' , text : 'More context' } ,
769757 {
770758 type : 'text' ,
771- text : 'U' ,
772- } ,
773- {
774- type : 'text' ,
775- text : 'ser message' ,
759+ text : 'User message' ,
776760 providerOptions : expect . objectContaining ( {
777761 openaiCompatible : {
778762 cache_control : {
@@ -863,14 +847,14 @@ describe('convertCbToModelMessages', () => {
863847 ] )
864848 } )
865849
866- it ( 'should skip very short text content when finding cache control location' , ( ) => {
850+ it ( 'should handle very short text content when finding cache control location' , ( ) => {
867851 const messages : Message [ ] = [
868852 { role : 'system' , content : 'System' } ,
869853 {
870854 role : 'user' ,
871855 content : [
872- { type : 'text' , text : 'Long enough text' } ,
873- { type : 'text' , text : 'X' } , // Too short
856+ { type : 'text' , text : 'Longer text' } ,
857+ { type : 'text' , text : 'X' } , // Short
874858 ] ,
875859 } ,
876860 { role : 'user' , content : 'Next' , tags : [ 'USER_PROMPT' ] } ,
@@ -886,10 +870,10 @@ describe('convertCbToModelMessages', () => {
886870 {
887871 role : 'user' ,
888872 content : [
889- { type : 'text' , text : 'L ' } ,
873+ { type : 'text' , text : 'Longer text ' } ,
890874 {
891875 type : 'text' ,
892- text : 'ong enough text ' ,
876+ text : 'X ' ,
893877 providerOptions : expect . objectContaining ( {
894878 openaiCompatible : {
895879 cache_control : {
@@ -898,10 +882,6 @@ describe('convertCbToModelMessages', () => {
898882 } ,
899883 } ) ,
900884 } ,
901- {
902- type : 'text' ,
903- text : 'X' ,
904- } ,
905885 ] ,
906886 } ,
907887 expect . objectContaining ( { role : 'user' } ) ,
0 commit comments