fix(openai): preserve codex tool call ids
This commit is contained in:
@@ -21,7 +21,7 @@ type FunctionCallOutputValidation struct {
|
||||
}
|
||||
|
||||
// NeedsToolContinuation 判定请求是否需要工具调用续链处理。
|
||||
// 满足以下任一信号即视为续链:previous_response_id、input 内包含 function_call_output/item_reference、
|
||||
// 满足以下任一信号即视为续链:previous_response_id、input 内包含工具输出/item_reference、
|
||||
// 或显式声明 tools/tool_choice。
|
||||
func NeedsToolContinuation(reqBody map[string]any) bool {
|
||||
if reqBody == nil {
|
||||
@@ -46,7 +46,7 @@ func NeedsToolContinuation(reqBody map[string]any) bool {
|
||||
continue
|
||||
}
|
||||
itemType, _ := itemMap["type"].(string)
|
||||
if itemType == "function_call_output" || itemType == "item_reference" {
|
||||
if isCodexToolCallItemType(itemType) || itemType == "item_reference" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user