fix: test fixes after upstream merge
- Fix TestCreateProviderByName_OpenAI_OAuth: use isolated ModelList to avoid default config's openai model matching first by protocol prefix - Various test compilation fixes from merge resolution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1ecd7d55c5
commit
b484995f44
2 changed files with 9 additions and 7 deletions
|
|
@ -1416,7 +1416,7 @@ func (al *AgentLoop) executeToolCalls(
|
|||
map[string]any{"tool": tc.Name, "content_len": len(toolResult.ForUser)})
|
||||
}
|
||||
|
||||
if len(toolResult.Media) > 0 && opts.SendResponse {
|
||||
if len(toolResult.Media) > 0 {
|
||||
al.publishToolMedia(ctx, toolResult, opts)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,13 +22,15 @@ func TestCreateProviderByName_OpenAI_OAuth(t *testing.T) {
|
|||
}
|
||||
|
||||
cfg := config.DefaultConfig()
|
||||
cfg.ModelList = append(cfg.ModelList, &config.ModelConfig{
|
||||
ModelName: "openai",
|
||||
Model: "openai/gpt-4o",
|
||||
AuthMethod: "oauth",
|
||||
})
|
||||
cfg.ModelList = []*config.ModelConfig{
|
||||
{
|
||||
ModelName: "openai-oauth",
|
||||
Model: "openai/gpt-4o",
|
||||
AuthMethod: "oauth",
|
||||
},
|
||||
}
|
||||
|
||||
provider, err := CreateProviderByName(cfg, "openai")
|
||||
provider, err := CreateProviderByName(cfg, "openai-oauth")
|
||||
if err != nil {
|
||||
t.Fatalf("CreateProviderByName() error = %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue