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.
fix(model): resolve proxy credentials and fallback detection #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
fix(model): resolve proxy credentials and fallback detection #132
Changes from all commits
5965e8fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] 保留异常契约,避免将网络失败当作类型探测失败
这里改成
except Exception后,有两种已对照 base 复现的行为变化:backend_type=BackendType.SERVICE,接口返回404 + model not found:原来经to_resource_error()抛ResourceNotExistError,现在直接抛HTTPError,已有的except ResourceNotExistError无法捕获。ModelService.get_by_name()和异步路径同样受影响。UnretryableException,随后 Proxy 查询返回 404:原来保留网络异常且不查 Proxy,现在吞掉网络异常,最终变成ResourceNotExistError,将查询失败误报为资源不存在。此场景通过 mock 底层 SDK、保留真实 ModelControlAPI 转换逻辑复现。建议只在成功解析但缺少
provider_settings时直接进入 Proxy 查询,保留原有的HTTPError捕获及 SERVICE 分支的to_resource_error()转换,不扩大到捕获所有异常。请同步修改get_async()和__client_async_template.py,并增加断言具体异常类型的回归测试;现有pytest.raises(Exception)覆盖不了第一种变化。Uh oh!
There was an error while loading. Please reload this page.