Repository navigation
Conversation
Reuse the shared SDK route with exact documented hosts and preserve the dedicated package until migration parity is ready. Test attribution and privacy over loopback OTLP at supported SDK boundaries. Co-Authored-By: Claude Code <noreply@anthropic.com>
Keep attribution and text masking coverage on the existing core 1.1.0 lock while running tool and error privacy contracts on the source core and released 1.2.2 CI jobs. 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
Correct MiniMax provider attribution in the existing Python
traceAI-openaiintegration. This is a releasable shared-route prerequisite, not approval to delete or deprecatetraceAI-minimax.api.minimax.io,api.minimax.cn,api.minimaxi.comandapi.minimax.chat; preserve the fallback for custom proxies, bare domains and look-alikes.Sources and design
MiniMax officially supports the shared OpenAI client. No separate wrapper or copied vendor implementation is needed for provider attribution.
https://api.minimax.io/v1.https://api.minimax.cn/v1, not only the olderminimaxi.comspelling.api.minimax.io,api.minimaxi.comandapi.minimax.chat. Legacy hosts are retained as attribution aliases; this does not assert their current service availability.The resolver keeps this repository's exact-host policy rather than widening to arbitrary MiniMax-looking subdomains.
Verification
Base:
d6a9966dd4d5d5fb344f7f5ab11b7483c2c2a6bc.Before the production change, the new provider suite had 54 failures and 13 passes at both OpenAI boundaries. All 54 failures were the missing MiniMax attribution or its normalization. After the fix:
fi-instrumentation-otel1.2.2The first generic package CI run exposed its older core 1.1.0 lock: that release lacks error-detail controls and full tool-schema masking. Six tool/error privacy cases explicitly target core 1.2.2+ and skip on the old lock; all six run and pass in every dedicated modern-core job. Plain-text privacy and all attribution cases still run on the old lock. This change does not claim to add privacy features to old core releases, and the held guide requires core 1.2.2 or later.
Vendor HTTP uses
httpx.MockTransport; exports cross a real localhost HTTP socket and are decoded as OTLP protobuf by the repository harness. Every local Python test/probe used the macOS sandbox denying outbound network except localhost. CI uses a network namespace with only loopback. No real credentials, model API calls or Future AGI backend calls were used.Rerun with the source OpenAI package, core,
pytest,pytest-asyncio, andhttpxinstalled:The new workflow pins the three environments. New-test Ruff E/F/I checks and
git diff --checkpass. There is no Ruff configuration in the touched package pyproject, and no migrations, frontend contracts or OSS/EE boundary changes. Self-review found no introduced blocking defects.The README and held MDX snippet also ran unchanged with
register(), mocked vendor HTTP and localhost OTLP at both SDK boundaries and released core. The MDX compiles; site rendering and live backend display are not claimed.Retirement gate remains closed
Independent offline probes on both SDK boundaries reconfirm that enabling both packages emits two spans. The shared route still omits response IDs and finish reasons, loses streamed tool arguments, and can omit text when final usage is null. Streamed-tool/null-usage repair is already in #367; this PR intentionally does not duplicate or modify that work. Attribution tests for streamed tools verify SDK result preservation, provider and usage, not exported tool-argument parity.
The existing legacy package also supports OpenAI 1.0–1.68, below the shared package floor. Its current stream handling can raise
TypeErroron an SDK-normalized nulltool_callsfield. No claim of legacy streaming correctness or full migration parity is made.Release this shared attribution fix first. Before retiring the dedicated implementation, land/release the shared stream fix, resolve the remaining response-ID/finish-reason and one-span coexistence contracts, verify privacy/parity, and provide a backward-compatible entry-point migration. Keep published registry history. Do not delete or advertise a drop-in replacement on this PR alone.
A customer docs draft is held outside the docs repository until the corrected package reaches PyPI; no docs PR advertises unreleased attribution. It describes the limited non-streaming route rather than claiming retirement parity. The Anthropic-compatible route is outside this change.
E2E coverage
not applicable (no e2e/ harness) · flows hit: n/a · marker: n/a · verdict: not applicable
Generated with Claude Code