fix(openai_compat): use structured logger for native_search warning

This commit is contained in:
Alix-007
2026-06-24 18:30:44 +08:00
parent a75b3d15bb
commit 540f81ff9e
+6 -3
View File
@@ -160,9 +160,12 @@ func (p *Provider) buildRequestBody(
// treat it as false — web_search_preview must not be injected
// when the caller cannot express a well-typed intent.
if _, present := options["native_search"]; present {
log.Printf(
"[openai_compat] native_search option has unexpected type %T, ignoring",
options["native_search"],
logger.WarnCF(
"provider.openai_compat",
"native_search option has unexpected type, ignoring",
map[string]any{
"type": fmt.Sprintf("%T", options["native_search"]),
},
)
}
}