Skip to content

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

feat(cohere): upgrade integration from ai to gen_ai

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

Triggered via pull request March 5, 2026 09:41
Status Success
Total duration 9m 23s
Artifacts 2

test-integrations-tasks.yml

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

Annotations

31 warnings
require_truthy parameter has no effect in get_first_from_sources: sentry_sdk/integrations/cohere/utils.py#L19
The `require_truthy` parameter in `get_first_from_sources` is non-functional. Line 23 (`if not value: continue`) already skips all falsy values unconditionally, making the subsequent check on line 25 (`if not require_truthy or value`) always evaluate to true. This means valid falsy values like `0` or empty strings `""` are always ignored, even when `require_truthy=False` is passed (as in v1.py:175,179 and v2.py:192). Callers expecting `require_truthy=False` to return falsy-but-not-None values will get incorrect behavior.
Stream exceptions silently suppressed in _iter_v2_stream_events: sentry_sdk/integrations/cohere/v2.py#L145
The `_iter_v2_stream_events` function wraps the entire iterator loop in `capture_internal_exceptions()`, which suppresses and logs all exceptions silently. If the underlying stream (`old_iterator`) raises an exception (e.g., network error, malformed response), it will be swallowed and the generator will simply stop yielding without propagating the error to the caller. This could lead to silent failures where users don't know their stream was interrupted.
Tasks (3.8, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < target 80%
Tasks (3.11, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < target 80%
Tasks (3.11, 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.11, 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.62% < 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
require_truthy parameter is ineffective - function always skips falsy values: sentry_sdk/integrations/cohere/utils.py#L23
In `get_first_from_sources`, line 23 (`if not value: continue`) skips all falsy values (including `0`, `""`, `False`) before the `require_truthy` check on line 25. This makes the `require_truthy=False` parameter meaningless - the function always behaves as if `require_truthy=True`. When extracting token counts, a valid `0` value would be incorrectly skipped, causing the function to try the next source path or return `None`.
Tasks (3.7, ubuntu-22.04)
❌ Patch coverage check failed: 6.62% < 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.14t, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < 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.54% < 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.10, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < 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.9, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < 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.12, ubuntu-22.04)
❌ Patch coverage check failed: 6.54% < 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.54% < 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 Expired
105 KB
sha256:10465a23a08c094dff93bb076532753e00aec1ab62e76361f4fb98bfb4a39679
codecov-test-results-shellmayr-feat-upgrade-cohere-ai-integration-from-ai-to-genai-test-tasks Expired
232 Bytes
sha256:d272689a57b532340ba54056a24646bb94232f7ae06691d37fdbd10f4f7eb911