MCPcopy Create free account
hub / github.com/coder/aibridge / TestInjectedToolsTrace

Function TestInjectedToolsTrace

internal/integrationtest/trace_test.go:320–430  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

318}
319
320func TestInjectedToolsTrace(t *testing.T) {
321 t.Parallel()
322
323 tests := []struct {
324 name string
325 streaming bool
326 bedrock bool
327 fixture []byte
328 path string
329 expectModel string
330 expectProvider string
331 opts []bridgeOption
332 }{
333 {
334 name: "anthr_blocking",
335 streaming: false,
336 fixture: fixtures.AntSingleInjectedTool,
337 path: pathAnthropicMessages,
338 expectModel: "claude-sonnet-4-20250514",
339 expectProvider: config.ProviderAnthropic,
340 },
341 {
342 name: "anthr_streaming",
343 streaming: true,
344 fixture: fixtures.AntSingleInjectedTool,
345 path: pathAnthropicMessages,
346 expectModel: "claude-sonnet-4-20250514",
347 expectProvider: config.ProviderAnthropic,
348 },
349 {
350 name: "bedrock_blocking",
351 streaming: false,
352 bedrock: true,
353 fixture: fixtures.AntSingleInjectedTool,
354 path: pathAnthropicMessages,
355 expectModel: "beddel",
356 expectProvider: config.ProviderAnthropic,
357 opts: []bridgeOption{withProvider(providerBedrock)},
358 },
359 {
360 name: "bedrock_streaming",
361 streaming: true,
362 bedrock: true,
363 fixture: fixtures.AntSingleInjectedTool,
364 path: pathAnthropicMessages,
365 expectModel: "beddel",
366 expectProvider: config.ProviderAnthropic,
367 opts: []bridgeOption{withProvider(providerBedrock)},
368 },
369 {
370 name: "openai_blocking",
371 streaming: false,
372 fixture: fixtures.OaiChatSingleInjectedTool,
373 path: pathOpenAIChatCompletions,
374 expectModel: "gpt-4.1",
375 expectProvider: config.ProviderOpenAI,
376 },
377 {

Callers

nothing calls this directly

Calls 9

withProviderFunction · 0.85
setupTracerFunction · 0.85
setupInjectedToolTestFunction · 0.85
verifyTracesFunction · 0.85
RecordedInterceptionsMethod · 0.80
ListToolsMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected