Repository navigation
Conversation
Trim the `current` job matrix to the odd CPython legs (drop 3.10/3.12); the archived `legacy` job stays on 3.11.
…1/G2/G5) Add dashscope.management as an optional [management] extra: a ToB self-service backend integration layer over the ModelStudio/2026-02-10 RAM OpenAPI (ROA). Read-only first release. - G1 atomic layer: 14 read ops only (workspaces/models/limits/permissions, api keys, billing overview/trend, token plan account/members/seats/ subscription/shared-packages). 24 write/out-of-scope ops deferred and catalogued as high-risk in md; no code. - G2 resources: ManagementClient/AsyncManagementClient with sync+async symmetry, raw=True overloads, region binding + with_options(region). - G5 cross-cutting: V3 ACS3-HMAC-SHA256 signing via official alibabacloud_openapi_util; credential chain via alibabacloud_credentials; dual-envelope success gate + RAM error crosswalk; SecretStr redaction; dual pagination (TokenPage nextToken / BasePage PageNo). - Every request carries x-dashscope-sdk-client=python-sdk/<ver>/management2 + session id + client-request-id, folded into the signed header set. Tests: 120 mock tests (signer gateway oracle, credentials, errors, transport, resources, pagination) + 5 env-gated read-only e2e. Full suite 6498 passed / 51 skipped / 0 failed. pre-commit green.
…identity swap - Raise error if partial access_key_id or access_key_secret is provided alone - Prevent fallback to ambient host credentials when partial AK is detected - Convert numeric error codes to string to avoid AttributeError in error mapping - Improve secret redaction by matching sk- tokens with regex and applying filter on management loggers - Introduce get_management_logger to attach secret redaction filter to all management loggers - Limit transparent retries to safe HTTP methods to avoid duplicate side effects on write ops - Support per-call timeout overrides and preserve injected client timeout settings in transport - Add tests for partial explicit credential rejection, management logger redaction, retry behavior on write methods, and timeout handling with client and per-call overrides
- Removed unnecessary newlines in assertion statements - Improved readability by simplifying multiline assertions - Ensured consistent assert formatting in test_management_logger_carries_redaction_filter
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
Adds
dashscope.managementas an optional[management]extra — a ToBself-service backend SDK integration layer over the ModelStudio/2026-02-10
RAM OpenAPI (ROA style). Read-only first release; no reference backend.
model permissions, API keys (list/get), billing (overview/trend), token plan
(account / members / seats / subscription / shared-packages). The other 24 ops
(21 writes + 3 out-of-scope reads) are deferred and catalogued as high-risk
in the design md; no code shipped for them.
ManagementClient/AsyncManagementClient, full sync+asyncsymmetry,
raw=Trueoverloads, region binding +with_options(region=...)(independent connection pool, shared credential resolver).
ACS3-HMAC-SHA256signing via officialalibabacloud_openapi_util;signed header set == sent header set; canonical query used verbatim on wire.
alibabacloud_credentials(ak/sk, STS, ECS RAMrole, OIDC, default chain), sync + async.
RAM error crosswalk to dashscope error classes.
SecretStrredaction forapiKeyValue(repr / log / exception / model_dump).TokenPage(nextToken) andBasePage(PageNo/PageNum).x-dashscope-sdk-client: python-sdk/<ver>/management2(
DASHSCOPE_DISABLE_SDK_HEADERSkill switch honored).alibabacloud_credentials>=1.0.0,alibabacloud_openapi_util>=0.2.0. Coredashscopeimport does not require them.Test plan
credentials, errors (success gate / crosswalk), transport (wire form / retry /
region), resources, pagination — sync + async.
tests/protocols/test_management_e2e.py), skipwithout creds, no write ops.
pre-commitgreen and stable (mypy / black / flake8 / pylint / add-trailing-comma).