fix(openai_compat): add ok check for native_search type assertion
This commit is contained in:
1 parent
b9a8fad6fa
commit
351ecf0182
1 file changed
+2
-1
@@ -154,7 +154,8 @@ func (p *Provider) buildRequestBody(
|
||||
}
|
||||
|
||||
// When fallback uses a different provider (e.g. DeepSeek), that provider must not inject web_search_preview.
|
||||
nativeSearch, _ := options["native_search"].(bool)
|
||||
nativeSearch, ok := options["native_search"].(bool)
|
||||
_ = ok
|
||||
nativeSearch = nativeSearch && isNativeSearchHost(p.apiBase)
|
||||
if len(tools) > 0 || nativeSearch {
|
||||
requestBody["tools"] = buildToolsList(tools, nativeSearch)
|
||||
|
||||
Reference in new issue
Block a user