Tailf to make CLI to exit the container and continue to input from the parent container when any leaf of current container has been set

Requirement:

veg pepper
veg bell red yellow pepper
veg bell red pepper
veg bell yellow pepper

Model:

    container veg {                                                              
        tailf:cli-sequence-commands;                                             
        tailf:cli-compact-syntax;                                                
        container bell {                                                         
            tailf:cli-flatten-container;     
            tailf:cli-optional-in-sequence;                        
            leaf red {                                                           
                tailf:cli-optional-in-sequence;                                  
                type empty;                                                      
            }                                                                    
            leaf yellow {                                                        
                tailf:cli-optional-in-sequence;                                  
                type empty;                                                      
            }                                                                    
        }                                                                        
        leaf pepper {                                                            
            tailf:cli-optional-in-sequence;                                      
            type empty;                                                          
        }                                                                        
    } 

Problem :
Supports
veg pepper
veg bell red yellow pepper

Due to presence of tailf:cli-flatten-container; it currenlty bell leaf is accepted only when both red & yellow are filled. Not any one.

Console logs:

(config)# veg ?                                                     
Possible completions:
  bell  pepper
config)# veg bell ?
Possible completions:
  red  yellow
(config)# veg bell red ?
Possible completions:
  yellow  <cr>
(config)# veg bell red yellow ?
Possible completions:
  pepper  <cr>

Is there any way to achive the requirement without actually deprecating (remodelling making all nodes inside veg as leaf)

I don’t think there is another way. tail:flatten-container helps you jump back up to be able to configure pepper after being in the bell container, but it needs to know that you are ‘done’ in the container in order to jump back out so you have to have both red and yellow configured first.

Of course, as you mention, with a little remodeling…

Thanks Scott for response.