(provider_hint: Optional[str] = None)
| 89 | |
| 90 | |
| 91 | def _should_prefer_dashscope_credentials(provider_hint: Optional[str] = None) -> bool: |
| 92 | hint = str(provider_hint or "").strip().lower() |
| 93 | if hint in {"dashscope", "aliyun", "bailian"}: |
| 94 | return True |
| 95 | |
| 96 | base_url = _get_first_env_value("OPENAI_BASE_URL", "DASHSCOPE_BASE_URL").lower() |
| 97 | return "dashscope.aliyuncs.com" in base_url |
no test coverage detected