Skip to content

Conversation

@OhYee
Copy link
Member

@OhYee OhYee commented Jan 16, 2026

This commit refactors the resource management system by implementing a more consistent API client structure across modules. The changes include:

  • Updated import paths and module references for better consistency
  • Enhanced ResourceBase class with improved listAll functionality
  • Standardized API client methods and error handling
  • Improved type safety and code maintainability

The changes affect AgentRuntime, ModelProxy, ModelService, Credential, Sandbox, and Toolset modules with consistent method signatures and return types. The waitUntilReadyOrFailed method has been renamed to waitUntilReadyOrFailed for better clarity and consistency.

Additionally, dependencies have been updated and test coverage has been improved across modules.

更新资源管理和 API 一致性

此提交通过实现更一致的 API 客户端结构来重构资源管理系统。
更改包括:

  • 更新导入路径和模块引用以实现更好的一致性
  • 使用改进的 listAll 功能增强 ResourceBase 类
  • 标准化 API 客户端方法和错误处理
  • 提高类型安全性和代码可维护性

这些更改影响 AgentRuntime、ModelProxy、ModelService、Credential、 Sandbox 和 Toolset 模块,具有统一的方法签名和返回类型。
waitUntilReadyOrFailed 方法已重命名为 waitUntilReadyOrFailed 以提高清晰度和一致性。

此外,依赖项已更新,各模块的测试覆盖率已提高。

Change-Id: I104aac42064fd96c867b9a13ab4140e5e182db3d

Thank you for creating a pull request to contribute to Serverless Devs agentrun-sdk-python code! Before you open the request please answer the following questions to help it be more easily integrated. Please check the boxes "[ ]" with "[x]" when done too.
Please select one of the PR types below to complete


Fix bugs

Bug detail

The specific manifestation of the bug or the associated issue.

Pull request tasks

  • Add test cases for the changes
  • Passed the CI test

Update docs

Reason for update

Why do you need to update your documentation?

Pull request tasks

  • Update Chinese documentation
  • Update English documentation

Add contributor

Contributed content

  • Code
  • Document

Content detail

if content_type == 'code' || content_type == 'document':
    please tell us `PR url`,like: https://github.com/Serverless-Devs/agentrun-sdk-python/pull/1
else:
    please describe your contribution in detail

Others

Reason for update

Why do you need to update your documentation?

OhYee added 2 commits January 16, 2026 19:18
This commit refactors the resource management system by implementing a more
consistent API client structure across modules. The changes include:
- Updated import paths and module references for better consistency
- Enhanced ResourceBase class with improved listAll functionality
- Standardized API client methods and error handling
- Improved type safety and code maintainability

The changes affect AgentRuntime, ModelProxy, ModelService, Credential,
Sandbox, and Toolset modules with consistent method signatures and
return types. The waitUntilReadyOrFailed method has been renamed to
waitUntilReadyOrFailed for better clarity and consistency.

Additionally, dependencies have been updated and test coverage has been
improved across modules.

更新资源管理和 API 一致性

此提交通过实现更一致的 API 客户端结构来重构资源管理系统。
更改包括:
- 更新导入路径和模块引用以实现更好的一致性
- 使用改进的 listAll 功能增强 ResourceBase 类
- 标准化 API 客户端方法和错误处理
- 提高类型安全性和代码可维护性

这些更改影响 AgentRuntime、ModelProxy、ModelService、Credential、
Sandbox 和 Toolset 模块,具有统一的方法签名和返回类型。
waitUntilReadyOrFailed 方法已重命名为 waitUntilReadyOrFailed
以提高清晰度和一致性。

此外,依赖项已更新,各模块的测试覆盖率已提高。

Change-Id: I104aac42064fd96c867b9a13ab4140e5e182db3d
Signed-off-by: OhYee <oyohyee@oyohyee.com>
- refactor client implementations to use centralized client classes
- remove direct API calls from resource classes
- update waiting methods to use waitUntilReadyOrFailed pattern
- improve error handling and type safety
- standardize resource listing and pagination methods

更新了资源管理和API一致性,包括:
- 重构客户端实现以使用集中式客户端类
- 从资源类中移除直接API调用
- 更新等待方法以使用waitUntilReadyOrFailed模式
- 改进错误处理和类型安全
- 标准化资源列表和分页方法

Change-Id: I359c258097312c30bbc7aa206b8e5f5fb0fa3924
Signed-off-by: OhYee <oyohyee@oyohyee.com>
Updated test cases to use public.example.com instead of internal.example.com
for OpenAPI base URL testing, and corrected URL property naming from
internetUrl to intranetUrl in test fixtures.

更新测试用例以使用 public.example.com 而不是 internal.example.com
作为 OpenAPI 基础 URL 测试,并在测试配置中将 URL 属性名称从
internetUrl 更正为 intranetUrl。

Change-Id: Ib62612393fc3b7bc4bbccedcfa7f84e1df0ade07
Signed-off-by: OhYee <oyohyee@oyohyee.com>
@OhYee OhYee merged commit 5a27ed7 into main Jan 18, 2026
9 checks passed
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.

2 participants