fix(translator): handle system role as developer in Claude request conversion
- Updated `ConvertClaudeRequestToGemini` logic to treat `system` role as `developer`. - Added unit test case to validate the behavior. Closes: #3510
This commit is contained in:
@@ -42,6 +42,18 @@ func TestConvertClaudeRequestToCodex_SystemMessageScenarios(t *testing.T) {
|
||||
wantHasDeveloper: true,
|
||||
wantTexts: []string{"Be helpful"},
|
||||
},
|
||||
{
|
||||
name: "System role in messages",
|
||||
inputJSON: `{
|
||||
"model": "claude-3-opus",
|
||||
"messages": [
|
||||
{"role": "system", "content": "Follow the project instructions"},
|
||||
{"role": "user", "content": "hello"}
|
||||
]
|
||||
}`,
|
||||
wantHasDeveloper: true,
|
||||
wantTexts: []string{"Follow the project instructions"},
|
||||
},
|
||||
{
|
||||
name: "Array system field with filtered billing header",
|
||||
inputJSON: `{
|
||||
|
||||
Reference in New Issue
Block a user