diff --git a/pkg/tools/subagent_tool_test.go b/pkg/tools/subagent_tool_test.go index 776857dfc..804272823 100644 --- a/pkg/tools/subagent_tool_test.go +++ b/pkg/tools/subagent_tool_test.go @@ -12,6 +12,7 @@ import ( // MockLLMProvider is a test implementation of LLMProvider type MockLLMProvider struct { lastOptions map[string]any + lastModel string } func (m *MockLLMProvider) Chat( @@ -22,6 +23,7 @@ func (m *MockLLMProvider) Chat( options map[string]any, ) (*providers.LLMResponse, error) { m.lastOptions = options + m.lastModel = model // Find the last user message to generate a response for i := len(messages) - 1; i >= 0; i-- { if messages[i].Role == "user" { @@ -381,6 +383,9 @@ func TestSubagentTool_Execute_WithModel(t *testing.T) { if result.IsError { t.Errorf("Expected success, got error: %s", result.ForLLM) } + if provider.lastModel != "custom-model" { + t.Errorf("expected model 'custom-model', got %q", provider.lastModel) + } } func TestSubagentTool_Execute_WithInvalidModel(t *testing.T) {