MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _looks_like_auth_error

Function _looks_like_auth_error

skills/embedding/scripts/embed.py:152–165  ·  view source on GitHub ↗
(exc: Exception)

Source from the content-addressed store, hash-verified

150
151
152def _looks_like_auth_error(exc: Exception) -> bool:
153 message = str(exc or "").lower()
154 return any(
155 token in message
156 for token in (
157 "401",
158 "unauthorized",
159 "invalid api key",
160 "incorrect api key",
161 "invalid_request_error",
162 "authentication",
163 "forbidden",
164 )
165 )
166
167
168def _resolve_hf_provider(primary_env_name: str, fallback_env_name: str = "HF_INFERENCE_PROVIDER") -> str:

Callers 1

embed_batchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected