🚀 fix(model-sync): avoid unnecessary upstream fetch while keeping overwrite updates working

- Only short-circuit when there are no missing models AND no overwrite fields requested
- Preserve overwrite behavior even when the missing-model list is empty
- Always return empty arrays (not null) for list fields to keep API responses stable
- Clarify SyncUpstreamModels behavior in comments (create missing models + optional overwrite updates)
This commit is contained in:
t0ng7u
2025-12-25 23:01:09 +08:00
parent d3c854fbed
commit 83fbaba768
2 changed files with 29 additions and 5 deletions

View File

@@ -401,7 +401,7 @@ func StreamResponseOpenAI2Claude(openAIResponse *dto.ChatCompletionsStreamRespon
},
})
}
if len(toolCall.Function.Arguments) > 0 {
claudeResponses = append(claudeResponses, &dto.ClaudeResponse{
Index: &idx,