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

View file

@ -160,9 +160,12 @@ func (p *Provider) buildRequestBody(
// treat it as false — web_search_preview must not be injected // treat it as false — web_search_preview must not be injected
// when the caller cannot express a well-typed intent. // when the caller cannot express a well-typed intent.
if _, present := options["native_search"]; present { if _, present := options["native_search"]; present {
log.Printf( logger.WarnCF(
"[openai_compat] native_search option has unexpected type %T, ignoring", "provider.openai_compat",
options["native_search"], "native_search option has unexpected type, ignoring",
map[string]any{
"type": fmt.Sprintf("%T", options["native_search"]),
},
) )
} }
} }