feat(model): 双协议 LLM Provider(AnthropicChNativeAdapter /v1/messages + tool_use.input→Args 直接映射 + 流式重组)+ Provider 感知工厂/路由 + LLM_PROVIDER/anthropic 配置(OpenAI 兼容保留)
This commit is contained in:
1 parent
f9650185f1
commit
3632e04733
11 files changed
+1452
-18
No files matched your search
+2
-2
@@ -246,12 +246,12 @@ func (a *app) wireMemory(ctx context.Context) error {
|
||||
// wireRuntime builds the model adapter, tool dispatcher, guardrails, the agent
|
||||
// and its loop, tracing, persistence and the orchestration scheduler.
|
||||
func (a *app) wireRuntime() error {
|
||||
adapter, aerr := model.NewOpenAIChatChain(a.cfg.LLM)
|
||||
adapter, aerr := model.NewChatChain(a.cfg.LLM)
|
||||
if aerr != nil {
|
||||
a.log.Warn("llm adapter unavailable", "error", aerr)
|
||||
adapter = nil
|
||||
}
|
||||
router := model.NewRouter(a.cfg.LLM.Model)
|
||||
router := model.NewRouter(model.DefaultModelForProvider(a.cfg.LLM))
|
||||
|
||||
dispatcher, derr := tool.New(a.caps, tool.WithDefaultTimeout(defaultToolTimeout))
|
||||
if derr != nil {
|
||||
|
||||
Reference in new issue
Block a user