@@ -17,7 +17,7 @@ import (
1717 "github.com/priyanshujain/openbotkit/provider/openai"
1818)
1919
20- // providerTestCase holds a provider instance and model name for table-driven integration tests.
20+ // providerTestCase holds a provider instance and model name for provider conformance tests.
2121type providerTestCase struct {
2222 name string
2323 provider provider.Provider
@@ -81,15 +81,14 @@ func availableProviders(t *testing.T) []providerTestCase {
8181 }
8282
8383 if len (providers ) == 0 {
84- t .Skip ("no API keys set (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY) — skipping integration tests" )
84+ t .Skip ("no API keys set (ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY) — skipping provider tests" )
8585 }
8686 return providers
8787}
8888
89- // TestIntegration_AgentLoop tests the full agent loop with a real LLM API.
90- // The agent is given a bash tool, asked to run "echo hello", and should
91- // return a response containing the command output.
92- func TestIntegration_AgentLoop (t * testing.T ) {
89+ // TestProvider_AgentToolExecution verifies each provider can drive the agent
90+ // loop: user request → tool call → tool execution → text response.
91+ func TestProvider_AgentToolExecution (t * testing.T ) {
9392 for _ , tc := range availableProviders (t ) {
9493 t .Run (tc .name , func (t * testing.T ) {
9594 reg := tools .NewRegistry ()
@@ -115,9 +114,9 @@ func TestIntegration_AgentLoop(t *testing.T) {
115114 }
116115}
117116
118- // TestIntegration_ToolUseRoundtrip verifies the provider correctly handles a
119- // tool_use → tool_result → text response cycle via the real API.
120- func TestIntegration_ToolUseRoundtrip (t * testing.T ) {
117+ // TestProvider_ToolUseRoundtrip verifies each provider correctly handles the
118+ // tool_use → tool_result → text response cycle against the real API.
119+ func TestProvider_ToolUseRoundtrip (t * testing.T ) {
121120 for _ , tc := range availableProviders (t ) {
122121 t .Run (tc .name , func (t * testing.T ) {
123122 toolSchema := provider.Tool {
@@ -170,6 +169,7 @@ func TestIntegration_ToolUseRoundtrip(t *testing.T) {
170169 Type : provider .ContentToolResult ,
171170 ToolResult : & provider.ToolResult {
172171 ToolUseID : calls [0 ].ID ,
172+ Name : calls [0 ].Name ,
173173 Content : `{"temperature": "22°C", "condition": "Sunny"}` ,
174174 },
175175 },
@@ -205,8 +205,9 @@ func TestIntegration_ToolUseRoundtrip(t *testing.T) {
205205 }
206206}
207207
208- // TestIntegration_Streaming verifies streaming works with the real API.
209- func TestIntegration_Streaming (t * testing.T ) {
208+ // TestProvider_Streaming verifies each provider's streaming implementation
209+ // delivers text deltas and a done event.
210+ func TestProvider_Streaming (t * testing.T ) {
210211 for _ , tc := range availableProviders (t ) {
211212 t .Run (tc .name , func (t * testing.T ) {
212213 ctx , cancel := context .WithTimeout (context .Background (), 30 * time .Second )
0 commit comments