Skip to content

dev/v2-change - #216

Open
luk384090-cloud wants to merge 7 commits into
mainfrom
dev/v2-change
Open

luk384090-cloud wants to merge 7 commits into
mainfrom
dev/v2-change

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator
  • Migrate save_api_key function from common module to v2._config module
  • Update comments to reflect the relocation of key-file authentication implementation
  • Move SDK session ID implementation to shared module dashscope._shared
  • Modify v2 package re-export strategy, no longer importing save_api_key from 1.x
  • Adjust incremental output parameter check logic in chat completion module
  • Update related tests to verify new module structure and functionality migration

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [Check if API keys or sensitive credentials are exposed in code/logs]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Model
  • Application
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

luk384090-cloud added 4 commits October 21, 2026 17:31
- Migrate save_api_key function from common module to v2._config module
- Update comments to reflect the relocation of key-file authentication implementation
- Move SDK session ID implementation to shared module dashscope._shared
- Modify v2 package re-export strategy, no longer importing save_api_key from 1.x
- Adjust incremental output parameter check logic in chat completion module
- Update related tests to verify new module structure and functionality migration
…plementations

- Update _shared module documentation to clarify its role as state shared between the two stacks
- Migrate the agentstudio subpackage implementation to dashscope.v2.agentstudio
- Add a compatibility layer for agentstudio to preserve historical import paths
- Migrate aigc, app, assistants, audio, cli, common, embeddings and other subpackage implementations to their corresponding legacy_1x modules
- Add backward-compatible import shims for each subpackage
- Remove finetune/reinforcement-related demo and parser components
- Update the import structure of the finetune/reinforcement module
luk384090-cloud and others added 3 commits October 23, 2026 18:01
Sync the vendored error registry to upstream 1.0.11 (commit 5b2d2e1),
which adds the generic sdk.ConnectionError / sdk.ConnectionInterrupted /
sdk.Timeout / sdk.IoError entries shared with the Java SDK.

APIConnectionError / APITimeoutError become SdkError subclasses whose
code / solution / allow_retry default from the catalog entries, and the
httpx transport now formats their messages from the entry templates.
Local file I/O failures in client.files raise sdk.IoError via the new
sdk_error() factory instead of raw FileNotFoundError / OSError.
sdk.ConnectionInterrupted is vendored for parity but intentionally not
wired (a Java threading artifact).
Re-vendor the catalog at upstream 1.0.11 commit cd873b6, which adds
the public response_error entry and five sdk.ws.* entries.

ResponseError joins the status-error hierarchy as a flat
APIStatusError sibling. It shares status 500 with internal_error, so
the status map now lets the first catalog claimant win: a bare 500
still resolves to InternalServerError, and 500 joins 400/401/429 as a
status too ambiguous for catalog fallback text. ResponseError itself
stays SDK-side with no wire-code or status mapping.

The websocket transport's ad-hoc RuntimeError/WsEventError raises are
replaced by catalog-backed SdkError subclasses: WsEventError now
carries sdk.ws.ProtocolError, and the new WsStateError /
WsBinaryOwnerConflictError carry sdk.ws.IllegalState /
sdk.ws.BinaryOwnerConflict. sdk.ws.UpstreamQueueFull (synchronous
send, no buffer) and sdk.ws.QueueCapacityExceeded (unbounded per-task
queues) describe mechanisms the Python transport does not have and
are vendored for parity only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant