Chase (@jax_wang)Opencode go 如何在 CPA 中时使用 messages 协议 中发帖

最近 opencode 支持了 responses 以及 messages 协议, 我在 CPA 中一直都是用 chat 协议, 唯一不好的就是不能支持 web search. 


现在可以在 claude 中增加一个 header.
[image]
这样就能用 web search 了.
[image]
解释为什么? 借助 AI, 发现在 CLIProxyAPI 源码 CLIProxyAPI/internal/runtime/executor/claude_executor.go" line 218
useAPIKey := auth != nil && auth.Attributes != nil && strings.TrimSpace(auth.Attributes["api_key"]) != ""
isAnthropicBase := isAnthropic...