Repository navigation
Conversation
added 2 commits
November 12, 2026 14:16
…ption) Re-implements the 20261027 OpenAPI adaptation on top of current main (post-modelscope#77 rewrite), replacing the pre-modelscope#77 implementation previously carried on this branch: - CLI: studio settings/create expose the OAuth app configuration flags (--oauth-enabled/--no-oauth-enabled, --oauth-scope, --oauth-token-expire-time, --oauth-callback-url, --oauth-homepage-url); lone oauth_* settings without an explicit oauth_enabled are rejected client-side, mirroring the server's HTTP 400 gate - CLI/API: --description on studio secret/variable add/update (and the top-level secret family); description is tri-state on update — None omits the field (server keeps the stored one), empty string clears it - CLI: secret/variable list now renders the description column the server returns - compat: legacy add/update_studio_secret/variable forward passthrough kwargs (description) instead of silently dropping them - fixture: openapi.json gains the oauth_* fields on CreateStudioRequest / UpdateStudioSettingsRequest / GetStudioResponse with service-master-aligned descriptions Verified: full cli subset 868 passed / 37 skipped; ruff + mypy clean; modelscope SDK tests/studios/test_studio_cli.py against this build: 19 passed / 19 skipped (gates active).
…erance Three review findings on modelscope#83 plus a help-text clarification: - create: reject OAuth flag combinations the server would silently drop. The create contract decodes oauth_enabled as a plain bool, so detail fields without an explicit flag never reach the OAuth app creation — the studio deploys without its login runtime variables. Lone details and non-studio misuse now fail fast before any request (openapi/backend/studio.go:634, service/space.go:3899). - secret/variable list: keep keys (and variable values) untruncated — server-legal keys run to 128 bytes and must stay copyable; only the description column is capped via the new per-column max_widths (openapi/types/studio.go:216). - compat: forward only description on add/update_studio_secret/variable; unknown kwargs keep the legacy silent-ignore behaviour instead of raising TypeError from the fixed-signature modern API. - CLI help: --oauth-callback-url now distinguishes create (defaults to the studio subdomain) from update (keeps existing callbacks). Verified: full non-remote suite 1775 passed / 1 skipped; ruff + mypy clean; modelscope tests/studios with this build: 23 passed / 19 skipped.
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.
…ption)
Re-implements the 20261027 OpenAPI adaptation on top of current main (post-#77 rewrite), replacing the pre-#77 implementation previously carried on this branch:
Verified: full cli subset 868 passed / 37 skipped; ruff + mypy clean; modelscope SDK tests/studios/test_studio_cli.py against this build: 19 passed / 19 skipped (gates active).