Skip to content

feat(cohere): upgrade integration from ai to gen_ai #6805

feat(cohere): upgrade integration from ai to gen_ai

feat(cohere): upgrade integration from ai to gen_ai #6805

Triggered via pull request March 4, 2026 16:12
Status Success
Total duration 9m 42s
Artifacts 2

test-integrations-tasks.yml

on: pull_request
Matrix: Tasks
All Tasks tests passed
2s
All Tasks tests passed
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 28 warnings
Streaming iterator silently suppresses API exceptions: sentry_sdk/integrations/cohere/v1.py#L151
The `_iter_v1_stream_events` function wraps the entire for-loop with `capture_internal_exceptions()` (line 151), which suppresses ALL exceptions including legitimate API errors (network failures, rate limits) from the Cohere client. This differs from the OpenAI integration pattern where `capture_internal_exceptions()` is used inside the loop only around instrumentation code. Users iterating over streaming responses won't see errors and will experience silently truncated responses.
Stream iterator silently swallows API exceptions: sentry_sdk/integrations/cohere/v1.py#L151
The `_iter_v1_stream_events` function wraps the entire iterator loop (including `for x in old_iterator`) inside `capture_internal_exceptions()`. Since this context manager suppresses all exceptions (returns `True` in `__exit__`), any exceptions raised by the Cohere API during streaming will be silently swallowed rather than propagated to the caller. This differs from other AI SDK integrations (OpenAI, Anthropic) which only wrap SDK instrumentation code, not the API iterator itself.
Tasks (3.11, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.8, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.8, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.8, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.6, ubuntu-22.04)
❌ Patch coverage check failed: 6.56% < target 80%
Tasks (3.6, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.6, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.14t, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.14t, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.14t, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.14, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.14, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.14, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.9, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.9, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.9, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.7, ubuntu-22.04)
❌ Patch coverage check failed: 6.56% < target 80%
Tasks (3.7, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.7, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.10, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.10, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.10, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.12, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.12, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.12, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.13, ubuntu-22.04)
❌ Patch coverage check failed: 6.47% < target 80%
Tasks (3.13, ubuntu-22.04)
Failed to upload coverage artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run
Tasks (3.13, ubuntu-22.04)
Failed to upload test artifact: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

Artifacts

Produced during runtime
Name Size Digest
codecov-coverage-results-shellmayr-feat-upgrade-cohere-ai-integration-from-ai-to-genai-test-tasks
106 KB
sha256:7383cc4d70596554774a2551bedcadd252e19934367a26fea0a302bb6d0c1ea9
codecov-test-results-shellmayr-feat-upgrade-cohere-ai-integration-from-ai-to-genai-test-tasks
232 Bytes
sha256:7b710656268a57b073cb572c938caa773ea8a38acb00002da0049118dce5dddc