refactor(ai_client): remove ProviderError class; ErrorInfo is the new error type

This commit is contained in:
ed
2026-06-12 19:41:41 -04:00
parent da44e934fc
commit 64b787b881
4 changed files with 29 additions and 54 deletions
+3 -3
View File
@@ -39,12 +39,12 @@ def test_qwen_tool_format_translation() -> None:
assert "parameters" in ds_tools[0]
def test_qwen_error_classification() -> None:
from src.ai_client import ProviderError
from src.result_types import ErrorKind
from src.qwen_adapter import classify_dashscope_error
from dashscope.common.error import AuthenticationError
err = classify_dashscope_error(AuthenticationError("bad key"))
assert err.kind == "auth"
assert err.provider == "qwen"
assert err.kind == ErrorKind.AUTH
assert err.source == "qwen_adapter"
def test_list_qwen_models_returns_hardcoded_registry() -> None:
from src.ai_client import _list_qwen_models