Repository navigation
Conversation
Resolve each SDK method owner once, preserve v1 instrumentation, and capture v2 messages, tool deltas, token usage and typed embeddings. Keep streaming span context local to SDK iteration and finish on completion, errors, cancellation or close. Use canonical message attributes for privacy. Add offline SDK and OTLP-wire regression coverage for Cohere 5.0.0, 5.13.12 and 7.3.0. Update package examples to v2 without changing the public instrumentor API. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Apply the configured core image mask to telemetry-only message copies so hide_input_images and base64 size limits cover both input.value and message.content. Preserve original requests and explicit config priority. Add failing-first real-SDK OTLP regressions for sync/async chat and streams, typed/dict messages, environment options, and direct floor-SDK extraction. Co-Authored-By: Claude Code <noreply@anthropic.com>
Honor selective content flags on raw telemetry copies, mask native stream error details with the effective config, finish cancelled calls, and classify terminal provider failures. Require tested core 1.2.2 and exercise SDK/core floors and latest distributions in compatibility CI. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Strip document and tool-result citation payloads only from telemetry copies under effective input privacy. Share native response failure classification across unary and streaming chat, including ERROR_LIMIT. Add SDK-to-OTLP regression coverage for configuration precedence, immutable caller data, and terminal status. Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep
traceAI-cohereand repair its SDK coverage rather than retire it.ClientV2andAsyncClientV2resolve separate SDK implementations, so patching only v1 clients did not trace their calls. Async v1 streaming was also unwrapped.CohereInstrumentor().instrument(...), v1 entrypoints, original responses/events, suppression and uninstrumentation.input.valueormessage.content. Respecthide_input_imagesandbase64_image_max_length, preserve text, and never modify the request sent to Cohere. Explicit config takes precedence over environment settings.chat_history. Native stream error details use the exact effective config before serialization; caller data is unchanged.ERROR,ERROR_TOXIC,TIMEOUTor error-bearing stream endings as failures, including explicit close after a terminal event.0.1.11to tested1.2.2. Add installed-distribution CI for SDK/core floors, early v2, and latest releases.Reproduction
The original
devbaseline atcdee70dd76ff7ee00aaa69e0d6477485e7bd6925failed 24 of 32 real-SDK surface/wire regression cases on Cohere 7.3.0. The tests import the baseline implementation explicitly usingPYTHONPATHand pytest's--import-mode=importlib; the SDK calls usehttpx.MockTransport.Before the image fix, the new multimodal SDK tests fail 32 of 48 cases: image hiding and base64 limits are bypassed by both serialized attributes. The same cases now pass. They cover sync/async chat and streaming, dictionaries and SDK model objects, and explicit/environment configuration. Assertions inspect both attributes and serialized OTLP bytes, retain text, and prove the provider request remains unchanged.
Independent review reproductions failed 32 of 32 behavioral cases before the review fixes. The old declared core floor passed dependency checks but raised
AttributeErrorbefore any provider request; the same call succeeds on the new minimum. Expanded tests also reproduced v1 input leakage through the response-side history. The regression suite now covers explicit/environment settings in both directions, async paths, unchanged provider payloads, cancellation identity, terminal failure status, and serialized OTLP non-disclosure.Merged
origin/devnormally into this branch; no force push or duplicate PR.Tests
All runtime tests ran under an OS outbound-network-deny sandbox, with synthetic credentials and fake HTTP transports. No vendor/model API or Cloud collector was called.
httpx==0.27.2.python3 .github/release/release_plan.py --check: 129 packages, versions and coverage consistent.Fchecks on changed source/tests, formatter check andgit diff --checkpass. The pre-existing legacy test file has three unused-import lint warnings, outside the changed files. There is no package-configured Ruff gate.Re-run the package suite after installing the package, pytest, pytest-asyncio and the OTLP HTTP exporter:
E2E coverage
Not applicable: this repository has no
e2e/scripts/e2e-coverage.mjsapp harness. Provider SDK transport-to-OTLP coverage is included in the package suite. Live provider behavior is not claimed.Release
Targets
dev; release-please owns the package version and changelog. No merge to dev, tag, package publication or docs-site PR is part of this change. Release the corrected package before advertising the new coverage separately.🤖 Generated with Claude Code